Unable to login to MYSQL as root

Discussion in 'General' started by sellotape, Dec 1, 2010.

  1. sellotape

    sellotape New Member

    Hi there.

    I can't login as root - I know that my login details are correct but when I login it says permission denied.
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

    ISPConfig3.03 reports an error in red in the system log as...
    2010-12-01 00:34 192.168.1.69 Error Unable to connect to the database:

    I tried changing my root password by starting mysqld in safe mode as advised here...
    However I get this message...

    Code:
    Query OK, 0 rows affected (0.00 sec)
    Rows matched: 0  Changed: 0  Warnings: 0
    I can login to the existing databases in ISPConfig 3.03 but when I attempt to create a new database - ISPConfig states it's all good to go but I am unable to login at all.

    I'm not sure what to do next!

    Thanks


    Ash
     
    Last edited: Dec 1, 2010
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Looks as if you dont have a root user in your mysql setup anymore. You can check this e.g. with the command:

    SELECT * FROM mysql.user WHERE User="root"

    If you dont have a root user in mysql or the password is wrong, then ispconfig can not create databases as it logs into mysql to create the databases as root user.
     
  3. sellotape

    sellotape New Member

    Hi there Till.

    Thanks for your help.
    I wondered if user - root had been removed but don't remember removing it!

    I am still quite new to command line and centos - can you tell me how I would go about recreating user root please?

    Bearing in mind at present I am unable to login to MYSQL at all and only in safe mode.

    Many thanks


    Ash
     
  4. falko

    falko Super Moderator Howtoforge Staff

Share This Page