Page 1 of 3 123 LastLast
Results 1 to 10 of 26

Thread: Ubuntu 15.04 after installing MariaDB can't login with password..

  1. #1
    Join Date
    Oct 2010
    Beans
    27

    Angry Ubuntu 15.04 after installing MariaDB can't login with password..

    I've just installed Ubuntu server 15.04 64 bit.
    After running: apt-get install mariadb-server mariadb-client

    I run sudo /usr/bin/mysql_secure_installation
    I configure a root password and use the recommended options (yes on all)

    I then try to login with: mysql -u root -p
    After typing the password I receive the following message: ERROR 1698 (28000): Access denied for user 'root'@'localhost'


    I'm not sure what's causing this, I've made sure the password was typed correctly both at installation and at login (at first I used copy paste, trough SSH) but later I decided to do a reinstall and type the passwords manually but this error still comes up.

  2. #2
    Join Date
    Oct 2010
    Beans
    27

    Re: Ubuntu 15.04 after installing MariaDB can't login with password..

    I've found that when logging in with sudo mysql -u root -p
    And then entering the password, that everything works fine.

    I tried disabling this requirement by commenting:
    #plugin-load-add = auth_socket.so

    But then I receive the following error: ERROR 1524 (HY000): Plugin 'unix_socket' is not loaded

  3. #3
    Join Date
    Apr 2015
    Beans
    2

    Re: Ubuntu 15.04 after installing MariaDB can't login with password..

    Hello gijs007

    I have exactly the same problem! Did you find a solution already? I can login when I call
    Code:
    sudo mysql -uroot -p
    , but not without the sudo command.
    Last edited by georg-0; April 24th, 2015 at 02:37 PM.

  4. #4
    Join Date
    Apr 2015
    Beans
    2

    Re: Ubuntu 15.04 after installing MariaDB can't login with password..

    Solution didn't work....
    Last edited by georg-0; April 24th, 2015 at 02:57 PM. Reason: Solution didn't work....

  5. #5
    Join Date
    Oct 2010
    Beans
    27

    Re: Ubuntu 15.04 after installing MariaDB can't login with password..

    No, I haven't found a solution yet.
    Maybe creating a new mysql user will work? I'll try this in a bit.

  6. #6
    Join Date
    Oct 2010
    Beans
    27

    Re: Ubuntu 15.04 after installing MariaDB can't login with password..

    No, I haven't found a solution yet.
    Maybe creating a new mysql user will work? I'll try this in a bit.

    Update: this works
    CREATE USER 'root2'@'localhost' IDENTIFIED BY 'some_pass';

    GRANT ALL PRIVILEGES ON *.* TO 'root2'@'localhost'
    WITH GRANT OPTION;
    This new user is able to login without sudo and has the same permissions as root.
    Source: http://stackoverflow.com/questions/1...oot-privilages

  7. #7
    Join Date
    Apr 2015
    Beans
    2

    Re: Ubuntu 15.04 after installing MariaDB can't login with password..

    shell$ sudo mysql -u root

    [mysql] use mysql;
    [mysql] update user set plugin='' where User='root';
    [mysql] flush privileges;
    [mysql] \q

  8. #8
    Join Date
    Aug 2009
    Location
    Makati City, Philippines
    Beans
    2,269
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: Ubuntu 15.04 after installing MariaDB can't login with password..

    Mariadb is a drop-in replacement for mysql so i guess all commands will work right? Here are the steps to reset the "root" account password for mysql:

    How to reset the root password for mysql:
    Stop mysql:
    1. service mysql stop

    Run mysql with skip grants to be able to login without any password
    2. mysqld_safe --skip-grant-tables &

    Login as root
    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

    Stop mysql
    5. service mysql stop

    Start mysql normally:
    6. service mysql start

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

  9. #9
    Join Date
    Nov 2009
    Location
    Mataro, Spain
    Beans
    14,138
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Ubuntu 15.04 after installing MariaDB can't login with password..

    I am no expert with mysql or mariadb, but could the issue have happened because you ran the mysql_secure_installation with sudo? So after that it doesn't accept the mysql root except with sudo. This is just an assumption...

    It might explain why newly created root2 works fine but the original root only with sudo.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 14.04 LTS 64bit & Windows 10 Pro 64bit

  10. #10
    Join Date
    Apr 2015
    Beans
    2

    Re: Ubuntu 15.04 after installing MariaDB can't login with password..

    Mysql tries to authenticate root using plugin, not password. You need just disable plugin usage for root
    Last edited by sergerod; April 25th, 2015 at 11:39 PM.

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •