Jump to content

[Solved] I Got 99 Problems.... And They're All In My Database. I Hope.


JpTiger

Recommended Posts

Hey there, I'm using the account jptsndbx on JOHNNY as a sandbox to test simple client sites before I make them on client servers. I've got a (thankfully very patient) client who wants to see the site I made for them ages ago, but I can't get the thing to load-- every time I try to load anything from the wordpress install I get "Error establishing a database connection."

 

At first I thought it was the SQL server going down for a bit and that it'd be okay again the next day, but it's now been almost a week. So I started tinkering a bit and realized it's not just that site, but also another small wp install in a different folder, and a mediawiki site that are all giving database errors. So I went in to phpMyAdmin to see what was going on under the hood and... well, I can log in, but once I do, I just get a blank screen. Nothing after that.

 

Any ideas how to fix my database (or whatever is causing this?)

 

------------------------

EDIT 9/16/15: The problem has been solved, for those who don't want to read the whole thread and are having similar symptoms, try the following:

 

1. Log into your cpanel, and change your cpanel password (you can even change it back immediately after if you like)

2. Log into the MyPHPAdmin (cpanel credentials) to make sure it's now working.

3. Go to your MySQL admin panel in cpanel, note down which users have privleges to which databasses. You're going to be deleting and recreating all of these users next, so get their passwords if you can easily do so.

3a. If you're using WordPress and don't know where to find the passwords to the MySQL users, check the root of your WP folder for something called wp-config.php-- it'll have the username and password for that installation.

4. Delete the users, and recreate them exactly using the same passwords and at least the same privileges.

 

Your site should now be working.

Edited by JpTiger
Link to comment
Share on other sites

  • 1 month later...

The databases listed should now be visible to your root mysql account. You may need to delete, recreate, and reassign permissions to any database users that should have access to the affected databases. Let us know if you're still having any issues accessing your data.

Link to comment
Share on other sites

Thank you! I'm still having trouble though. I still can't access the database. Logging in through phpmyadmin yields a blank page.

 

More worryingly though, on the mysql databases panel in Cpanel, all the databases are now listed as 0.00MB in size. Did they get wiped out somehow? None of the data was valuable, but if it's gone and there's a way to recover it, I'd appreciate a way to try.

Link to comment
Share on other sites

Thanks. Yeah, just tried on a different PC on a different operating system and using a different browser. Same errors on all counts.

 

If the database is gone, I'm okay just wiping everything and starting over. But if there's a reasonable chance to recover it, that would save me a lot of time and trouble. What do you guys think?

Link to comment
Share on other sites

Your data is all there:

# mysql --database="jptsndbx_wiki" --execute="show tables"
+-------------------------+
| Tables_in_jptsndbx_wiki |
+-------------------------+
| archive                 |
| category                |
| categorylinks           |
| change_tag              |
| externallinks           |
| filearchive             |
| hitcounter              |
| image                   |
| imagelinks              |
| interwiki               |
| ipblocks                |
| iwlinks                 |
| job                     |
| l10n_cache              |
| langlinks               |
| log_search              |
| logging                 |
| module_deps             |
| msg_resource            |
| msg_resource_links      |
| objectcache             |
| oldimage                |
| page                    |
| page_props              |
| page_restrictions       |
| pagelinks               |
| protected_titles        |
| querycache              |
| querycache_info         |
| querycachetwo           |
| recentchanges           |
| redirect                |
| revision                |
| searchindex             |
| site_identifiers        |
| site_stats              |
| sites                   |
| tag_summary             |
| templatelinks           |
| text                    |
| transcache              |
| updatelog               |
| uploadstash             |
| user                    |
| user_former_groups      |
| user_groups             |
| user_newtalk            |
| user_properties         |
| valid_tag               |
| watchlist               |
+-------------------------+

Your database size isn't 0:

mysql/jptsndbx_wiki]# du -sh
9.8M    .

I tested phpmyadmin on Johnny and it works for me.

 

Try going to http://johnny.heliohost.org:2082/frontend/x3/passwd/index.html and changing your account password. Make sure the Synchronize MySQL password box is checked.

Link to comment
Share on other sites

No dice. "Although the system’s database map includes a MySQL user named “jptsndbx_root”, the MySQL server reported that no user with this name exists. Contact your system administrator."

 

Same error message for all other database users when I try to change their passwords.

 

It actually seems like myphpadmin doesn't even get to the login validation stage. I tried using garbage usernames and passwords and I still just get a blank screen.

 

Glad to hear the contents are still there, though, because here's what I'm seeing:

Link to comment
Share on other sites

It's normal that you see 0.00MB in cPanel. The data is still there.

Before your site can work, you need to re-create your database users:

 

The databases listed should now be visible to your root mysql account. You may need to delete, recreate, and reassign permissions to any database users that should have access to the affected databases. Let us know if you're still having any issues accessing your data.
Link to comment
Share on other sites

@Tjoene: His site is not what's broken. His error suggests that his cPanel mysql account (equivalent to root for that user) is missing, and PHPMyAdmin also does not work even after changing his password. PHPMyAdmin should work regardless of any database users he creates (it'd work even if he didn't make any) since it uses his cPanel mysql account.

 

Odds are he can't recreate the database users either, though he didn't mention trying.

 

Unmarked as solved.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...