View Full Version : MySQL Issues
28th December 2006, 10:28 PM
So I did what I thought would install mysql. I did 'yum install mysql-server mysql-administrator mysql mysql-gui-common' Now when I try to connect to the server (by merely putting in 'mysql' into the command line) I get the following error:
ERROR 1045 (28000): Access Denied for user 'root'@'localhost' (using password: NO)
Any ideas? Or maybe how to wipe mysql off the disk and start anew? I'm a noob so any advice would be a big help.
29th December 2006, 05:44 AM
The initial MySQL accounts are a bit tricky. I think you have to reset a password, like the docs say (http://dev.mysql.com/doc/refman/5.0/en/default-privileges.html). You can also reset the password with various methods, SET PASSWORD, skipping the grant tables, etc. (http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html)
29th December 2006, 01:14 PM
By default the server doesn't run after you install it. To check to see that MySQL is running, do this from the root command line:
service mysqld status
If not, use the service and chkconfig command to start it, and have it start on bootup.
29th December 2006, 02:26 PM
to wipe mysql off (bearing in mind you will lose any data) delete the contents of /var/lib/mysql
rm -rf /var/lib/mysql/
then service restart mysqld
mysql should start as a default install without setting passwords however it is a good idea to set these from the off
shell> mysql -u root
mysql> SET PASSWORD FOR ''@'localhost' = PASSWORD('newpwd');
mysql> SET PASSWORD FOR ''@'host_name' = PASSWORD('newpwd');
29th December 2006, 10:46 PM
Thanks! I ended up wiping it off, restarting it, and it works fine now.
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.