Reputation: 131
I am having problems to access the phpmyadmin installed on the hostserver. I have installed the phpmyadmin there and when i set the user as "root" and leave the password space blanked at http://192.254.143.28/phpmyadmin/,
it gives me an error. The screen shot is as below
as mentioned in this article i have configured the /etc/phpMyAdmin/config.inc.php
to $cfg['Servers'][$i]['AllowNoPassword'] = TRUE;
but still it doesnt work.
It changes the screen as this tough
Upvotes: 0
Views: 1089
Reputation: 32260
Error code #1045
is for wrong login, but #2002
is cannot connect, means, wrong host name in config file of phpMyAdmin.
Check the config for bind-address
- when set to 127.0.0.1
(default), you should be able to login ($cfg['Servers'][$i]['host']
) using 127.0.0.1
or localhost
, try both.
phpMyAdmin recognizes localhost
as host and local unix sockets.
If all fails, find out your real MySQL root
password, which shouldn't be empty. Then try to login from console using mysql -u root
. If it works, then there is a problem with the host.
You can turn off the controluser which is not necessary.
Update:
Your MySQL server is not running.
Look into /var/log/syslog
, it should contain a reason or try to start it by:
service mysql start
or
/etc/init.d/mysql start
or
/etc/init.d/mysqld start
Upvotes: 1
Reputation: 6134
if you're getting #2002
Cannot log in to the MySQL server when logging in to phpmyadmin, try editing phpmyadmin/config.inc.php and change:
$cfg['Servers'][$i]['host'] = 'localhost';
to:
$cfg['Servers'][$i]['host'] = '127.0.0.1';
http://blog.ryantremaine.com/2011/03/2002-cannot-log-in-to-mysql-server.html
like this:
Right-click My Computer -> Manage -> Services
Choose "Services" under the "Services and Application" from right pane
Then search for the "Zend Development" Service.
When you find it, double click to start that service.
update:1
The problem was that the /etc/mysql/my.cnf was writable by another user than 'root'. So during the installation of mysql, the file was ignored and the installation didn't worked well.
chmod 644 /etc/mysql/my.cnf
aptitude remove mysql-server
aptitude install mysql-server
aptitude install mysql-common
Upvotes: 0