Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

xampp phpmyadmin access denied error(#2002)

Hi everyone i had mysql server running on 3306. I uninstalled that completely and installed XAMPP. Mysql was not running at the beginning, then I changed the port to 3307 in my.ini as well as configuration of CP. It is showing status as running now but phpmyadmin is giving error as access denied. I tried so many solutions but didnt help. Someone please help me. Thanks in advance.

enter image description here

enter image description here

like image 458
rmn.nish Avatar asked Apr 09 '14 18:04

rmn.nish


People also ask

Why does phpMyAdmin show Access Denied?

After installing a local WAMP server and trying to access your phpMyAdmin, you may encounter the error: #1045 Access Denied for user 'root'@'localhost' (using password: YES). This may happen if your root@localhost database user was not granted the necessary rights to access the database.

How do I fix MySQL access denied error?

You will get this error when the user user_name does not have the right to access your MySQL database. To resolve the error, you must create a user with the following command: mysql> GRANT ALL ON *. * to user_name@localhost IDENTIFIED BY 'password';

How do I access phpMyAdmin in XAMPP?

In the basic configuration of XAMPP, phpMyAdmin is accessible only from the same host that XAMPP is running on, at http://127.0.0.1 or http://localhost. Before you can access the MySQL server, phpMyAdmin will prompt you for a user name and password. Don't forget to set a password for the user "root" first.

Why I Cannot connect to phpMyAdmin?

phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.


1 Answers

Try this.

Go to the directory where Xampp is installed. Lets call it xampp. Now open the file xampp/phpMyAdmin/config.inc.php in any text editor.

Now find this line

$cfg['Servers'][$i]['host'] = 'localhost';

and change it to

$cfg['Servers'][$i]['host'] = 'localhost:3307';

Note: If you are on Windows, xampp is by default installed in C:\xampp

like image 157
Sanketh Avatar answered Sep 19 '22 21:09

Sanketh