Mysql 数据备份与恢复,用户创建,授权

1. Mysqldump >outfile.sql

2. Mysql –uxxx –pxxx < backfile.sql

3. Create user ‘username’@’host’ identified by ‘password’

4. Grant all privileges on DBNAME.*to ‘username’@’host’//添加权限,特别要注意DBNAME后面的*

5. revoke all privileges on DBNAME.* to .*‘username’@’host’//取消权限特别要注意DBNAME后面的*

6. Mysql存储引擎类型直接的影响约束的效用(比方说外键约束。在MyISM中是没实用的。在InnoDB中才实用)

posted on 2017-04-11 17:53  yutingliuyl  阅读(179)  评论(0编辑  收藏  举报