Title: MY SQL Database Errors
Last modified: August 19, 2016

---

# MY SQL Database Errors

 *  [KeyDesignz](https://wordpress.org/support/users/keydesignz/)
 * (@keydesignz)
 * [15 years ago](https://wordpress.org/support/topic/my-sql-database-errors/)
 * To explain the situation, I have built a wordpress site locally using Mamp Pro
   on a Mac. I have then exported the MySQL Database through PHP MyAdmin as an uncompressed.
   sql file. It indicates there are 11 tables in all. The backend of the website
   is configured using cPanel X and it requires that I setup a new database user
   first before I can use PHP MyAdmin. No problems, I have created a new user and
   then logged in as that user to PHP MyAdmin. I have then tried to upload the MySQL
   file and I am getting an error in the comments table. The following error looks
   like this –
 * SQL query:
    — Database: `bradscott` — — ——————————————————– — — Table structure
   for table `wp_commentmeta` — CREATE TABLE `wp_commentmeta` ( `meta_id` bigint(
   20 ) unsigned NOT NULL AUTO_INCREMENT , `comment_id` bigint( 20 ) unsigned NOT
   NULL DEFAULT ‘0’, `meta_key` varchar( 255 ) DEFAULT NULL , `meta_value` longtext,
   PRIMARY KEY ( `meta_id` ) , KEY `comment_id` ( `comment_id` ) , KEY `meta_key`(`
   meta_key` ) ) ENGINE = MYISAM DEFAULT CHARSET = utf8 AUTO_INCREMENT =3;
 * MySQL said: Documentation
    #1046 – No database selected
 * – So regarding this, I cannot upload a database to my clients site. I am not 
   sure how to fix this error. If anyone has had extensive experience with developing
   locally and then transferring online, I would love to hear from you, as I am 
   sure this would benefit the wordpress community.
 * Also am I missing something here? I haven’t yet uploaded the site online, but
   I figured once the database is imported, then I simply upload all files from 
   the local wordpress directory and link the site through the wp-config.php file?
   Or am I incorrect here?
 * Thank you in advance for your answers to this conundrum.

The topic ‘MY SQL Database Errors’ is closed to new replies.

## Tags

 * [code](https://wordpress.org/support/topic-tag/code/)
 * [database](https://wordpress.org/support/topic-tag/database/)
 * [ftp](https://wordpress.org/support/topic-tag/ftp/)
 * [linking](https://wordpress.org/support/topic-tag/linking/)
 * [MySQL](https://wordpress.org/support/topic-tag/mysql/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [server](https://wordpress.org/support/topic-tag/server/)
 * [upload](https://wordpress.org/support/topic-tag/upload/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [KeyDesignz](https://wordpress.org/support/users/keydesignz/)
 * Last activity: [15 years ago](https://wordpress.org/support/topic/my-sql-database-errors/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
