1. Install MySQL in Ubuntu Server (remember to set the password in the process)
Sudo apt-get Install MySQL
Sudo Apt-get Install Mysql-server
Sudo Apt-get Install Mysql-client
Note: There is a problem with MySQL not installed here, prompting Dpkg:error processing package open-vm-tools (--configure) error, the workaround is to clear open-vm-tools after reinstalling, sudo Apt-get purge open-vm-tools, sudo apt-get install Open-vm-tools.
2. Configure the MySQL Connection account
Enter the MySQL environment (Mysql–u root–p)
User MySQL
Add an Account
(INSERT into Mysql.user (Host,user,password) VALUES ("localhost", "Test", Password ("pass"));)
localhost refers to the local, if remote connection is required, the host can be set to "%"
Note: When using a user to enter the MySQL environment, you are prompted with an access denied problem, the workaround is to update the Authentication_string field in the Mysql.user table, and the update mysql.user set Authentication_string=password (' Pass ') where user= ' test ' and host= ' localhost '
3. Authorization of the user
Command: Grant all privileges the Databasename.tablename to ' test ' @ ' localhost ' identified by ' Pass ' with GRANT option;
DatabaseName-database name, tablename-table name, if you want to grant the user permission to operate on all databases and tables, the * representation is available *, such as *. *
@ after referring to the host, need to all add @ '% '
4. Remote use SQLYOG connection, port default 3306
Note: The error in connection Tip 1045 is encountered here, the workaround is to set the Mysql.user table to the corresponding user, host to connect with IP, and set authentication_string and authorize this user
Ubuntu Server installs MySQL and configures remote connections