I am moving a locally developed Wordpress site to a client server, so I am trying to export a local database and import it to the server. I exported the .sql file according to the instructions here http://codex.wordpress.org/Backing_Up_Your_Database , but I keep getting this error when importing:
DROP TABLE IF EXISTS `wp_commentmeta` ; MySQL said: Documentation #1046 - No database selected
Any help is greatly appreciated. Thank!
As in the other two answers: I did not import the backup file into a specific database. I had to create a new database and upload a file to it, and it worked perfectly.
:
USE MyWordpressDBName; DROP TABLE IF EXISTS `wp_commentmeta` ;
MySql
, . , , .
, ( , , , , , - ). :
http://codex.wordpress.org/Restoring_Your_Database_From_Backup
, :
mysql -h mysqlhostserver -u mysqlusername -p databasename < blog.bak.sql
.