Quote:
Originally Posted by jddancks
After installing mysql-client and mysql-server I run
Code:
/usr/bin/mysql_install_db
I try to create the root against:
Code:
root@jdd:~# /usr/bin/mysqladmin -u root password '*******'
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
So what did I forget to do?
system is debian on old powerpc emac
|
Hi Jddancks,
Are you trying to reset the password using mysqladmin? If yes the syntax would be
Code:
root@yetwait:~# mysqladmin -uroot -p password 'Newpasswd'
Enter password: #Here you need to give the old password.
root@yetwait:~#
So after that you can login to the mysql using your new password
Or if you forgot the old password, you can reset with the help of below.
Code:
# /etc/init.d/mysql stop
# mysqld --skip-grant-tables --user=root&
# mysql
mysql> use mysql
mysql> update user set Password='' where User='root';
mysql> exit
# killall -9 mysqld
# /etc/init.d/mysql start
# mysql -p
Enter password:
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpassword');
mysql> FLUSH PRIVILEGES;
mysql> exit
Also please have a look at the following URL, that will help you to reset password
http://dev.mysql.com/doc/refman/5.1/...ss-denied.html
http://dev.mysql.com/doc/refman/5.1/...passwords.html