0


ubuntu设置MySQL密码

ubuntu设置MySQL密码

1.启动mysql服务器

service mysql start

2. 查看临时用户和密码

sudo cat /etc/mysql/debian.cnf

3.用临时密码登录

mysql -u debian-sys-maint -p

4.修改root用户密码

ALTERUSER'root'@'localhost'IDENTIFIEDWITH mysql_native_password by 'mynewpassword';

5.退出MySQL,使密码生效

exit退出MySQL,在终端命令行输入:

sudo mysql_secure_installation

参考文章:
MYSQL设置密码时显示Failed! Error: SET PASSWORD has no significance for user ‘root‘@‘localhost‘ as the authe

标签: hadoop

本文转载自: https://blog.csdn.net/dogeSirius/article/details/127829146
版权归原作者 dogeSirius 所有, 如有侵权,请联系我们删除。

“ubuntu设置MySQL密码”的评论:

还没有评论