Connecting to MySQLHere I use navicat to connect remotely. Before connecting to MySQL, you need to open the firewall port or close the firewall. Open Portsfirewall-cmd --add-port=3306/tcp --permanent // --permanent is permanently effective. Without this parameter, it will become invalid after restart. firewall-cmd --reload // Reload Turn off firewallsystemctl stop firewalld systemctl enable iptables // Set up boot firewall-cmd --reload // Reload Basic usage of firewalld Start: To shut down: Check the status: Disable at boot: Enable at boot: Systemctl is the main tool in CentOS7's service management tool, which integrates the functions of the previous service and chkconfig. Start a service: Shut down a service: Restart a service: Display the status of a service: Enable a service at boot: Disable a service at boot: Check View the list of enabled services: View the list of services that failed to start: Configure firewalld-cmd Check the version: View help: Show status: View all open ports: Update firewall rules: View zone information: Check Deny all packets: Cancel the deny state: Check whether it is rejected: Supplement: Docker deployment mysql remote connection solution 1251 reason:MySQL 8.0 uses the caching_sha2_password authentication mechanism by default, and the client does not support the new encryption method. Solution:Modify the encryption method of the user (root) step:1. Enter the mysql container [root@localhost ~]# docker exec -it javakfmysql bash ## javakfmysql is the alias of the container, you can also use the container id instead 2. Log in to mysql root@e285125c99d6:/#mysql -u root -p 3. Set user configuration items View user information mysql> select host,user,plugin,authentication_string from mysql.user; +-----------+------------------+-----------------------+------------------------------------------------------------------------+ | host | user | plugin | authentication_string | +-----------+------------------+-----------------------+------------------------------------------------------------------------+ | % | root | caching_sha2_password | $A$005$HF7;krfwhkKHp5fPenQm4J2dm/RJtbbyjtCUVdDCcboXQw3ALxsif/sS1 | | localhost | mysql.infoschema | caching_sha2_password | $A$005$THISISACOMBINATIONOFINVALIDSALTANDPASSWORDTHATMUSTNEVERBRBEUSED | | localhost | mysql.session | caching_sha2_password | $A$005$THISISACOMBINATIONOFINVALIDSALTANDPASSWORDTHATMUSTNEVERBRBEUSED | | localhost | mysql.sys | caching_sha2_password | $A$005$THISISACOMBINATIONOFINVALIDSALTANDPASSWORDTHATMUSTNEVERBRBEUSED | | localhost | root | mysql_native_password | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 | +-----------+------------------+-----------------------+------------------------------------------------------------------------+ Note: host is % which means no restriction on IP address. localhost means the local machine uses plugin other than mysql_native_password. Modify the encryption method ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '123456'; ### 123456 mysql login password flush privileges; Then check the user information mysql> select host,user,plugin,authentication_string from mysql.user; +-----------+------------------+-----------------------+------------------------------------------------------------------------+ | host | user | plugin | authentication_string | +-----------+------------------+-----------------------+------------------------------------------------------------------------+ | % | root | mysql_native_password | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 | | localhost | mysql.infoschema | caching_sha2_password | $A$005$THISISACOMBINATIONOFINVALIDSALTANDPASSWORDTHATMUSTNEVERBRBEUSED | | localhost | mysql.session | caching_sha2_password | $A$005$THISISACOMBINATIONOFINVALIDSALTANDPASSWORDTHATMUSTNEVERBRBEUSED | | localhost | mysql.sys | caching_sha2_password | $A$005$THISISACOMBINATIONOFINVALIDSALTANDPASSWORDTHATMUSTNEVERBRBEUSED | | localhost | root | mysql_native_password | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 | +-----------+------------------+-----------------------+------------------------------------------------------------------------+ 5 rows in set (0.00 sec) The above is my personal experience. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM. If there are any mistakes or incomplete considerations, please feel free to correct me. You may also be interested in:
|
<<: Getting Started Guide to Converting Vue to React
>>: How to use custom tags in html
vue implements the drag and drop sorting function...
1. Preparation before installation 1. Download th...
This article example shares the specific code of ...
Table of contents 1. Union Type 2. Crossover Type...
Read-only and disabled attributes in forms 1. Rea...
1. Cause: The effect after the subbox is set to f...
1. Download nginx [root@localhost my.Shells]# doc...
1. Create a test table CREATE TABLE `testsign` ( ...
Table of contents Jenkins installation Install Ch...
WeChat applet's simple calculator is for your...
Technology Fan html web page, you must know vue f...
Newer Linux distributions no longer have the rc.l...
Table of contents 1. Basic use of axio 2. How to ...
Table of contents 1. Digital Operation (1) Genera...
Download the latest version of MySQL for Ubuntu L...