LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   MYSQL frustrations (https://www.linuxquestions.org/questions/linux-server-73/mysql-frustrations-677869/)

woodson2 10-20-2008 02:32 PM

MYSQL frustrations
 
Hello, I'm trying to connnect and configure the root password for mysql after a fresh install.
I've done the following

1. yum install
mysql-server mysql-administrator mysql mysql-gui-common php-mysql

2. service mysqld start

At this point from what I understand, the root mysql account should have no password set so I can either

A. connect to the database with mysql -u root. with this I'm getting the following error.

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

or I can set the root password with

B. mysqladmin -u root password 'newpassword' which yields the same error. I've searched tirlessly to resolve this on my own but everything I read says this only happens if you have set a password for root which I haven't done. Any help would be greatly appreciated..Thanks

forrestt 10-20-2008 02:39 PM

Follow the instructions here:

http://www.mydigitallife.info/2006/0...-mysql-server/

If that doesn't help, let us know.

Forrest

trickykid 10-20-2008 03:26 PM

Usually by default as root just run mysql without any options and it will log you into the database. Then setup a password for the root user or create another admin type user is the better way to go and disable the known root user it creates.

woodson2 10-21-2008 08:22 AM

Quote:

Originally Posted by forrestt (Post 3316812)
Follow the instructions here:

http://www.mydigitallife.info/2006/0...-mysql-server/

If that doesn't help, let us know.

Forrest

Thanks for your help, however I was able to fix the problem by deleting the /var/lib/mysql directory..Apparently it retains settings from previous installs.

trickykid 10-21-2008 10:52 AM

Quote:

Originally Posted by woodson2 (Post 3317543)
Thanks for your help, however I was able to fix the problem by deleting the /var/lib/mysql directory..Apparently it retains settings from previous installs.

Yup, that'll do it as well.


All times are GMT -5. The time now is 06:33 AM.