You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near \'localhost\' to database \'mysql\'\', do= \'\', task= \'\', link= \'/index.php?option=com_\' at line 1 SQL=UPDATE jos_fb_whoisonline SET time=\'1227174448\', what=\'DBI connect failed : Access denied for user \'\'@\'localhost\' to database \'mysql\'\', do= \'\', task= \'\', link= \'/index.php?option=com_fireboard&Itemid=77&func=view&id=2590&catid=4\', func= \'view\'\n WHERE userid=\'0\' AND userip=\'38.103.63.56\'
Welcome, Guest
Please Login or Register.
Lost Password?
DBI connect failed : Access denied for user ''@'localhost' to database 'mysql' (0 viewing)
Post Reply

TOPIC: DBI connect failed : Access denied for user ''@'localhost' to database 'mysql'

#2590
MichaelDaly (User)
Posts: 2
graphgraph
DBI connect failed : Access denied for user ''@'localhost' to database 'mysql' 2006/08/22 07:35  
Dear Forum
When in Webmin, if I try to access any of the 'Global Options' on the 'MySQL Database Server', the above message appears.

Its the same message if I'm in Virtualmin and tick the 'MySql database enabled' option when in 'virtual server details'

The user I am logged in as in webmin is 'root'

Any help here, please

Michael

  The administrator has disabled public write access.
#2596
Joe (Admin)
Posts: 4082
graph
Re: DBI connect failed : Access denied for user ''@'localhost' to database 'mysql' 2006/08/22 19:42  
Hey Michael,

You need to tell Webmin's MySQL module your username and password for the root account in MySQL (this is separate and possibly wholly different than your system root password).

Click on Module Config in the MySQL module to configure this.
  The administrator has disabled public write access.
#2631
MichaelDaly (User)
Posts: 2
graphgraph
Re: DBI connect failed : Access denied for user ''@'localhost' to database 'mysql' 2006/08/29 01:22  
Thanks Joe, it has worked

I think there is NO mysql admin password in my mysql setup; is it possible to set up a database password in this situation?

Sincerely
Michael
  The administrator has disabled public write access.
#2640
Joe (Admin)
Posts: 4082
graph
Re: Re: DBI connect failed : Access denied for user ''@'localhost' to database 'mysql' 2006/08/29 21:31  
I think there is NO mysql admin password in my mysql setup; is it possible to set up a database password in this situation?

Given this error, I suspect there is a root password set.

But, yes, you can certainly reset the password. From the command line:

# mysql -u root mysql

mysql> SET PASSWORD FOR root@localhost=PASSWORD('biglongpassword');
Query OK, 0 rows affected (0.06 sec)

If you've got a root password, but have forgotten it, you'll have to first stop/start mysqld with the --skip-grant-tables option:

# service mysqld stop

# mysqld --skip-grant-tables --user=root

And then run the above password setting command sequence.
  The administrator has disabled public write access.
#3859
BurtAdjoodani (User)
Posts: 5
graphgraph
DBI connect failed : Access denied for user ''@'localhost' to database 'mysql' 2007/02/21 13:19  
I have recently ran:

]]# yum clean all

]]# yum update

]]# ps -ef |grep sql
]]# kill -9 15409 15452 15682

]]# mysqld --skip-grant-tables --user=root &

mysql> UPDATE mysql.user SET Password=PASSWORD('newpwd')
-> WHERE User='root';
mysql> FLUSH PRIVILEGES;

----

And still I get:

DBI connect failed : Access denied for user 'root'@'localhost' to database 'mysql'

even when I went into "Module Config" in Webmin under
MySQL and set it to the new username and password.

-----

Info to help fix the issue:

]]# uname -a
Linux mail2.a1np.com 2.6.19-1.2288.fc5 #1 Sat Feb 10 14:52:17 EST 2007 i686 i686 i386 GNU/Linux

]]# rpm -qa |grep mysql
mod_auth_mysql-3.0.0-3
mysql-5.0.27-1.fc5
mysql-server-5.0.27-1.fc5
libgda-mysql-1.9.100-6.fc5
mysqlclient10-3.23.58-9.2
mysql-devel-5.0.27-1.fc5
libdbi-dbd-mysql-0.8.1a-1.2.1
php-mysql-5.1.6-1.2

]]# rpm -qa |grep min
wbt-virtualmin-nuvola-pushup-1.258-1
wbm-virtualmin-mailman-3.7-1
wbm-virtualmin-dav-2.3-1
wbt-virtualmin-nuvola-chocmint-1.258-1
wbm-virtualmin-svn-2.71-1
webmin-1.320-1
ust-virtualmin-nuvola-1.155-1
wbt-virtualmin-nuvola-dusk-1.258-1
wbt-virtualmin-nuvola-green-1.258-1
wbt-virtualmin-nuvola-1.258-1
wbt-virtualmin-nuvola-raspberry-1.258-1
usermin-1.240-1
wbm-virtualmin-awstats-2.6-1
virtualmin-base-1.0-38.rh
wbm-virtualmin-htpasswd-3.08-1
virtualmin-release-1.0-4.fedora
  The administrator has disabled public write access.
Post Reply
get the latest posts directly to your desktop

Talk and Get Help

Support
Forums
Bugs and Issues

Get Virtualmin

OS Support
Buy Online
Download
Copyright 2005-2007 Virtualmin, Inc. All rights reserved.