I have been through lots of forums and checked various posts on similar topic but non seems to work out for me.
I have freshly installed XAMPP 1.7.7 on my Ubuntu 11
Go to phpMyAdmin/config.inc.php
edit the line
$cfg['Servers'][$i]['password'] = '';
to
$cfg['Servers'][$i]['password'] = 'yourpassword';
This problem might occur due to setting of a password to root, thus phpmyadmin is not able to connect to the mysql database.
And the last thing change
$cfg['Servers'][$i]['extension'] = 'mysql';
to
$cfg['Servers'][$i]['extension'] = 'mysqli';
Now restart your server. and see.
At each point in these instructions, check to see if the problem is fixed. If so, great! Otherwise, continue.
#1045 - Access denied for user 'root'@'localhost' (using password: NO)
C:\wamp\apps\phpmyadmin3.5.1\config.inc.php
file, changing $cfg['Servers'][$i]['extension'] = 'mysqli';
to instead be= 'mysql'
This is convoluted, I know, but that's what worked for me. Some posts may say you need a password in the config file, but you don't. Mine is still ""
Hope this helps.
The problem might be with service mysql-server and apache2 running while system start. You can do the following.
sudo /opt/lampp/lampp stop
To stop already running default services
sudo service apache2 stop
sudo service mysql stop
To remove the services completely, so that they won't create problem in next system-restart, If you are in ubuntu(debian)
sudo apt-get remove apache2
sudo apt-get remove mysql-server
If you are in redhat or other, You could use yum
or similar command to uninstall the services
Then start the lampp again
sudo /opt/lampp/lampp start
Also, don't install mysql-server in the system, because it might start in system start-up, occupy the port, and create problem for mysql of lampp.
You can check it by connecting MySQL through the command prompt.
I think that your MySQL Database is blocked by firewall. Once stop all the services of antivirus software you have on your computer, then try to connect.
I faced this problem as well and rectified by blocking all firewalls..