当前位置:网站首页>cmd (command line) to operate or connect to the mysql database, and to create databases and tables
cmd (command line) to operate or connect to the mysql database, and to create databases and tables
2022-07-30 06:05:00 【burial】
1. Related Instructions
1. Press the windows+R keys on the keyboard to enter cmd, or directly enter cmd in the search box
2. Enter mysql:
Enter mysql -uroot -p at the command line, then enter your mysqlPassword, enter the mysql database after success
3.View databases in mysql
show databases;
4. Use a database
use database name;
The database can only be accessed after we issue the command to use the database
5. View the tables in the database
NoteOnly when we start using this database, we can operate with the database you are using
show tables;
6. View table design structure
describe table name;
or
desc table name;
2. Create a database and its tables
1. First you still need to connect to the database
2.Create database
create database database name;
3.Use database
use database name;
4.Create table
5. Summary
I believe my friends here, and I also know how to insert data to operate the database, I won't go into details here.Thank you for your likes and followings, thank you all!
Let me introduce myself first. The editor graduated from Shanghai Jiaotong University in 2013. I worked in a small company and went to big factories such as Huawei and OPPO. I joined Alibaba in 2018, until now.I know that most junior and intermediate java engineers want to upgrade their skills, they often need to explore their own growth or sign up to study, but for training institutions, the tuition fee is nearly 10,000 yuan, which is really stressful.Self-learning that is not systematic is very inefficient and lengthy, and it is easy to hit the ceiling and the technology stops.Therefore, I collected a "full set of learning materials for java development" for everyone. The original intention is also very simple. I hope to help friends who want to learn by themselves but don't know where to start, and at the same time reduce everyone's burden.Add the business card below to get a full set of learning materials
边栏推荐
- 解决没有配置本地nacos但是一直发生localhost8848连接异常的问题
- Solve the problem that the local nacos is not configured but the localhost8848 connection exception always occurs
- MySQL夺命10问,你能坚持到第几问?
- 排列数字(DAY90)dfs
- 【Redis高手修炼之路】Jedis——Jedis的基本使用
- Different lower_case_table_names settings for server ('1') and data dictionary ('0') solution
- 【Koltin Flow(一)】五种创建flow的方式
- "Hou Lang" programmer version, a speech dedicated to a new generation of programmers, He Bing's "Hou Lang" speech imitation show
- 破纪录者(Google Kickstart2020 Round D Problem A)
- 一文带你吃透js处理树状结构数据的增删改查
猜你喜欢
随机推荐
互联网(软件)公司项目管理软件调研报告
从字节码角度带你彻底理解i++与++i
MySQL索引从入门到深入学习
MySQL stored procedure
curl (7) Failed connect to localhost8080; Connection refused
MySql fuzzy query Daquan
MySql的初识感悟,以及sql语句中的DDL和DML和DQL的基本语法
程序员大保健指南,给自己的身心偶尔放松的机会
Error: npm ERR code EPERM
手把手教你设计一个CSDN系统
MySQL夺命10问,你能坚持到第几问?
MySql string splitting realizes the split function (field splitting, column switching, row switching)
4461. 范围分区(Google Kickstart2022 Round C Problem B)
mysql basics (4)
MySQL模糊查询性能优化
期末作业C#实现学生宿舍管理系统
Solve the problem that the local nacos is not configured but the localhost8848 connection exception always occurs
MySQL (2)
leetcode刷题
质数(清华大学机试题)(DAY 86)









