Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

MySql root user missing

Discussion in 'Database Discussion' started by minosjl, Nov 2, 2011.

  1. minosjl

    minosjl Well-Known Member

    Joined:
    Jun 4, 2011
    Messages:
    168
    Likes Received:
    0
    Trophy Points:
    66
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hello All,

    After installing cpanel on a new server, when i checked the mysql databse, i can see that the mysql root user entires are missing from the user table,becase of this no mysql root access and in cpanel when i tried to create a database it shows the the offline error.

    What the cause of this error.I have temporally fixed this issue by adding the skip-grant-tables entry in the my.cnf file.

    Please some one help me on this...
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,170
    Likes Received:
    370
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Are you able to set one here:

    WHM > SQL Services > MySQL Root Password
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. minosjl

    minosjl Well-Known Member

    Joined:
    Jun 4, 2011
    Messages:
    168
    Likes Received:
    0
    Trophy Points:
    66
    Location:
    India
    cPanel Access Level:
    Root Administrator
    i have tried that , this one shows no error ,able to reset the password and also the file /root/.my.cnf exists with correct permission 600
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,170
    Likes Received:
    370
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    The problem is, exactly? I'm sorry but I'm unclear on the issue I think.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,609
    Likes Received:
    32
    Trophy Points:
    238
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    What MySQL version are you running? You can re-add the root user privileges, although it would probably be better just to reinstall MySQL itself if you don't have anything on this new machine for databases anyway.

    You can reinstall MySQL just by doing:

    Code:
    mv /var/lib/mysql /var/lib/mysql.bak111102
    /scripts/mysqlup --force
    After you do this, root will still be unable to log into MySQL command line, but you can then go to WHM > SQL Services > MySQL Root Password area and set the root password. It should work. I just tested it on my own machine and it worked fine to get the root user privileges back.

    Again, this would be when you don't have existing databases already and this is a new machine. Do not try on a machine with databases. There are better ways to go about it when that's the case.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. minosjl

    minosjl Well-Known Member

    Joined:
    Jun 4, 2011
    Messages:
    168
    Likes Received:
    0
    Trophy Points:
    66
    Location:
    India
    cPanel Access Level:
    Root Administrator
    thnks,it works, i also reinstalled the cpanel from scratch.Looks like cpanel installation is corrupted,thats why mysql root user entry is missing from the user tables.In that case ,
    is it possible to add the table entry from our end ? ,if the default table entries are missing,your answer is much appreciated in this matter.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice