Want to subscribe to topics you're interested in?
Become a Member

MariaDB Reset MySQL Root Password For MariaDB Fail

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by YuchiRO, Jun 13, 2018 at 10:59 PM.

  1. YuchiRO

    YuchiRO Member

    98
    6
    8
    Jan 12, 2015
    Ratings:
    +8
    Local Time:
    6:30 PM
    5.5.4
    Please fill in any relevant information that applies to you:
    • CentOS Version: i.e. CentOS 7 64bit
    • Centmin Mod Version Installed: i.e. 123.09beta01
    • Nginx Version Installed: i.e. 1.11.10
    • PHP Version Installed: i.e. 7.0.15
    • MariaDB MySQL Version Installed: 10.1.21
    • When was last time updated Centmin Mod code base ? : i.e. run centmin.sh menu option 23 submenu option 2
    • Persistent Config: Do you have any persistent config file options set in /etc/centminmod/custom_config.inc ? You can check via this command:

      cat /etc/centminmod/custom_config.inc


      Post output in CODE tags.
    I follow

    MariaDB - How to reset MySQL root user password for CentOS 7 / MariaDB 10.1.19+

    But cant reset mysql password. What should i do ?
     
  2. YuchiRO

    YuchiRO Member

    98
    6
    8
    Jan 12, 2015
    Ratings:
    +8
    Local Time:
    6:30 PM
    5.5.4
    Code:
    --------------------------------------------------------
         MariaDB MySQL Upgrade & Management Sub-Menu
    --------------------------------------------------------
    0). Regenerate New MySQL Root User Password (local server)
    1). MariaDB 5.2.x Branch Upgrade Only
    2). MariaDB 5.2.x to MariaDB 5.5 YUM upgrade
    3). MariaDB 5.5 to MariaDB 10.x YUM upgrade
    4). MariaDB 5.5 to MariaDB 10.1.x YUM upgrade
    5). MariaDB 10.x to MariaDB 10.1.x YUM upgrade
    6). MariaDB 10.1.x to MariaDB 10.2.x YUM upgrade
    7). MariaDB 10.2.x to MariaDB 10.3.x YUM upgrade
    8). Back to Main menu
    --------------------------------------------------------
    Enter option [ 0 - 8 ] 0
    --------------------------------------------------------
    
    This routine will reset the MySQL root user password
    and properly update the /root/.my.cnf file as well.
    
    This routine is only for local MariaDB MySQL servers not remote ones
    
    Do you want to continue? [y/n]: y
    
    Process begins in 10 seconds...
    
    Previous MySQL root password:
    
    [client]
    user=root
    password=PO2rS20FtIY7k9fVljl3MX3uL3BLF
    
    mysqladmin -u root -pPO2rS20FtIY7k9fVljl3MX3uL3BLF password q2V6EXAJRugWWjkLA1uah9nf6OS
    mysqladmin: connect to server at 'localhost' failed
    error: 'Access denied for user 'root'@'localhost' (using password: YES)'
    
    New MySQL root user password: q2V6EXAJRugWWjkLA1uah9nf6OS
    
    /root/.my.cnf updated
    
    [client]
    user=root
    password=q2V6EXAJRugWWjkLA1uah9nf6OS
    
    But still

    Code:
    mysqldump: Got error: 1045: "Access denied for user 'root'@'localhost' (using password: YES)" when trying to connect
     
  3. eva2000

    eva2000 Administrator Staff Member

    34,574
    7,647
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +11,759
    Local Time:
    9:30 PM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    You're trying to use the 'previous' root password show in output, you're meant to edit that previous root password in /root/.my.cnf with the updated root password and use that

    from MariaDB - How to reset MySQL root user password for CentOS 7 / MariaDB 10.1.19+

     
..