常用sql命令

1.net start/stop mysql  启动停止mysql

   mysqladmin -uroot -p shutdown  停止mysql

2.show create database/table xxx  查看表/库详情

3.show variables like '%character%'  查看各部字符集

4.show databases/tables  查看所有库/表

5.mysql -uroot -p/mysql --user root --password  连接Mysql服务器

   mysql --host localhost --user root --password/mysql -hhost -uroot -pmysql -uroot -p  连接Mysql服务器

6.quit/exit  退出mysql

原文地址:https://www.cnblogs.com/chunzai/p/6409295.html