Get the App
SLTechnology News&Howtos  ›  Database  › 

Mysql client navicat connects to the database

Shulou Source: shulou.com Published: 2022-06-01 05:59:04 10月25日 Update

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;

Tags: Data database physical user network environment network card test login address password source mode system experiment restriction customer client success example Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia macOS Huawei Linux Shulou Tech Info