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.

One client with SQL authority problem?

Discussion in 'Database Discussions' started by Chriz1977, Oct 21, 2009.

  1. Chriz1977

    Chriz1977 Well-Known Member

    Joined:
    Sep 18, 2006
    Messages:
    191
    Likes Received:
    0
    Trophy Points:
    16
    Hi

    One of my clients is getting this error when trying to perform an SQL import to one of his databases :

    Error

    SQL query:

    --
    -- Database: `information_schema`
    --
    CREATE DATABASE `information_schema` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

    MySQL said: Documentation
    #1044 - Access denied for user 'root'@'localhost' to database 'information_schema'

    Has anyone seen this before or know what the problem is?

    Cheers
    Chriz
     
  2. kbuser

    kbuser Well-Known Member

    Joined:
    Aug 25, 2008
    Messages:
    66
    Likes Received:
    2
    Trophy Points:
    8
    That's a SQL issue not a cPanel/WHM issue.

    What's happening is he's trying to create a database (which already exists) as the root user possibly using an incorrect password. I'm not sure why he would be trying to create that db... I should probably note that, as far as I know, it's not possible to actually edit information_schema info. His statement should ALWAYS be failing, and you want it to. Personally I'd mark this client as suspicious and keep an eye on his activities.
    http://dev.mysql.com/doc/refman/5.1/en/information-schema.html

    Based on what I've seen in regards to how cPanel/WHM handles databases, you don't want any client to have root access as this would give them access to all other accounts' databases.

    If you allow him to persist in this line, he could possibly end up corrupting all other databases on the server.
     
    #2 kbuser, Oct 21, 2009
    Last edited: Oct 23, 2009
  3. kbuser

    kbuser Well-Known Member

    Joined:
    Aug 25, 2008
    Messages:
    66
    Likes Received:
    2
    Trophy Points:
    8
    On second thought, he probably just doesn't know what hes doing and isn't trying to be malicious. I would still keep tabs on his activities, and definitely not give him any sort of root access.
     
  4. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    What method is being used to import from the SQL dump or backup file?

    What method was used to obtain the SQL dump or backup file?

    Here are some possible methods for both of the above:
    MySQL CLI via SSH
    phpMyAdmin via WHM
    phpMyAdmin via cPanel
    Via cPanel Backups or Backup Wizard (the same area also offers Restore functionality)

    If the database needing restore is owned by a user account, I recommend trying to obtain a fresh backup (from the originating system) and then restore (to the destination system) via cPanel using the features detailed in the following documentation:
    BackUps < AllDocumentation/CpanelDocs < TWiki
    BackupWizard < AllDocumentation/CpanelDocs < TWiki
     
  5. Chriz1977

    Chriz1977 Well-Known Member

    Joined:
    Sep 18, 2006
    Messages:
    191
    Likes Received:
    0
    Trophy Points:
    16
    Hi

    The user isnt malicious, stupid, but not malicious, lol.

    I beleive this was an SQL dump. The user then cleared the database so he could write new tables. He obviously had problems, as have I.

    From what I can see the only problem with ME importing this is the information_schema table, or should I be able to import this? We just need the db up and running asap so if I drop this table should it work?

    Cheers
    Chriz
     
  6. kbuser

    kbuser Well-Known Member

    Joined:
    Aug 25, 2008
    Messages:
    66
    Likes Received:
    2
    Trophy Points:
    8
    Yeah, after thinking about it for a minute that's what I concluded as well, not stupid per say, just uninformed.

    Remove the information_schema SQL from the import and everything should work fine. information_schema is actually a "view", you can't write to it. It's automatically generated and should be fine once the other databases are constructed.
     
  7. Chriz1977

    Chriz1977 Well-Known Member

    Joined:
    Sep 18, 2006
    Messages:
    191
    Likes Received:
    0
    Trophy Points:
    16
    Hi

    Removed that but now im getting this error :

    Error

    SQL query:

    --
    -- Dumping data for table `VIEWS`
    --
    --
    -- Database: `mancunia_wrdp1`
    --
    CREATE DATABASE `mancunia_wrdp1` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;

    MySQL said: Documentation
    #1007 - Can't create database 'mancunia_wrdp1'; database exists

    Im starting to think this is because im trying to import a backup and NOT a dump?
     
  8. kbuser

    kbuser Well-Known Member

    Joined:
    Aug 25, 2008
    Messages:
    66
    Likes Received:
    2
    Trophy Points:
    8
    You have a few options here:
    A) Change the database name of the one that exists or the one you're creating.
    B) Drop the database that exists.
    C) Recreate the SQL you're trying to import with drop table/if not exists logic.
     
Loading...

Share This Page