Title: Error when importing sql database to phpmyadmin
Last modified: August 20, 2016

---

# Error when importing sql database to phpmyadmin

 *  [OSOsantoso](https://wordpress.org/support/users/ososantoso/)
 * (@ososantoso)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/error-when-importing-sql-database-to-phpmyadmin-1/)
 * Hi everyone..
 * I am attempting to transfer my site to my host and have taken the following steps:
 * 1) I have exported the mysite.sql database and saved as a text file (sql).
 * 2) I have changed the [http://localhost/mysite](http://localhost/mysite) occurrences
   with [http://www.mysite.com](http://www.mysite.com), so that hte paths to all
   documents are correct
 * 3) I also have chanched C:\wamp\www\mysite\blog\wp-content\uploads
    with /wp-
   content/uploads
 * However, when I go to import the sql file into phpmyadmin I get the following
   error:
 * Error
    SQL query:
 * —
    — Database: ososantoso — — ——————————————————– — — 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 =1;
 * MySQL said:
 * #1046 – No database selected
 * help me please.. what should i do?

Viewing 4 replies - 16 through 19 (of 19 total)

[←](https://wordpress.org/support/topic/error-when-importing-sql-database-to-phpmyadmin-1/?output_format=md)
[1](https://wordpress.org/support/topic/error-when-importing-sql-database-to-phpmyadmin-1/?output_format=md)
2

 *  Thread Starter [OSOsantoso](https://wordpress.org/support/users/ososantoso/)
 * (@ososantoso)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/error-when-importing-sql-database-to-phpmyadmin-1/page/2/#post-2291788)
 * yes.. and actually that is my first question.
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/error-when-importing-sql-database-to-phpmyadmin-1/page/2/#post-2291789)
 * No – not a database export. Via Tools-> Export/Import?
 *  Thread Starter [OSOsantoso](https://wordpress.org/support/users/ososantoso/)
 * (@ososantoso)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/error-when-importing-sql-database-to-phpmyadmin-1/page/2/#post-2291790)
 * is there anyone outthere have the same problem as i am? is it because of the 
   hosting company?
 *  Thread Starter [OSOsantoso](https://wordpress.org/support/users/ososantoso/)
 * (@ososantoso)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/error-when-importing-sql-database-to-phpmyadmin-1/page/2/#post-2291802)
 * Found the problem! and solve it!
    1. magic_quotes on my hosting was turned on,
   truned it off! 2. Empty the cache on my browser!! that’s all! gosh thank u for
   everybody..

Viewing 4 replies - 16 through 19 (of 19 total)

[←](https://wordpress.org/support/topic/error-when-importing-sql-database-to-phpmyadmin-1/?output_format=md)
[1](https://wordpress.org/support/topic/error-when-importing-sql-database-to-phpmyadmin-1/?output_format=md)
2

The topic ‘Error when importing sql database to phpmyadmin’ is closed to new replies.

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 19 replies
 * 5 participants
 * Last reply from: [OSOsantoso](https://wordpress.org/support/users/ososantoso/)
 * Last activity: [14 years, 7 months ago](https://wordpress.org/support/topic/error-when-importing-sql-database-to-phpmyadmin-1/page/2/#post-2291802)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
