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 import/export database? [moved]

Discussion in 'Database Discussions' started by ljwhite, Mar 7, 2006.

  1. ljwhite

    ljwhite Well-Known Member

    Joined:
    Jun 20, 2005
    Messages:
    363
    Likes Received:
    0
    Trophy Points:
    16
    how to import/export database?

    How to use phpmyadmin on cpanel to import/export database? Many thanks in advance.
     
  2. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,577
    Likes Received:
    40
    Trophy Points:
    48
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    use the tab export to export the databse
    use the tab SQL to import
     
  3. ljwhite

    ljwhite Well-Known Member

    Joined:
    Jun 20, 2005
    Messages:
    363
    Likes Received:
    0
    Trophy Points:
    16
    If i use SQL to import database, i should create a new database right? So i also should change the username and password of database that i want to import. Because i wonder maybe i can not create a database with the same username and password as the one i want to import using cpanel. When i create database using cpanel, cpanel always make the name of database like usrname_databasename. You know the usrname is different from different domains.
    BTW, can i do like this? I use the function "restore database" on cpanel. And then i choose the database that i want to import.
    Many thanks in advance
     
  4. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,577
    Likes Received:
    40
    Trophy Points:
    48
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    a xported database file from phpmyadmin is not username specific it is just a SQL file and can be imported into any database

    so yes you need a database to import it into :confused:
     
  5. ljwhite

    ljwhite Well-Known Member

    Joined:
    Jun 20, 2005
    Messages:
    363
    Likes Received:
    0
    Trophy Points:
    16
    Thanks for your help. But how could i change the password that used in php file to connect the new database? Because the password will be encoded by cpanel. Even i know the password, how could i know the encoded password?
    Thanks again. :)
     
  6. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,577
    Likes Received:
    40
    Trophy Points:
    48
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    the password would be the password you just created with the new database (i assumed you just created)

    you would have to change the connect sting in the config file for the script you are running to connect to the database
     
  7. ljwhite

    ljwhite Well-Known Member

    Joined:
    Jun 20, 2005
    Messages:
    363
    Likes Received:
    0
    Trophy Points:
    16
    Thanks for your help!
     
Loading...

Share This Page