Cannot set password To mysql Freebsd 7.2

Hi all,
I have problem with mysql..
i have install it but when i set password with
Cmds: mysqladmin –u root password (new Password)

the machine say:
Code:
mysqladmin: can't connect to server at 'localhost' failed
error: access denied for user 'root'@'localhost' (using password: no)

why? i reinstall mysql but he say this error...


sorry for my english..
 
Code:
/usr/local/etc/rc.d/mysql-server stop
mv /var/db/mysql /var/db/mysql_old
/usr/local/etc/rc.d/mysql-server start
/usr/local/bin/mysqladmin -u root password 'newpass'

Or you can restart mysql with
Code:
--skip-grant-tables
option and reset password.
 
You probably haven't started the mysql server yet, and before that you have to enable it in /etc/rc.conf. As your primary error message was that it couldn't connect. So add mysql_enable="YES" to /etc/rc.conf and then start the server with
Code:
/usr/local/etc/rc.d/mysql-server start

Then you can update your password either from the mysql shell or the mysqladmin tool.
 
VoViK said:
Code:
/usr/local/etc/rc.d/mysql-server stop
mv /var/db/mysql /var/db/mysql_old
/usr/local/etc/rc.d/mysql-server start
/usr/local/bin/mysqladmin -u root password 'newpass'

Or you can restart mysql with
Code:
--skip-grant-tables
option and reset password.

thanks man! now work!
 
Back
Top