添加mysql 环境变量
vim ~/.bash_profile
输入 PATH=$PATH:/usr/local/mysql/bin
source ~/.bash_profile
mysql -u root -p
use mysql;
GRANT ALL ON . TO 'root'@'%'
如果执行此命令提示:
You are not allowed to create a user with GRANT ;
需要下载:mysql workbench
https://dev.mysql.com/downloads/workbench/
修改root:
image.png
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '密码'
网友评论