Linux下MySQL 5.7的初始化

1.登录root账号
su

2.启动MySQL服务
systemctl start mysql

3.启动MySQL服务(安全方式)
mysqld_safe --user=mysql &

4.登录MySQL
mysql -u root #无密码
mysql -u root -p #有密码

5.修改指定服务端的密码。
mysql> update mysql.user set authentication_string=password('我的密码') where user='root' and Host = 'localhost';

 

posted @ 2020-10-18 01:48  Clotho_Lee  阅读(1185)  评论(0编辑  收藏  举报