美文网首页
在阿里云ECS上部署完mysql,但是本地想使用workbenc

在阿里云ECS上部署完mysql,但是本地想使用workbenc

作者: 一个被程序员耽误的厨师 | 来源:发表于2019-04-18 11:19 被阅读0次

workbench远程连接mysql操作

创建远程连接
填写远程数据库信息

点击ok开始报错了

报错信息

解决方法

在终端链接mysql:

[root@iz2ze3n3v0a65ux7s40ku7z api]# mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 48
Server version: 5.7.25 MySQL Community Server (GPL)

Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

在终端输入:(你想myuser使用mypassword从任何主机连接到mysql服务器的话。

mysql> GRANT ALL PRIVILEGES ON *.* TO '数据库用户名'@'%' IDENTIFIED BY '数据库密码' WITH GRANT OPTION;
Query OK, 0 rows affected, 1 warning (0.01 sec)

mysql>
mysql> FLUSH   PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)

mysql> 

好了,现在可以远程连接了

相关文章

网友评论

      本文标题:在阿里云ECS上部署完mysql,但是本地想使用workbenc

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