Cannot log in to the MySQL server

Discussion in 'Installation/Configuration' started by DaleHutch, Nov 15, 2015.

  1. DaleHutch

    DaleHutch Member

    Greetings!
    I recently built a Ubuntu 15.10 Perfect Server with ISPConfig 3. Everything seems to be working fine but when I try to log into PHPMYADMIN I can't with root. I get an error "Cannot log in to the MySQL server" I know I am using the correct password. Any suggestions as to where I can look to fix this? Thanks
     
  2. DaleHutch

    DaleHutch Member

    Looks like something to do with .. httpd_can_network_connect_db
    Will this interfere with IPSConfig
     
  3. DaleHutch

    DaleHutch Member

    FIXED!
    I needed this:
    echo "update user set plugin='' where User='root'; flush privileges;" | mysql --defaults-file=/etc/mysql/debian.cnf mysql
     
  4. uteliux

    uteliux Member

    i had same problem.. what this command exactly makes??
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    This command disables the Unix plugin in MySQL which configures MySQL to use the ssh root password instead of the MySQL root password for authentication.
     
  6. uteliux

    uteliux Member

    So it is safe to use :)
     
  7. uteliux

    uteliux Member

    'i'm getting error when executing this command..
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    And you use Debian or Ubuntu like the thread starter?
     
  9. uteliux

    uteliux Member

    Ubuntu 15.10 Perfect Server with ISPConfig 3.
     
    Last edited: Feb 23, 2016
  10. uteliux

    uteliux Member

    till any suggestion? :(
     
  11. uteliux

    uteliux Member

    SOLVED
    1. service mysql stop
    2. mysqld_safe --skip-grant-tables &
    3. mysql -u root
    4. mysql commands:
    mysql> use mysql;
    mysql> update user set password=PASSWORD("NEW-ROOT-PASSWORD-HERE") where User='root';
    mysql> flush privileges;
    mysql> quit
    5. service mysql stop
    6. service mysql start

    Try to login using your new password:
    7. mysql -u root -p
     

Share This Page