DBI connect failed : Access denied for user 'root'@'%' to database 'mysql'

Discussion in 'Technical' started by kwickcut, Feb 9, 2012.

  1. kwickcut

    kwickcut Member HowtoForge Supporter

    this all started when i found out that my boot was 98% full and the system asked for a reboot. when i rebooted this is the error on the monitor
    Code:
    ernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
    i used
    Code:
    dpkg --list | grep linux-image
    to list the kernels and then used
    Code:
    apt-get remove linux-image-2.6.15-27-386 linux-headers-2.6.15-27-386
    to remove the old kernels and header info and recovered 50% of my boot

    now when i try to log into phpmyadmin as root i only see the
    Code:
    information_schema
    data base and nothing else. now if i log into each site account i can see there database.

    then when i log into webmin and select servers/MySQL Databases i only see 2 data bases and there should be 20 i checked under /var/lib/mysql and all of the databases are listed and all of the sites are up and running and also when i click on User Permissions,Database Permissions,Host Permissions,Table Permissions,Field Permissions,Database Connections,or MySQL System Variables i receive the following error
    Code:
    DBI connect failed : Access denied for user 'root'@'%' to database 'mysql'
    from what i have read i need to reset my root password for mysql and i have done so using this
    Code:
    Stop the MySQL Server.
    
    sudo /etc/init.d/mysql stop
    
    
    Start the mysqld configuration.
    
    sudo mysqld --skip-grant-tables &
    
    
    Login to MySQL as root.
    
    mysql -u root mysql
    
    
    Replace YOURNEWPASSWORD with your new password!
    
    UPDATE user SET Password=PASSWORD('YOURNEWPASSWORD') WHERE User='root'; FLUSH PRIVILEGES; exit;
    
    
    but i am still getting the same error and i can not log into phpmyadmin as root and see all of the databases

    would love some input thanks


    kwick
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Can you check your syslog for MySQL errors?
     
  3. kwickcut

    kwickcut Member HowtoForge Supporter

    var/log/mysql.err 0 bytes
    var/log/mysql.log 0 bytes

    for sys logs do you have an email i can send the logs to dont want to display this information on the open net



    kwick
     
  4. falko

    falko Super Moderator Howtoforge Staff

    Can you replace your IP addresses or hostnames and post the excerpt here?
     

Share This Page