The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'Database Discussions' started by openaccess, May 30, 2013.

  1. openaccess

    openaccess Active Member

    Joined:
    Jan 22, 2006
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    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?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,694
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  3. openaccess

    openaccess Active Member

    Joined:
    Jan 22, 2006
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    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.
     
Loading...

Share This Page