MySQL Root Password
Does anybody have any insight?
4 Replies
shell_prompt> mysql -u root
mysql> SET PASSWORD FOR ''@'localhost' = PASSWORD('new_password');
mysql> SET PASSWORD FOR ''@'my_host_name' = PASSWORD('newpassword');
Check here -
Before you set the passwords, you need to have run the setup program (mysqlinstalldb) to build and initialse the grant tables Some distros (notably RedHat) run mysqlinstalldb during the install, some leave it to you to do it later (for example - Gentoo). Guidance here -
> /usr/local/mysql/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user: 'root@localhost' (Using password: YES)'
Any ideas?
Edit: Oh yes, that's using the command:
> /usr/local/mysql/bin/mysqladmin -u root password new_password
Try:
shell_prompt> mysql -u root -p
But just press [return] at the password prompt.