Uncle Lei

life is a game for everyone and love is a price.

导航

常用sql命令

Posted on 2017-02-17 12:17  chunzai  阅读(103)  评论(0编辑  收藏  举报

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