mysql 命令
一、mysql服务启动和停止
===net stop mysql
===net start mysql
二、登录mysql
===mysql -uroot -p [mysql -hlocalhost -uroot -p]
三、增加新用户
====格式【grant 权限 on 数据库.* to 用户名@登录主机 identified by "密码"】 如果希望能够任何机器则将登录主机改为%
grant select ,insert ,update ,delete on mydb.* to user1@localhost identified by "";
四、导出数据库
=====mysqldump -u root -p123456 database dbname>mysql.dbname
五、导入数据库
======mysqlmport -u root -p12345<mysql.sql
六、显示表结构
======describe mytable
七、查看用户拥有权限
=====show grants for 'root'@'localhost'