Did you know LQ has a Linux Hardware Compatibility List?
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 04-23-2009, 10:13 PM   #1
LQ Newbie
Registered: Apr 2009
Posts: 1

Rep: Reputation: 0
Unhappy Php cannot connect to mysql, mysql client can

I have a problem with my live server.
Php can't connect to mysql.
I setup a test script and no matter what username and password I enter, I only get this error message:
Access denied for user 'root'@'localhost' (using password: NO)
I've googled far and wide, sorry I am not more informational

I've run mysqlcheck, restored my mysql database, restored my joomla database, reassigned root password, re-granted joomla access and re-written configuration.php
I've reinstalled mysql and php via yum
The only way I can get my joomla site back up is to run mysql with --skip-grant-tables, which is not something I want to do.

Please help me get to the bottom of this!
Old 04-24-2009, 02:22 AM   #2
Registered: Sep 2004
Location: Old York, North Yorks.
Distribution: Debian 7 (mainly)
Posts: 653

Rep: Reputation: 88
Seems like mysql does not recognise that you are using a password. Could you paste in the mysql_connect statement you are using? (with password replaced by s.t. like 'xxxxxxxxxx')?

Last edited by Robhogg; 04-24-2009 at 02:27 AM.


mysql, mysqld, php

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
can't connect php to mysql on RHEL5.0 in phpinfo page --without mysql is there vinayakbane Linux - Newbie 1 02-15-2009 12:47 AM
is there a client install for MySql so PHP can connect to MySQL Server? alar Linux - Software 8 07-03-2007 08:42 PM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. SpellChainz Linux - Newbie 1 06-23-2007 04:35 PM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 09:44 AM

All times are GMT -5. The time now is 10:37 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration