Web Hosting Talk







View Full Version : Mysql Login Problem !!!


hoot
03-02-2002, 02:30 PM
Hi I am a stupid buyer of a plesk server with rackshack. The speed and server response has been ok but 3 times the CP became unaccessible with the error message 'unable to connect to mysql with admin@localhost using password:YES'
I contacted the support and the 1st 2 times they made it work again, but this time they told me that mysql was corrupted and that I had to get the server restored ...
Luckely I have only got about 70 sites on it for the moment ...
With phpmyadmin all the databases that are owned but other users then the admin are accessible, just the psa database that is not.
I have got all my customer info in this file so I need to at least be able to make a dump.
I've tried to make a dump using ssh but no luck. In the end i got it to ask for a password, I entered it and it refused it.
The support say that my admin user does not exist anymore and maybe the root neither. I have tried following the instructions o the mysql pages for when you have forgotten your password with no success.
Is there another way of getting the information without doing a dump, where does mysql store its information, is there a way of making another user have all permissions etc ...

Please help I've got to get the restore done as soon as possible !!!

hoot

bhalsted
03-02-2002, 02:36 PM
I searched the plesk forums and found this, it may help:



Login to mysql ./mysql -u admin -ppassword

Then change to the database,

use database;

Then run the command

REPAIR TABLE table;

That should work fine.

Paul

hoot
03-02-2002, 02:43 PM
Thanks but the problem seems to be that the admin user has either been corrupted or actually deleted so I can not login using admin and password !


Hoot

hoot
03-02-2002, 02:45 PM
When I do this, I get :
ERROR 1045: Access denied for user: 'admin@localhost' (Using password: YES)

bhalsted
03-02-2002, 03:15 PM
The password you are using, is it the same as in the /etc/psa/.psa.shadow file? this is where plesk stores the password it uses to log into the database. It is in plain text.

hoot
03-02-2002, 03:37 PM
This is what I have got in the etc/psa file :
psa.conf psa.conf.default psa.conf.saved_by_psa psa.key psa.key.default psa.key.saved.10.01;16:03

I haven't got a shadow file !

hoot
03-02-2002, 05:10 PM
Hi! I found the solution !
I found that all the mysql files where stored in /usr/local/psa/mysql/var

Each database is in a directory and they are in plain text (just a few squares inbetween each value!


Thanks anyway !

hoot