Error when trying to set Admin password in MySQL


 
Thread Tools Search this Thread
Top Forums Web Development Error when trying to set Admin password in MySQL
# 1  
Old 06-13-2010
Error when trying to set Admin password in MySQL

I'm trying to set an admin password for MySQL using the following command:

$ /usr/local/mysql/bin/mysqladmin -u root -p new_password

But, I get the following error message?

/usr/local/mysql/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: YES)'

What should I do to set the admin password?

Thanks.
# 2  
Old 06-16-2010
That's not the command to set the root password, just the command to login with mysqladmin and run the command new_password (which probably isn't a command at all).

To set the root password in mysql, login as root with mysql -uroot -p, then follow this syntax to change the password.

If you do not have the current root password you'll need to follow this procedure to reset it. It involves running the mysql daemon in a special 'safe mode'.
# 3  
Old 06-16-2010
Also, by default mysql does not assign a password to the root user. i.e. it's empty.

Code:
mysql -u root

Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Solaris

help reset netra T1 lom admin password

Can someone please help here on how to reset a T1 lom password? I have tried the JP13 an try to find lom.conf in scadm dir but lom.conf is not on the machine ,some help thanks (1 Reply)
Discussion started by: rafise
1 Replies

2. Solaris

Recover Admin Password

Dear All Users I have two doubts please any one clarify my doubts 1. In solaris As a admin i've forget my password so how could i know whats my password 2. if someone change my password so how could i rectify my password. Please can anyone solve my doubt with clear steps (2 Replies)
Discussion started by: suneelieg
2 Replies

3. Solaris

How to recover Admin password

Dear all I have two doubts please clarify my doubt with clear steps 1. As a admin i forget my password how could i know whats my password. 2. If someone change my password how could i rectify that Please give me reply. with clear steps (0 Replies)
Discussion started by: suneelieg
0 Replies

4. Gentoo

help|how to rest my password admin(root)

i have gentoo and i dont know what is my password user admin(root) how i can to rest my passord? thanks. (2 Replies)
Discussion started by: turivnkl
2 Replies

5. UNIX and Linux Applications

set mysql password with host parameter

hi, linux gurus... i'm trying to write a script in ksh called ResetPass that allows a user to change mysql passwords. the script accepts user, password and host like this: ResetPass <user> <password> <host>. here's the code: ***************************************************** mysql... (1 Reply)
Discussion started by: ankimo
1 Replies

6. Solaris

How to reset SC admin password in Netra T2000 server?

I have one Sun Netra T2000 Server. The ALOM SC admin password of this server is not known. Could you anyone help and tell me how can i reset the SC admin account password?? Thanks in advance.. (2 Replies)
Discussion started by: sudhir_shet
2 Replies

7. Solaris

Resetting forgotten admin password

How do you reset a forgotten administrator password in unix on a Sun Sunblade 100? :mad: (1 Reply)
Discussion started by: mehow
1 Replies

8. Cybersecurity

Web site Security WRT MySql - how set up?

Hiya all, Newbie here - hope you can help Trying to set up a login authorization on my website. Reading away - it says works well with MySql database. Apache book goes onto to explain how to install Mysql etc.... But How do I set up the login page tho? Please assist Cheers... (5 Replies)
Discussion started by: marty 600
5 Replies
Login or Register to Ask a Question