-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Remote Connection MySQL by Workbench | ||
|
||
### Basics | ||
|
||
Firstly you need MySQL server and MySQLWorkbench, I suggest a quite stable version [MySQL 5.7](https://dev.mysql.com/downloads/mysql/5.7.html#downloads). As for Workbench I suggest [MySQLWorkbench 6.3](https://downloads.mysql.com/archives/workbench/) because higher version may cause compatibility issues. | ||
|
||
### Configure remote connection for MySQL | ||
|
||
Edit `mysql.cnf`, I found `mysqld.cnf` under`/etc/mysql/mysql.conf.d`, find `bind-address = 127.0.0.1` and comment it out | ||
|
||
`#bind-address = 127.0.0.1` | ||
|
||
On your server, `mysql -u username -p` | ||
|
||
Add new mysql user | ||
|
||
`GRANT ALL ON *.* to user@'IP' IDENTIFIED BY 'password'; ` | ||
|
||
'IP' I suggest use '%' which means allow all ip connections. Then refresh system | ||
|
||
`FLUSH PRIVILEGES;` | ||
|
||
`exit` and restart the mysql service | ||
|
||
`sudo service mysql restart ` | ||
|
||
### Operate Workbench | ||
|
||
Click the plus button on the home page, fill in the server IP address, username, password(your mysql password on server), wish you success! |