Lab Environment Description:
Local physical machine Windows7 system, install VMware workstaion 11, create a new centos6.6 system virtual machine and install the lamp environment;
The local physical ip:192.168.71.123 virtual machine IP address is: 192.168.71.126
Experimental Purpose:
In the local Windows access, the MySQL database in the virtual machine, (can be used for development department after testing OK)
The steps are as follows:
1, Virtual machine settings: Virtual network Editor Select Bridge mode, bridge to the local network card;
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/85/FB/wKioL1exd-SAWbzoAACuwbc8c90427.jpg "title=" a.jpg " alt= "Wkiol1exd-sawbzoaacuwbc8c90427.jpg"/>
Virtual Machine Network connection: Bridge mode, replication physical machine network status check;
650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M02/85/FB/wKiom1exd_WBYyzQAACkj5YoT_M619.jpg "title=" B.jpg " alt= "Wkiom1exd_wbyyzqaackj5yot_m619.jpg"/>
2, log on to the virtual machine, modify the virtual machine network card settings, the IP changes to 192.168.71.126, the gateway is 192.168.71.1, restart the network card service, ping the physical machine local IP 192.168.71.123 can ping through, Explain network interoperability (physical machines need to shut down the local firewall)
3, login to the virtual machine database, authorized new users and passwords can be accessed;
Example: authorizing all libraries and tables without limiting the source;
Mysql> Grant All on * * to ' yong ' @ ' percent ' identified by ' Yong ';
mysql> flush Privileges;
Actual production environment, authorized additions and deletions can be changed, and specify the database to access, specify the user and user source IP, restricted use;
Mysql> Grant Select,delete,update,create,insert on zabbix.* to ' test ' @ ' 192.168.71.123 ' identified by ' test123 ';
mysql> flush Privileges;
In the virtual machine can test the local, can log on;
[Email protected] ~]# mysql-utest-ptest123-h192.168.71.126
4, Windows Local installation MySQL client software navicat;
After installation, create a new connection, fill in the database IP address, user name and password, after saving, test the connection is OK.
650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M01/85/FB/wKioL1exeB7hixuOAABoaRIHqEo079.jpg-wh_500x0-wm_3 -wmp_4-s_3386454416.jpg "title=" 11.jpg "alt=" Wkiol1exeb7hixuoaaboarihqeo079.jpg-wh_50 "/>
After the successful connection into the database, you can query;
650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M00/85/FB/wKioL1exeKjRXYTOAAAaRDX6QAQ141.jpg-wh_500x0-wm_3 -wmp_4-s_3470648869.jpg "title=" qq20160815160901.jpg "alt=" Wkiol1exekjrxytoaaaardx6qaq141.jpg-wh_50 "/>
This article is from the "Model Student's Learning blog" blog, please be sure to keep this source http://mofansheng.blog.51cto.com/8792265/1838500
MySQL Client navicat Connection database