标签:ini flush 点击 ble grant alt local safe 安全模式
1.如果没有数据,或者运行初始化,那么直接在偏好设置里,点击Initialize Database即可
2. 有数据下修改(还没验证)
(1)关闭服务sudo /usr/local/mysql/support-files/mysql.server stop
(2)安全模式下启动sudo /usr/local/mysql/bin/mysqld_safe --skip-grant-tables
(3)重新打开一个终端,输入Mysql -u root
(4)然后输入FLUSH PRIVILEGES;SET PASSWORD FOR root@‘localhost‘ = PASSWORD(‘重新设置的密码‘);
(5)如果报错:SET PASSWORD FOR root@localhost = ‘你重新设置的密码‘;
重启mysql就可以访问了。
标签:ini flush 点击 ble grant alt local safe 安全模式
原文地址:https://www.cnblogs.com/anenyang/p/12307562.html