How to realize the mysql operation of connecting navicat to Ubuntu virtual machine
Most people do not understand the knowledge points of this article "how to realize the mysql operation of navicat connecting Ubuntu virtual machine", so the editor summarizes the following content, detailed content, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this article, "how to achieve the mysql operation of navicat connecting Ubuntu virtual machine".
1. View the ip of the virtual machine
Open the terminal in the virtual machine and enter the command
Ifconfig
2. Authorize mysql remote access
Enter the command at the terminal (the path of the configuration file may be a little different due to different versions)
Sudo vim / etc/mysql/conf.d/mysql.cnf
Type "I" to start editing, and modify bind-address = 0.0.0.0 (set to externally accessible, if set to 127.0.0.1, only locally accessible. )
Esc key to exit editing, type ": wq" to save and exit.
Then log in to MySQL to change permissions
Mysql-uroot-pGRANT ALL PRIVILEGES ON *. * TO 'root'@'%' IDENTIFIED BY' passwrd' WITH GRANT OPTION;FLUSH PRIVILEGES;# exit login MySQLexit;# restart server service mysql restart3, access via navicat
Supplement: Navicat connects to mysql in the virtual machine
The following sql means to add permissions to the root user with a password of 000000.
GRANT ALL PRIVILEGES ON *. * TO 'root'@'%' IDENTIFIED BY' 000000' WITH GRANT OPTION
Navicat Connect mysql Command Line