How to configure mysql server?

Daniel Buggie buggie at best.com
Thu Jun 22 19:18:37 UTC 2006


On Thu, 2006-06-22 at 17:38 +0100, Timothy Murphy wrote:
> Tom Brown wrote:
> 
> >> [tim at alfred ~]$ mysql -u root
> >> ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using
> >> password: NO)
> 
> > seems there is a MySQL root pwd set - in that case use
> > 
> > mysql -u root -pyourpasswordhere
> > 
> > or leave off the yourpasswordhere and it will prompt you for it when you
> > hit enter
> 
> I don't follow you.
> I haven't set the root password (or any password)
> and if it has been set I haven't the slightest idea what it is.
> 
> 

Odds are, it was set accidentally by yourself.  However, that is no
longer here nor there.

So try this:

service mysqld stop
cd /var/lib/
my mysql mysql.bak
mysql_install_db
service mysqld start

If that fails (I suspect it will), check the end of /var/log/messages
and look for mysql related selinux errors -- Based on your previous
output I suspect you probably have selinux set to enforcing. 

Turn it off with "setenforce 0" and try to start SQL once again.  If
that works then, either disable selinux permanently or use the output
from /var/log/messages to fix the files mysql_install_db created.

Daniel




More information about the fedora-list mailing list