美文网首页
mysql 8.x 开启远程链接

mysql 8.x 开启远程链接

作者: cifer_pan | 来源:发表于2018-10-25 10:44 被阅读0次

添加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 '密码'

相关文章

网友评论

      本文标题:mysql 8.x 开启远程链接

      本文链接:https://www.haomeiwen.com/subject/wvjqtqtx.html