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';

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM