Home > Software design >  Export mysql database tables
Export mysql database tables

Time:03-24

this is a really basic question, apologies in advance:

I have multiple websites (based on wordpress) sharing the same mysql database named 'myshareddatabase'.

I want to export the database related to the website named 'xyz'.

So I select all tables with the prefix wp_xyz. Export.

And I will obtain a file named 'myshareddatabase.sql'.

Now I have exported the database related to my xyz website. That's it. Is that correct? Is there anything else I need to check?

Many thanks

CodePudding user response:

Now you can import them. Beware using the same prefix $table_prefix = 'wp_xyz'; in your wp_config file and if an error occurs during import from phpMyAdmin try to use the below method:

In MySQL/bin file run this

mysql -u username -p database_name < file.sql

Note: It is better to use the full path of the SQL file file.sql.

  • Related