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.

importing mysql db using phpmyadmin from sql db running on non-cpanel server

Discussion in 'Database Discussions' started by radical, Jan 2, 2006.

  1. radical

    radical Well-Known Member

    Joined:
    Nov 4, 2003
    Messages:
    48
    Likes Received:
    0
    Trophy Points:
    6
    hi

    i have exported a .sql file of a database from a server not running cpanel. i want to import this database using phpmyadmin into my server running cpanel. i have created the db in cpanel and also created a user for that database. the db on the old server was just 'dbname' whereas in the cpanel server it is created as 'dbname_dbname'

    tried both importing the file as well as copying and pasting the contents of the dump using sql query, both the times, i got this error...

    SQL query:

    -- phpMyAdmin SQL Dump
    -- version 2.6.0-pl3
    -- http://www.phpmyadmin.net
    --
    -- Host: localhost
    -- Generation Time: Dec 29, 2005 at 04:12 PM
    -- Server version: 3.23.58
    -- PHP Version: 4.3.1
    --
    -- Database: `dbname`
    --
    CREATE DATABASE `dbname'

    MySQL said:

    #1044 - Access denied for user: 'dbname@localhost' to database 'dbname'`


    MY question is since cpanel creates the database as dbname_dbname and user as dbname_user, which is not the case in a mysql/phpmyadmin running on a NON-CPANEL server - will this create problems in restoring the mysql database?

    await any help/guidance to solve this
     
  2. ckh

    ckh Well-Known Member

    Joined:
    Dec 6, 2003
    Messages:
    356
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Phoenix, AZ
    cPanel Access Level:
    DataCenter Provider
    Best thing to do is create the db in cpanel then edit the sql file and take out the create database statement. You should then be able to import the sql file.

    Chris
     
  3. radical

    radical Well-Known Member

    Joined:
    Nov 4, 2003
    Messages:
    48
    Likes Received:
    0
    Trophy Points:
    6
    it worked now...

    thanks, i also noticed that i had not added the user to the database in cpanel, i did that and also what you mentioned, and it worked.

    thanks
     
Loading...

Share This Page