Skip to content

Commit

Permalink
macOS\MySQL\Workbench
Browse files Browse the repository at this point in the history
  • Loading branch information
EagleYing authored Jan 20, 2019
1 parent 938ebf5 commit fb866dd
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions Remote Connection MySQL by Workbench.md
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!

0 comments on commit fb866dd

Please sign in to comment.