Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Mysql client navicat connects to the database

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Description of experimental environment:

Install vmware workstaion 11 on the local physical machine windows7 system, create a new centos6.6 system virtual machine and install LAMP environment;

Local physical IP: 192.168.71.123 Virtual machine IP address: 192.168.71.126

Objective:

Access mysql database in virtual machine in local windows;(it can be used by development department after test OK)

The specific steps are as follows:

1. Virtual machine settings: Virtual network editor selects bridging mode and bridges to the local NIC;

Virtual machine network connection: bridge mode, copy physical machine network status check;

2. Log in to the virtual machine, modify the virtual machine NIC settings, change the IP to 192.168.71.126, and the gateway to 192.168.71.1, restart the NIC service;ping the physical machine local IP 192.168.71.123 can be pinged, indicating network interoperability (the physical machine needs to close the local firewall)

3. Log in to the virtual machine database and authorize new users and passwords to access it;

Example: Authorize all libraries and tables without restricting sources;

mysql> grant all on *.* to 'yong'@'%' identified by 'yong';

mysql> flush privileges;

In the actual production environment, authorization can be added, deleted and searched, and the database to be accessed is specified, the user and the user source IP are specified, and the use is restricted;

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 local can test, can log in;

[root@localhost ~]# mysql -utest -ptest123 -h292.168.71.126

4, Windows local installation mysql client software navicat;

After installation, create a new connection, fill in the database ip address, username and password, save, test whether the connection is OK.

After successful connection into the database, you can query;

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report