Unable to connect

Hi team ,

we unable to connect the MySQL database. pls suggest .

Please find the screenshot for your reference.

You’re username or password is wrong. You are successfully connecting to MySQL, but the username and/or password you are providing is wrong.

I change & with new password i can able to connect . please refer the below screenshot

1 Like

Hi
in the Linux system getting connected but GUI (from remote site graphics interfaces its not getting connected .
getting same error

Please advise

1 Like

A user in MySQL is the combination of the username and the source host. Make sure you have created the user with correct source information.

CREATE USER matthew@10.10.11.11 ... <— this user can only connect from host 10.10.11.11

How did you create this user?

Hi
Thanks for your response
I recently joined in these project
Users was already exists
Please let me know the steps to check privilege’s of that remote IP
Also let me know the command to connect the MySQL database via that remote IP
Thanks in advance

Below are the steps wic i done but still i a getting unable to connect from remote site .

MariaDB [(none)]> alter user ‘belharra’@‘10.50.99.186’ identified by ‘Pass#1234’;
Query OK, 0 rows affected (0.001 sec)

MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.000 sec)

MariaDB [(none)]> grant all privileges on . to belharra@‘localhost’ identified by ‘Pass#1234’;
Query OK, 0 rows affected (0.001 sec)

MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.000 sec)

MariaDB [(none)]> show databases;
±----------------------+
| Database |
±----------------------+
| escmdata_hermes |
| escmparameters_hermes |
| habilitation_hermes |
| information_schema |
| my |
| mysql |
| performance_schema |
| portail_hermes |
±----------------------+
8 rows in set (0.001 sec)

MariaDB [(none)]> show grants for ‘belharra’@‘10.50.99.186’;
±-------------------------------------------------------------------------------------------------------------------------------------+
| Grants for belharra@10.50.99.186 |
±-------------------------------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON . TO belharra@10.50.99.186 IDENTIFIED BY PASSWORD '7713249E784B97D78E11E8404818816F305F806D’ WITH GRANT OPTION |
| GRANT SELECT, INSERT, UPDATE, DELETE ON db.
TO belharra@10.50.99.186 |
| GRANT ALL PRIVILEGES ON mysql.* TO belharra@10.50.99.186 WITH GRANT OPTION |
| GRANT ALL PRIVILEGES ON escmparameters_hermes.* TO belharra@10.50.99.186 |
| GRANT ALL PRIVILEGES ON habilitation_hermes.* TO belharra@10.50.99.186 |
| GRANT ALL PRIVILEGES ON escmdata_hermes.* TO belharra@10.50.99.186 |
| GRANT ALL PRIVILEGES ON portail_hermes.* TO belharra@10.50.99.186 |
±-------------------------------------------------------------------------------------------------------------------------------------+
7 rows in set (0.000 sec)

Can anybody help me to resolve this issue.

Thanks

1 Like

The user belharra can only connect from either the local mysql server, or from 10.50.99.186. That’s it If you want to connect from another machine, you need to create a new account on MySQL using the new IP. You can also create the user like this CREATE USER 'belharra'@'%' IDENTIFIED BY '<password>' which will allow connections from any remote IP.

1 Like

Hello Thanks for your response.

But belharra users already exists.

Please let me know how we can allow the existing user & what are the steps require to resolve

Thanks

1 Like

As I said above, a “user” in MySQL is the COMBINATION of username + IP. These are TWO DIFFERENT users in MySQL:

user#1: CREATE USER 'belharra'@'192.168.1.1' IDENTIFIED BY 'myPassword';
user#2: CREATE USER 'belharra'@'10.11.13.22' IDENTIFIED BY 'myOtherPassword';

As I already said above, you need to create a NEW user using the IP address of the source machine. Look at your screenshot for a hint to this IP.

1 Like