How Workbench remotely accesses the mysql database
1. Open mysql
The mysql configuration file is in the/etc/mysql/my. cnf file, which contains a line of bind-address = 127.0.0.1, indicating that only local access is allowed. Just comment this line.
2. Create a New mysql user
(1) first, enter the mysql database of the mysql database locally.
(2) create a user: grant all on *. * to user @ 'IP' identified by 'Password'; user indicates the name of the user to be created; IP indicates the client that wants to access the mysql database; and password indicates the password; and grant all permissions. How Workbench remotely accesses the mysql database
(3) flush privileges; refresh the mysql system permission table; otherwise, access is denied. Restarting the database can also achieve this effect.
3. Restart the database
Run the sudo service mysql restart command to restart the database.
4. Use workbench to connect to the database
The host name indicates the ip address of the database to be connected.
Effect of successful connection
Click to enter the page