General Question

anartist's avatar

Where on one's server is the mySQL database that goes with a WordPress blog?

Asked by anartist (14813points) January 4th, 2011

I can’t find it in any of the blog files, or in any of the files in any directory under my domain home [not the public html home but the main home]
Can I find it and copy it to my local machine?

Observing members: 0 Composing members: 0

5 Answers

blueiiznh's avatar

just search for .mdb and .ldf

camertron's avatar

As I understand it, MySQL stores it’s files in a whole bunch of pieces that you probably can’t just copy over. The MySQL instance running on your local machine will likely not recognize them. Instead, use the mysqldump tool to generate a .sql file, then import the file on your local machine. You’ll need to fire up your command line (called the “terminal” on Mac/Linux) and use these commands, replacing username, password, and databasename with your pertinent information:

On your server:
mysqldump -u username -ppassword databasename > file.sql

Download the file from your server to your local machine, then:
mysql -u username -ppassword databasename < file.sql

That should do it!

Not_the_CIA's avatar

Wordpress has a feature that allows you to do a export. Then you can import it into the install on the local machine. It is in the admins section under Tools.

And check to see if your host has PHPadmin on it. You can grab the sql file from PHPadmin easily.

anartist's avatar

Thank you all very very much!

styfle's avatar

Also note that it is not uncommon for databases to be running a separate server from the content. The point of using a DBMS is so you never have to look at files. If you’re looking to backup, then mysqldump is what you’re looking for. If you want to browse you database, you can use a PHP front end like phpMyAdmin.

Answer this question

Login

or

Join

to answer.

This question is in the General Section. Responses must be helpful and on-topic.

Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
or
Knowledge Networking @ Fluther