MySQL Import: Access denied to database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dscharles
    New Member
    • Jun 2009
    • 2

    MySQL Import: Access denied to database

    Hi there-

    I'm having problems importing a Joomla database to my new server. I've created an empty database on the new server and attached a user with all permissions, but when I hit 'Import' and select the zipped database it gives this error:

    #1044 - Access denied for user 'seasonal'@'loc alhost' to database 'dscharles_IC_2 0090410_120434'

    Does anyone have any ideas what I can do?

    Thanks
  • Atli
    Recognized Expert Expert
    • Nov 2006
    • 5062

    #2
    Hi.

    You need to give the user access to the database.
    This is done using the GRANT command.

    Like:
    [code=mysql]
    GRANT
    SELECT, INSERT, UPDATE, CREATE,
    DROP, DELETE
    ON 'dscharles_IC_2 0090410_120434' .*
    TO 'seasonal'@'loc alhost'
    IDENTIFIED BY '-InsertPassword-';[/code]
    This needs to be executed by root, or a user with root-like capabilities.

    Also, note that you need to specify any command that the user is allowed to use after the GRANT keyword.
    The once I entered are just an example.
    You can use the ALL keyword if you want to give the user unrestricted access.

    Edit.
    Re-reading your post (was kind of distracted the first time around), you say the user already has access?

    That can't really be true, seeing as you are getting this error.
    If it is, please tell us how you attached the user to the database.
    Last edited by Atli; Jun 7 '09, 01:49 PM. Reason: Added a bit

    Comment

    • dscharles
      New Member
      • Jun 2009
      • 2

      #3
      Thanks for replying -

      I'm no expert with MySQL and I was doing it all in my host's cpanel
      So I went to MySQL Databases, created a new database, created a new user with ALL permissions, then added the user to the database - all from the cpanel MySQL Database program thing...!

      Then I tried to do the import and had the error message.

      Any ideas?

      Comment

      • Atli
        Recognized Expert Expert
        • Nov 2006
        • 5062

        #4
        My guess is that your host's cPanel is broken, or that it doesn't create users with proper permissions.

        I would contact your host's technical support and ask them about this.

        If you actually had root access to the database, this would be as simple as the above example. But since you are using a hosting service, that is highly unlikely.

        I've actually had similar problems with my host's cPanel. (It didn't allow users to create MySQL functions)
        Their technical support told me this was a deliberate limitation and if I wanted to create functions, I would have to petition them to do it.

        Perhaps this is a similar situation.

        Comment

        • mwasif
          Recognized Expert Contributor
          • Jul 2006
          • 802

          #5
          What is the name of new database?

          Comment

          Working...