Access Denied Error Connecting to Remote mysql with phpmmyadmin

Asked 1 years ago, Updated 1 years ago, 112 views


in CentOS (1—Remote server) mysql
(2:local server) phpmyadmin
Configuring the server configuration (TCP connection).

(2) includes php, php-mysql, and apache.
The phpmyadmin login screen appears, but enter your username and password and [Run]After pressing the button, the error "Cannot log in to MySQL server" appears.

If you look at (1)'s mysqld.log, you can see

2017-04-03T10:52:40.593052Z11 [Note] Access denied for user' '@'gateway' (using password: YES)

The log appears.Why and where do I set this 'gateway'?

I think I have modified and reviewed the setting of /etc/phpMyAdmin/config.inc.php in (2).

Please let me know if anyone knows.

mysql phpmyadmin

2022-09-30 14:30

2 Answers

When you create a MySQL user, you must specify the host from which you want to connect.
Only connections from the specified host are allowed.
You can use a wildcard (%_) for the host name, so you can also:

CREATE USER'myname'@'%.mydomain.com'IDENTIFIED BY'mypass';
CREATE USER 'myname' @'192.168.0.% 'IDENTIFIED BY'mypass';
CREATE USER 'myname' @'%'IDENTIFIED BY 'mypass';


2022-09-30 14:30

The "@" of the user in the server-side log is followed by the host name of the access source as seen from the server.


2022-09-30 14:30

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.