1、Centos7重置mysql密码
https://blog.csdn.net/Allison_/article/details/89148189
2、创建新用户并授权
create user ‘tianmei’@’%’ identified by ‘123456’;
flush privileges;
grant all privileges on . to ‘tianmei’@’%’ identified by ‘123456’;
3、导出数据库(如何只导出结构在qp 前加一个-d)
/usr/bin/mysqldump -h47.111.6.233 -P3306 -utianmei -p123456 qp > /home/wwwroot/qipaihoutai/qptest.sql;
4、导入数据库
先新建数据库test,然后
mysql -h47.111.6.233 -P3306 -utianmei -p123456 test < /home/wwwroot/qipaihoutai/qptest.sql;
Centos7重置mysql密码
最新推荐文章于 2024-06-26 16:29:40 发布