Use Mysqlworkbench under Windows to connect to MySQL under Ubuntu server
Install MySQL under 1.ubuntu
sudo apt-get install Mysql-server
After entering the password, you can complete the installation
2. Enter MySQL to create a remote connection user
Mysql-u root-p
Enter Password login
Create a user with Grant
Grant permission 1, permission 2,... Permission n on the database name. Table name to User name @ user address identified by ' connection password ';
For example:
Grant Select,insert,update,delete,create,drop on mydb.mytable to [e-mail protected] identified by ' MyPassword ';
Assign the user Hades from 192.168.1.88 to select,insert,update,delete,create,drop the mytable table of the database MyDB, and set the password as ' mypassword ';
Grant all privileges on * * to [email protected] identified by ' MyPassword ';
Assign the user Hades from 192.168.1.88 to all the tables in all databases and set the password to ' MyPassword ';
Grant all privileges on * * to [email protected] '% ' identified by ' mypassword ';
Assign the user Hades from any IP address the permission limit for all operations on all tables in all databases, and set the password to ' MyPassword ';
3. Modify the MySQL configuration file
sudo vim/etc/mysql/my.cf
Find bind-address = 127.0.0.1
Change to bind-address = 0.0.0.0
Save exit
4. Restart the MySQL service
sudo service MySQL restart
5. Use the Mysqlworkbench connection under window
6. The connection is shown below, if unsuccessful, check if server port 3306 is open.
Remote connection to MySQL