LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Problem setting root password after reinstalling mysql (https://www.linuxquestions.org/questions/linux-newbie-8/problem-setting-root-password-after-reinstalling-mysql-504200/)

Venkatesh_cts 11-23-2006 07:21 AM

Problem setting root password after reinstalling mysql
 
Hi All,
I'm new to linux and am using SuSe 10 Beta version. I installed MySQL 5.0.27 previously and later uninstalled it. Now when i try to reinstall using the same RPMs, it gets installed. But I'm unable to set the root password using "mysqladmin -u root password" command. Can someone help me on this?

Thanx in advance

Venkatesh

odcheck 11-23-2006 07:25 AM

what is the error message
what shows rpm -qa | grep mysql*
is mysqld running?

Venkatesh_cts 11-23-2006 07:31 AM

mysqladmin: unable to change password; error: 'Access denied for user ''@'localhost' to database 'mysql''
This is the exact error msg shown.

odcheck 11-23-2006 07:38 AM

mysqladmin -u root password PaSsWoRd
if your are not started mysql console as root like root@localhost#mysql [enter]
but if you're unix root and you can gain access to the mysql console
then try
Code:

# mysql -u root mysql
mysql> UPDATE user SET Password=PASSWORD('newrootpassword') WHERE User='root';
mysql> FLUSH PRIVILEGES;


Venkatesh_cts 11-23-2006 08:05 AM

The moment i say mysql -u root mysql,

It says ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'mysql'


All times are GMT -5. The time now is 06:29 PM.