Mysql cannot log in remotely [red packet]

firewall, the integrated environment of system Centos7, lnmp.org, does not have the permission to run
mysql. Iptables has been restarted. Refresh authorization
error:

clipboard.png

Mysql user:
clipboard.png
Iptables:

clipboard.png

clipboard.png

New processing:
1. Modify mysql configuration file
vi / etc/my.cnf
[mysqld] paragraph plus skip-name-resolve

2. Modify hosts.allow
vi / etc/hosts.allow
mysqld: ALL: ALLOW
mysqld-max: ALL: ALLOW

still hasn"t solved

Feb.28,2021

try it.
vi / etc/hosts.allow
mysqld: ALL: ALLOW
mysqld-max: ALL: ALLOW


View firewall status: systemctl status firewalld

check to see if the firewall is off first.

View selinux status: sestatus

if you want to close selinux, read this article http://www.orcs.cc/post/6.html

try again after closing.


normally
1. Set the mysql host table to allow ip login
2. Firewall is off
3. If you are a CVM such as Aliyun, then it closes the port by default, so you should open
4. After the above setting, see if the, telnet ip port is accessible


you may try the following actions:
use phpmyadmin
to create or modify a user and give the user remote login permission, that is, the host value is%


whether Aliyun bought it and needs to add a secure port


.

maybe your mysql is bound to an IP address such as 127.0.0.1

.
netstat -antp | grep 3306

look at the output

see

https://stackoverflow.com/a/3.


if it is Aliyun, go to Aliyun backend to open the port


Hello. Ariyun has a security group setting in server security. You need to set the mysql port in the security group before you can link remotely


    .
  1. timeout setting problem;
  2. there is a problem with the maximum connection setting;
  3. Authorization issues;
  4. mysql server and user rights issues
Menu