"Unable to select database" on all my sites (Please "Read more")

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
Anonymous's picture

I'm running 10-12 websites in a "multisite" configuration; the same error on all websites. Try customdigitaldecals.com or crabsr.us

Everything was fine until this morning. I was experimenting with CVS yesterday, but didn't touch (as far as I knew) the code that ran the effected sites.

Warning: mysqli_error() [function.mysqli-error]: invalid object or resource mysqli in /home/skirtcoa/public_html/includes/database.mysqli.inc on line 104

Warning: Cannot modify header information - headers already sent by (output started at /home/skirtcoa/public_html/includes/database.mysqli.inc:104) in /home/skirtcoa/public_html/includes/common.inc on line 141

Running Drupal 5.2 & MySQLi database

Comments

Maybe you made an update via

mlsamuelson's picture

Maybe you made an update via CVS and neglected to run update.php and now your database schema is out of sync with your code?

By the way, the first error notes the database issue - the second error simply lets you know that output (the first error message) was sent before the header info was sent to the browser. The first error is the one to work on - the other is just a side effect that will go away when the first is resolved.

Best of luck.

mlsamuelson

I ran update.php on the site, but no effect....

Doug Ouverson's picture

I did run update.php, but with no effect.

Any advise on how to get database schema in sync with my code? All the sites are effected the same, so it's got to be something simple.

Thanks-

========
Doug Ouverson

Got them working....

Doug Ouverson's picture

mysql prompt & commands:

"grant all permissions on mydatabasename.* to 'username'@'localhost' identified by 'password';" (same as when originally set-up database)
"flush privileges;"
"use mydatabasename;"
"show tables;"

cleared out browser cashe, and requested home page - that did it!

Don't have any idea why that worked. Just a hunch (and an answer to prayer - thanks be given where credit is due!)

========
Doug Ouverson

Multisite

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week