Support Forum

errorlog shows something about mysql_ping()

22 Answers

New Answer

DR Debra Reed
Debra Reed
Member

My host replied with,

“Access denied for user ‘root’@’localhost’ (using password: NO)”
Your script should not be trying to access the database as root but as the database user and that with the password.”

I have no idea how to make this fix. Appreciate any help you can provide from this point.

MP Mr Papa
Mr Papa
Member

the script they are referring to would be wp…  wp controls the accesses to the db…  do you have your wp config file set up to try to use root user for mysql???  it should not…  you should have a mysql user set up for giving to wp for mysql access…

YS Yellow Swordfish
Yellow Swordfish
Member

Well it wouldn’t be from a WP script directly if it is the mysql_ping() call. But… mysql_ping() uses the current database connection which – as Mr Papa rightly points out – is whatever you have in your wp-config.php file. This should not be set up for the ‘root’ user.

If the current connection as dictated by the wp-config.php is NOT using the ‘root’ user then this begs the question why does mysql_ping() think it is? I suggests that something else is opening a connection as ‘root’ thus making it current. And that makes absolutely no sense whatsoever and still, I believe, needs to be addressed by your host support which clearly has not really understood the situation.

DR Debra Reed
Debra Reed
Member

Thanks for your responses. 

wp-config.php is setup for my normal WP database user. 

My host says I require too much expert support from him, and I am moving soon to managed WP hosting.  Before I ask him and get the “hire an expert” response, do you think setting up cPanel automatic backups could cause this issue you described … “something else is opening a connection as ‘root’ thus making it current”?  Host set up cPanel automatic backups same day as this error began, so thought maybe there could be a connection.

Also, do not know if this is related to “link to server” issue, but soon after installing Simple: Press I also get lots of these warnings, “PHP Warning:  mysql_error(): 19 is not a valid MySQL-Link resource in /…/wp-includes/wp-db.php on line 1212”.

Definitely not pointing a finger at SP, because just before installing SP host “expanded the cloud and moved us to new and better datacenter”.  It’s been one problem after another ever since.  So I am not sure what the true culprit is.

MP Mr Papa
Mr Papa
Member

its possible…  afraid I dont know if cpanel by default uses the root user or a separate mysql user…  certainly worth a question to the host…

even if you dont move to managed hosting (is this shared hosting?), seems like a change would be in order, if you ‘ask too many questions’…  lol, sorry, would wonder about the host… ;)

the additional mysql error is likely for same thing – mysql server going away…

its certainly possible sp is using more mysql than they like (not a general issue of course), but we certainly dont access the db as root… like any other plugin we just use the wp connection info…

YS Yellow Swordfish
Yellow Swordfish
Member

and the second error (post #19) is actually in WordPress core. Like Steve I wouldn’t like to say if cPanel backup could be interfering at all but I do think it will come down to the mySQL server install and configuration in one way or another.

DR Debra Reed
Debra Reed
Member

I relayed all of this information to host and he said, “I know what the Simple Press people are saying but the logs are saying the script is trying to access the MySQL server as root.”

What I understood you to suggest was that something else is already connected as root and therefore the script is basically “ignoring” my wp-config user settings and trying to access as root.  Correct?  If so, seems host isn’t understanding this or maybe I completely missed your point.

More info in case it may be related …
I am on VPS hosting (4 CPU, 8G RAM). We use Digital Access Pass membership plugin and have 30,000+ “free” members in DAP, 6700+ in WP users (numbers are so different because had to wipe WP users at one point … so 6700 is more accurate number of active free users).  Paid members receive access to our web-app (outside of WP) but they get connected via the permissions from DAP.  We recently added APC to help speed things up as well as configured W3 Total Cache (W3 Edge team configured for me).  However, it seems there is just an underlying issue causing these errors, 504s while working with WP-Admin, random 404s, etc.

I have tried several forums (VBulletin, bbPress, etc.) but SP is the only one that has worked almost seamlessly/effortlessly for me with DAP (YEAH!!!).  I do not have anything special configured between DAP/SP.  User gets free access via DAP, becomes a WP user, and therefore gets access to SP.  All registering/account info is initiated and handled via DAP.  Works GREAT and I am determined to keep SP.  I haven’t tested recently, but previously deactivating SP removes this particular error. That doesn’t really point a finger at SP though, does it?  Seems to me like SP is just revealing that something else is going wrong via this error, correct? 

Seeing as I have NO understanding of any of technical stuff, it seems I am at the mercy of the host to help resolve. But the finger just gets pointed back to DAP, web-app, APC, SP, etc.  I have had all of these dev’s investigate to come to same conclusion… “talk to the host”.  His response as of late is that this is my server and my responsibility to troubleshoot/fix.  I hope to get moved to managed WP hosting soon because I have not a clue how to do this beyond the help I have sought from devs.

My server is currently connected to NewRelic monitoring service (http://newrelic.com) so devs can see more info.  We know my web-app needs to move to separate server because it is pulling too many resources, so this is our first step to take before I can move WP to managed hosting.  I do not know how to read much of the info at NewRelic, but if that would be helpful for you to see, I can send you login info so you can view.

I do not want to waste your time if this isn’t a SP issue.  Any further recommendations from the SP side of things?  Any other directions I should seek out prior to migration to new host?  If not, I will hold tight til new hosting is established and then see where to go from there.

Sorry for such long details.  Just want to put it all out there in case it’s helpful. Thank you so much for your time!

YS Yellow Swordfish
Yellow Swordfish
Member

What I understood you to suggest was that something else is already connected as root and therefore the script is basically “ignoring” my wp-config user settings and trying to access as root.  Correct?  If so, seems host isn’t understanding this or maybe I completely missed your point.

That was exactly my point. You got it 100% right.

The bottom line is that you seem to be having mySQL problems in both WordPress and a WordPress plugin like Simple:Press. I am still convinced that this is a configuration issue. Of course i might be wrong – bit I am not wrong about SP behaving itself when addressing the database.

I really do think your best course of action is to wait until you have things set up with your new hosting and that will be the time to take stock of the situation  and see of this issue has just gone away or is more deeply rooted.

And no puns intended there I promise!