Deepin安装mySQL

运行命令:

sudo apt-get install -y mysql-server mysql-client
sudo mysql -uroot -p

进入之后:

update mysql.user set plugin="mysql_native_password" where user="root";
grant all on *.* to root@"localhost";

这里我暂时把密码设置为123456

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

然后登录的时候

sudo mysql -uroot -p

输入你之前设置的密码就OK啦
在这里插入图片描述

发布了4 篇原创文章 · 获赞 8 · 访问量 758

猜你喜欢

转载自blog.csdn.net/Brilliant_orange/article/details/104396690