LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Big problem changed root password for mysql can't login pls comment (https://www.linuxquestions.org/questions/linux-software-2/big-problem-changed-root-password-for-mysql-cant-login-pls-comment-340584/)

johnnydangerous 07-06-2005 09:25 AM

Big problem changed root password for mysql can't login pls comment
 
I changed mysql root password and somehow now I can't login, i also deleted anonymous accounts how to deal with that, I tried restarting the server.. no luck so far

I used:

mysqladmin -u root password "my_new_password" <--- seems I should have used ' ' not " "...

I tried rpm -e all mysql stuff and reinstalled it and again it asks for that strange password I set ... I can't use it.

pls any tip will do :)

rylan76 07-06-2005 11:01 AM

I ran into exactly the same problem the first time I tried to install MySQL. I uninstalled it several times (I did not use RPM to install it, I installed from a binary package, so I just stopped it and physically went and deleted all its files and directories) and installed it again until I got it working as regards the root password.

What I would suggest is uninstall it (if you can - you say rpm -e doesn't work? I HATE RPM) then install it again.
When it is done installing, set your "root" MySQL password by doing:

[root@StefanLinux rylan]# mysql -u root mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3 to server version: 4.0.16-standard

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> set password for root@localhost=password('yourpasshere');

and afterward log into MySQL with

[root@StefanLinux rylan]# mysql -u root -p
Password: <type your password here>

If I remember right, the method you posted that you tried to use is the very same one that locked me out a few times as well.

Hope this helps!

Regards,

johnnydangerous 07-06-2005 02:44 PM

you hate rpm but use RedHat :) same here but I consider it more useful, but ontopic I can't do anything I don't have access to "root@StefanLinux rylan]# mysql -u root mysql"

rylan76 07-07-2005 10:16 AM

:)

Yeah I like RedHat distros but not their package system...

The fact that I was root (in my shell) doesn't affect the fix I suggested. The MySQL root user and the Linux shell root user are IMO two different things. You can still be a normal, non-root Linux user but have access to MySQL's root-level. (I think!)

Regards,

johnnydangerous 07-07-2005 05:06 PM

Quote:

Originally posted by rylan76
:)

Yeah I like RedHat distros but not their package system...

The fact that I was root (in my shell) doesn't affect the fix I suggested. The MySQL root user and the Linux shell root user are IMO two different things. You can still be a normal, non-root Linux user but have access to MySQL's root-level. (I think!)

Regards,

no question about that but that's not the point

rylan76 07-08-2005 01:22 AM

Well, the only workable fix I can then think off (if you can't get your installed MySQL to uninstall or otherwise remove it) is to re-install, but to make sure that in Anaconda you do NOT select to install MySQL, Apache, or PHP. Then, once the system is up, install from the source and binary tarballs for Aparche and PHP, and MySQL.


All times are GMT -5. The time now is 04:45 AM.