mySQL/WordPress mystery

Web hosting discussion, programming, and shared and dedicated servers.
4 posts Page 1 of 1
by rrnet » Sun Jun 23, 2013 5:31 pm
Greetings, all. I've got a client with a WordPress installation. Somehow the wp-config.php file (excerpt below) is pointing to a mySQL DB that does not seem to exist, at least when I log in to member tools and look at the MySQL DBs there. So can anyone explain how WP can be accessing a DB that isn't even listed under the client's account?

The WP site runs just fine, and I can log into the WP Admin area and modify this and that without problems. I assume that the info I edit there (user logins, pwds, roles, etc.) is stored in the mySQL DB, so that DB must be active and accessible -- somewhere.

I'd like to use the phpMyAdmin interface to perform various functions, like backing up the DB, etc. but I can't even log in to a DB that's not listed in the client's member tools area.

Thanks for any help with this. I'm stumped.

// ** MySQL settings ** //
define('DB_NAME', 'rrnet_oc_1'); // The name of the database
define('DB_USER', 'rrnet_oc_1'); // Your MySQL username
define('DB_PASSWORD', '{...}
define('DB_HOST', 'b.custsql.sonic.net'); // 99% chance you won't need to change this value
by joemuller » Wed Jun 26, 2013 9:53 am
Hi,

The site that you're talking about was set up using a "One-Click" installer for Wordpress. The database and basic install are all automatically created, but you are correct in stating that there is no visible option to administer the database.

While you don't have PHPmyAdmin access, you do have command-line access on shell.sonic.net. If you need a dump of the entire database, you can use the mysqldump utility and direct its output to .sql file:

Code: Select all

mysqldump -u USER -p -h DATABASE_SERVER DATABASE_NAME > dumpfile.sql
Any version of Wordpress after 2.7 should have a useful Import/Export feature that will take care of backing up and restoring any database-level content for the site. I encourage you to try the steps outlined in the following thread:
viewtopic.php?f=8&t=1314

-- Joe Muller @ Sonic.net System Operations
I'm a proud employee of Sonic.net! :-)
by Guest » Wed Jun 26, 2013 3:13 pm
Hi, Joe. Thanks a MILLION for the info, it solves the 'where the heck is the DB?' mystery. I guess the guy that set up the new WP site used the 1-click method.

I did try the Export function but it was unclear whether it was backing up data from the DB or not. I do have shell access and will give mysqldump a go.

Is there any way to recreate the WP install so that I *would* have PHPAdmin access? I do have sql DB experience and it would be nice to have access to the WP DB. Also, do you know why I see a rradmin_wp DB in my member tools database area? It's empty and I wonder how it got created; it was a red herring in this whole investigation. <g>

Thanks a bunch for your help.

Tom
by joemuller » Fri Jul 19, 2013 12:37 pm
Tom,

My apologies for not replying sooner. At present, the one-click installs of Wordpress do not have direct database access via phpMyAdmin. This was a policy decision made before my time, not a technical limitation. That said, see my link above for the alternate method of dealing with the Wordpress database. In almost all circumstances, you should never have to touch the Wordpress database directly - nearly everything can be accomplished through the admin interface.

As for your other database, if it's not referenced anywhere else in your website(s), you can probably remove it via Member Tools.

-- Joe
I'm a proud employee of Sonic.net! :-)
4 posts Page 1 of 1

Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests (based on users active over the past 5 minutes)
Most users ever online was 999 on Mon May 10, 2021 1:02 am

Users browsing this forum: No registered users and 2 guests