I really need help to fix this error, because next Monday is my final year project presentation, please. I don't know how to fix this.
I've try to follow this http://www.ishaanrawat.com/solved-wampserver-1045-access-denied-for-user-rootlocalhost-using-password-no/ instruction, but I get the same error.
And, a few minute ago, I uninstall wamp sever, in hope after installing it again, I can use my wamp server normally, but still the same error.
Below is the error:
MySQL said: Documentation
1045 - Access denied for user 'root'@'localhost' (using password: NO)
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.
You can watch to solve your problem
http://www.youtube.com/watch?v=BgcW4h6ZAro&t=7m21s
p/s: this is Vietnamese video :)
in config.inc.php
you edit folowing code:
* First server
*/
$i++;
/* Authentication type */
$cfg['Servers'][$i]['verbose'] = 'mysql wampserver';
//uncomment this
$cfg['Servers'][$i]['auth_type'] = 'cookie';
//comment this
//$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
/* Server parameters */
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysql if your server does not have mysqli */
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
then exit wampserver, reopen wampserver, open PHPMyadmin, you'll show login form :)
This worked for me. Prior to installing WAMP, I had MySQL installed in my computer. The password required to open the MySQL command line client was, let's say "pw". Now, after installing WAMP, it gave the same error as your when I tried to open phpMyAdmin. How to fix this:
- Open C:\wamp\apps\phpmyadmin4.1.14\config.inc.php
Locate these lines:
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
/* Server parameters /
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/ Select mysql if your server does not have mysqli */
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
Change " $cfg['Servers'][$i]['AllowNoPassword'] = true;
" to " $cfg['Servers'][$i]['AllowNoPassword'] = false;
".
Change " $cfg['Servers'][$i]['password'] = ''
" to " $cfg['Servers'][$i]['password'] = 'pw'
". (Remember to put your password instead of 'pw
' ).
Restart all services in WAMP and try opening phpMyAdmin again.
Hope it works now!
Go to phpMyAdmin folder inside of XAMPP or WAMPS server and open config.inc.php file. And Change username and password to set in your db.
/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Lang'] = '';
u first change the "AllowNoPassword" value to false in config.inc.php.
then set password for root then login to phpmyadmin.
Remove xampp and install mysql,phpmyadmin,php5, apache2 manully.
sudo su
apt-get install mysql-server mysql-client
apt-get install apache2
apt-get install php5 libapache2-mod-php5
apt-cache search php5
Pick the ones you need and install them like this:
apt-get install php5-mysql php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl
apt-get install phpmyadmin
service apache2 restart
- then open
http://127.0.0.1/phpmyadmin/
These upper commands will make your xampp server. It will resolve your problem quickly and worked very smoothly.
thanks to related articles:
- Ubuntu 14.10 LAMP server tutorial with Apache 2, PHP 5 and MySQL (MariaDB)
- How do I change the root directory of an apache server?