Cmd command line to view the basic commands of the mysql database

mysql initialize/remove mysql

mysqld --install
mysqld --remove

Turn on/off the mysql service

net start mysql
net stop mysql 

enter mysql

mysql -u 用户名 -p 密码

View/use a database in mysql

mysql > show databases;
mysql > use 数据库名;

create database

mysql > create database 新数据库名;

View the tables in the database

mysql > show tables;
或者
mysql > select table_name from information_schema.tables where table_schema=‘数据库名’

Show table structure

mysql > describe 表名;
或者
desc 表名;
或者
select * from columns where table_name=‘表名’;

Guess you like

Origin blog.csdn.net/qq_49174867/article/details/124532501
Recommended