I am trying access remotely the mysql from different machine in my local machine. When i gave the following command mysql -u root -p
i got the following error ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
. $cfg['Servers'][$i]['host'] = 'localhost';
This is the code in config.inc.php. Is it so the root user have to grant me the permission for accessing the db remotely?
-
1I doubt we can help you with this. Ask the admin to provide access for user root and your password.– RinzwindCommented Sep 3, 2019 at 11:17
-
@Rinzwind According to askubuntu.com/a/1171947/250300, this is the solution. Consider posting an answer.– MelebiusCommented Sep 9, 2019 at 12:08
-
Ok I will post this in separate question– tweetyCommented Sep 9, 2019 at 13:48
2 Answers
You have to do something like mysql -u root -p -h example.com/orIPAddress
There are also chance of mysql root password is not set on remote machine so also in this situation you will not able to connect.
Another way is to create a mysql tunnel as shown in Link but it shows how to dump mysql db but except this you have to just login.
I got the username and password for accessing phpmyadmin remotely. But now i got the other problem. Cannot log in to the MySQL server
-
Please do not post follow-up problems in answers. Rather start a new question. Make sure to post the error message as text, screenshots are supplemental.– MelebiusCommented Sep 9, 2019 at 12:09