How to properly import databases to PHPMyAdmin and see them in cPanel >> MySQL Databases

openaccess

Active Member
Jan 22, 2006
32
0
156
First, are there issues with importing across MySQL versions? We exported a 5.0.x database and imported it on a system with 5.1.x.

When successfully importing a database to PHPMyAdmin, MySQL Databases does not locate the name of the database and add it to the list automatically. I found this thread:
http://forums.cpanel.net/f354/databases-arent-showing-up-cpanel-but-they-whm-phpmyadmin-219902.html
I ended up running /usr/local/cpanel/bin/setupdbmap to re-link PHPMyAdmin's list with the MYSQL Databases page.

Luckily we have Database Prefixes on, so the warning about this script did not really apply. However, I am worried about running that script. Is it safe to run whenever this occurs? Is this the only way to re-sync the two?
 

cPanelMichael

Technical Support Community Manager
Staff member
Apr 11, 2011
47,911
2,233
363
cPanel Access Level
DataCenter Provider
Twitter
Hello :)

There are sometimes compatibility issues between MySQL versions, however for the most part there should not be an issue with importing a database dump from MySQL 5.0 into MySQL 5.1.

You should import databases via PHPMyAdmin only after creating the database through cPanel. This will ensure it's correctly associated with the account. Or, you can restore a database via:

"cPanel -- Backups -- Restore a MySQL Database"

Thank you.
 

openaccess

Active Member
Jan 22, 2006
32
0
156
Thank you!

Also note that your response should be included on this page: SQL Databases FAQ

under the section "How do I import data into MySQL?" as it would serve to prevent people from trying to import the database itself via PHPMyAdmin.