美文网首页
mysql设置

mysql设置

作者: 靖哥哥编程 | 来源:发表于2020-08-03 19:43 被阅读0次

1.Ubuntu中查看mysql的用户名和密码:
sudo cat /etc/mysql/debian.cnf

2.使用user和password登陆mysql
use mysql

update mysql.user set authentication_string=password('mysql') where user='root' and Host ='localhost';

update user set plugin="mysql_native_password";

flush privileges;

quit;

3.完成修改后重启mysql服务器
sudo service mysql restart

[client]
host = localhost
user = debian-sys-maint
password = uzBvDkzQ9o7PzhjG
socket = /var/run/mysqld/mysqld.sock
[mysql_upgrade]
host = localhost
user = debian-sys-maint
password = uzBvDkzQ9o7PzhjG
socket = /var/run/mysqld/mysqld.sock

相关文章

网友评论

      本文标题:mysql设置

      本文链接:https://www.haomeiwen.com/subject/srlvrktx.html