View Full Version : phpMyAdmin
dayjahone
30th September 2008, 16:43
I just changed my mysql password using
mysqladmin -u root -pcurrent_password password new_password
and now I can't login to phpMyAdmin at all. I tried using the client username and password, and I tried "root" and the mysql admin password. I tried "root" and the old password. What am I doing wrong?
till
1st October 2008, 00:53
Are you able to login with the "mysql" command on the shell?
dayjahone
1st October 2008, 01:18
I can log on just fine as the system user. When I try as root, I get the error:
ERROR 1045 (28000): Acess denied for user 'root'@'localhost' (using password: NO)
falko
1st October 2008, 14:30
Have you tried to restart MySQL?
dayjahone
1st October 2008, 16:27
I restarted mysql and I restarted the machine. I can now log in as root using the new password, but I am supposed to be able to login using my client login information as well, right? I am still not able to do that.
Is there anywhere else I need to change the password? I did the following:
mysqladmin -u root -pcurrent_password password new_password
then, to change it on the line $go_info["server"]["db_password"] = "new_password"; in /home/admispconfig/ispconfig/lib/config.inc.php
Another thing I notice is when I click to logout of phpMyAdmin it asks me for a username and password again and won't accept anything I give it. I eventually just close the window.
falko
2nd October 2008, 16:31
Do you see any MySQL errors in the syslog?
Does your new password contain any special characters?
dayjahone
2nd October 2008, 16:48
Where is the syslog?
There is one special character in the new password, but, like I said, I can log in as root, so I'm guessing that's not the problem.
dpakulski
2nd October 2008, 16:58
I think I know where the problem might be. You set password to mysql root account and before access from localhost was without any password. I'd advice to configure root account permission in mysql that password from localhost is not required. All should come back to previous state after that.
I can't give you now more precise instruction how to do it, but using man pages I suppose it should take 2-5 min to reset mysql root account permission to state that password from localhost is not required providing you know current root mysql password. :cool:
dayjahone
3rd October 2008, 09:40
Uh...so, how can I fix it?
falko
3rd October 2008, 13:13
Try this to set another password: http://www.howtoforge.com/reset-forgotten-mysql-root-password
dpakulski
3rd October 2008, 13:27
I would advice:
man mysql
man mysqladmin .. or
http://dev.mysql.com/doc/refman/5.1/en/default-privileges.html
dig a bit ;)
dayjahone
4th October 2008, 19:41
Falko, I tried to follow that tutorial, but got an error on the first step:
nohup: ignoring input and redirecting stderr to stdout
mysqld_safe[21759]: A mysqld process already exists
falko
5th October 2008, 20:57
Please stop MySQL first.
dayjahone
5th October 2008, 21:31
OK, now, I get the following:
nohup: ignoring inupt and redirecting stderr to stdout
Starting mysqld daemon with databases from /var/lib/mysql
mysqld_safe[5657]:started
It never gives me a mysql prompt though.
falko
6th October 2008, 16:21
Have you tried to connect to MySQL?
mysql --user=root mysql
dayjahone
7th October 2008, 16:19
After stopping MySql and trying again, I get this:
Access denied for user 'root'@'localhost' (using password: NO)
falko
7th October 2008, 18:42
Please make sure that MySQL has stopped (if there are MySQL instances that don't stop, you can use the kill command) before you try the tutorial.
dayjahone
8th October 2008, 08:14
When I try the tutorial I get the following:
# mysqld_safe --skip-grant-tables
nohup: ignoring input and redirecting stderr to stdout
Starting mysqld daemon with databases from /var/lib/mysql
mysqld_safe[6959]: started
...and it just hangs there.
If I try mysql --user=root mysql I get the following:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
till
8th October 2008, 08:23
...and it just hangs there.
Thats ok. Open another Linux shell as root user and enter:
mysql -u root
dayjahone
8th October 2008, 08:49
Help me out, please. This still isn't working.
mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.0.51a-3ubuntu5.1 (Ubuntu)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> update user set Password=PASSWORD('new-password');
ERROR 1046 (3D000): No database selected
mysql> mysql --user=root mysql
-> update user set Password=PASSWORD('new-password');
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysql --user=root mysql
till
8th October 2008, 08:57
Run:
mysql -u root
then in the mysql console run:
use mysql;
then run:
update user set `Password`=PASSWORD('new-password') WHERE User = 'root';
dayjahone
8th October 2008, 18:34
Thanks, Till.
I will try this later today. Will I then need to change the ISPConfig password? If so, where do I do this?
Thanks.
dayjahone
9th October 2008, 05:52
Thanks, Till and Falko. It seemed to have worked, but I still have the same problem: I can't login to phpMyAdmin as anything other than root.
I set up a client, gave it a username and password in the Client Login tab and tried to use that username and login with phpMyAdmin with no luck.
falko
9th October 2008, 19:10
Do you see any error messages when you restart MySQL?
dayjahone
9th October 2008, 22:20
No. It seems to be fine. Again, I can login fine as root.
falko
10th October 2008, 15:38
Can you log in to MySQL with a username other than root on the command line?
dayjahone
10th October 2008, 16:16
Sorry, how do I do that?
falko
11th October 2008, 19:50
mysql -u <username> -p
Replace <username> with the MySQL username.
dayjahone
11th October 2008, 20:31
No luck. I get the following error:
ERROR 1045 (28000): Access denied for user 'clientusername'@'localhost' (using password: YES)
I was able to log into ISPConfig as a client without trouble.
falko
12th October 2008, 18:21
The MySQL usernames are something like web1u1 and have nothing to do with the ISPConfig logins.
dayjahone
12th October 2008, 18:29
That would explain the whole mess. So is there a way for a client to log in to phpMyAdmin and adjust all of his databases or does it have to be done on an individual database basis?
till
12th October 2008, 19:01
A client can create databases trough ISPConfig. The username for this database is displayed then in ISPConfig and he has to use this username to access the database e.g. with phpmyadmin. Usernames for databasses can only be changed by the mysql root user in phpmyadmin.
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.