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.

mysql error 1044

Discussion in 'General Discussion' started by gate2vn, Mar 11, 2004.

  1. gate2vn

    gate2vn Well-Known Member

    Joined:
    Feb 7, 2004
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Vietnam
    Hello,

    I am using mysql to restore DB
    mysql -u(Username) -p(Password) -D(DBname) < (filename.sql)

    but it returned

    ERROR 1044 at line 12: Access denied for user: '(Username)@localhost' to database 'another DBname'

    how can I fix it? thanks
     
  2. ddeans

    ddeans Well-Known Member

    Joined:
    Feb 13, 2004
    Messages:
    296
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Maryland
    Is the database that you are trying to restore empty?
     
  3. gate2vn

    gate2vn Well-Known Member

    Joined:
    Feb 7, 2004
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Vietnam
    yes, it's empty. Just created a new DB, a new user, then added user to DB. That's all. But cannot restore from .sql file :(
     
  4. BrightAdmin

    BrightAdmin Well-Known Member

    Joined:
    Feb 29, 2004
    Messages:
    204
    Likes Received:
    0
    Trophy Points:
    16
    Hi gate2vn,

    You can have a try with this,

    1.Import the sql file as root.
    2.Execute the following command with correct username and password.
    mysql -u(Username) -p(Password) -D(DBname) < (filename.sql)
    3.Grant privileges to the database created using grant commands.

    Regards,

    Bright:)
     
  5. gate2vn

    gate2vn Well-Known Member

    Joined:
    Feb 7, 2004
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Vietnam
    Hi Bright :)

    thanks for your help. I just found out that it's my client's fault when he create .sql file :) I did again for him, and everything is ok :)

    anyway, thanks for your help
    rgds,
     
Loading...

Share This Page