Linux virtual machine: VMware + Ubuntu 16.04.4 Windows native: Navicat for MySQL 1. Download and install MySQL in the virtual machine To download and install VMware and Ubuntu 16.04.4, please search on Baidu. This article assumes that these have been installed. In the virtual machine, press Ctrl+Alt+T to open a terminal, enter the command sudo apt-get install mysql-server mysql-client , and then follow the prompts. Wait for the installation to complete. You can enter the command: whereis mysql to view the installation location of mysql Start the database command: service mysql start Close the database command: service mysql stop Restart the database command: service mysql restart Log in to the database: mysql -u root -p Authorize a new user (so that you don't need to log in to the database as root) mysql>grant all privileges on . to “new user name”@"%" identified by “new user password” with grant option; Changes take effect: myssql> flush privileges; Exit the database: mysql>exit; However, the database cannot be connected using Navicat for MySQL at this time, and an error message will be reported. The error message is as follows (because the remote connection of the file has not been configured): 2. Modify the MySQL configuration file Enter the command in the terminal: sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf After entering the password, the configuration file is opened. You need to comment out bind-address=127.0.0.1, which becomes #bind-address=127.0.0.1 3. Download and install Navicat for MySQL on the Windows machine Navicat for MySQL download and installation by yourself Baidu, basically all the way to next 4. Establish a connection First, determine the virtual machine IP, enter the command in the terminal: ifconfig -a, where inet addr is the real IP, which needs to be entered in navicat for MySQL Select Connection, click MySQL, and give the connection a name of your own. If the above process does not work for you, please refer to a few points. Note: 1. The network adapter in the virtual machine should be in bridge mode, which can be changed in Virtual Machine -> Settings -> Network Adapter 2. Pay attention to the settings of the virtual machine firewall The above is the editor's introduction to how to access the MySQL database in the Linux virtual machine under the Windows environment. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: Detailed explanation of how to use the Vue license plate input component
>>: Detailed explanation of Zabbix installation and deployment practices
Now .net core is cross-platform, and everyone is ...
This article shares the specific code of the WeCh...
Install postcss-pxtorem first: npm install postcs...
1. Search mysql in the browser to download and in...
In the SQL like statement, for example SELECT * F...
Using the knowledge of CSS variables, I will dire...
<br />Semanticization cannot be explained in...
1.MySQL version [root@clq system]# mysql -v Welco...
transform:scale() can achieve proportional zoomin...
This article mainly introduces several scheduling...
Introduction: When using MySQL to create a table,...
Table of contents transition hook function Custom...
Under the instructions of my leader, I took over ...
How to introduce svg icons in Vue Method 1 of int...
Table of contents 1. Background 2. What is a virt...