LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Sarge mysql-server Access denied for user: root@localhost (https://www.linuxquestions.org/questions/linux-software-2/sarge-mysql-server-access-denied-for-user-root%40localhost-324602/)

infinity432 05-18-2005 01:13 AM

Sarge mysql-server Access denied for user: root@localhost
 
I'm having trouble installing the mysql-server on debian sarge. I've run apt-get install mysql-server, and ran mysql_install_db. When I try to set the root password for the mysql root I get:

mysqladmin -u root password
error: 'Access denied for user: 'root@localhost' (Using password:NO)'

Any help would be appreciated. Thanks.

bathory 05-18-2005 06:06 AM

Run:
Code:

mysqladmin -u root password your-password
If that doesn't work then do it from mysql:
Code:

shell> mysql -u root mysql
mysql> SET PASSWORD FOR root@localhost=PASSWORD('new_password');

Regards

infinity432 05-18-2005 11:42 PM

I'm stupid I figured it out. Evidently I had previously set the mysql root password and trying to set it using mysqladmin -u root -p password gives an error because it is already set. I was able to log in using:
mysql -u root -p
Enter password:
And now it works fine. Too much late night programing.
Laters


All times are GMT -5. The time now is 10:36 PM.