zhyq0826 / zhyq0826.github.io

三月沙的博客
http://sanyuesha.com
6 stars 1 forks source link

mysql devops #100

Closed zhyq0826 closed 5 years ago

zhyq0826 commented 7 years ago

mysql 创建用户错误 ERROR 1396 (HY000)

ERROR 1396 (HY000): Operation CREATE USER failed for 'user'@'localhost'

use mysql;
select * from user;
delete from user where user='user'
flush PRIVILEGES
CREATE USER 'user'@'localhost' IDENTIFIED BY 'passwd';

mysql dump table structure

mysqldump --databases dbname -hlocalhost -uroot --password=passwd --port=3306  --no-data --skip-comments  > dbname.sql