Learn about Centmin Mod LEMP Stack today
Become a Member

MariaDB /root/.my.cnf is always updated with the correct root password?

Discussion in 'Centmin Mod Insights' started by pamamolf, Apr 3, 2018.

  1. pamamolf

    pamamolf Well-Known Member

    4,028
    421
    83
    May 31, 2014
    Ratings:
    +817
    Local Time:
    12:58 AM
    Nginx-1.17.x
    MariaDB 10.3.x
    Hello :)

    I want to ask if the /root/.my.cnf is always updated with the correct root password?

    If a user has a way to update that password and the file keep the old one or is it always updated?


    Thank you
     
  2. eva2000

    eva2000 Administrator Staff Member

    50,922
    11,805
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,263
    Local Time:
    8:58 AM
    Nginx 1.25.x
    MariaDB 10.x
    Only for initial install. If you change mysql root password yourself in future manually, then you need to manually update /root/.my.cnf as per MariaDB MySQL - CentminMod.com LEMP Nginx web stack for CentOS

    Only time /root/.my.cnf is auto updated is if you use Centmin Mod 123.09beta01's centmin.sh menu option 11 submenu option 0 which allows resetting MySQL root user password when the known existing MySQL root password is contained in /root/.my.cnf as per MariaDB - How to reset MySQL root user password for CentOS 7 / MariaDB 10.1.19+

    Code (Text):
    --------------------------------------------------------
         Centmin Mod Menu 123.09beta01 centminmod.com     
    --------------------------------------------------------
    1).  Centmin Install
    2).  Add Nginx vhost domain
    3).  NSD setup domain name DNS
    4).  Nginx Upgrade / Downgrade
    5).  PHP Upgrade / Downgrade
    6).  XCache Re-install
    7).  APC Cache Re-install
    8).  XCache Install
    9).  APC Cache Install
    10). Memcached Server Re-install
    11). MariaDB MySQL Upgrade & Management
    12). Zend OpCache Install/Re-install
    13). Install/Reinstall Redis PHP Extension
    14). SELinux disable
    15). Install/Reinstall ImagicK PHP Extension
    16). Change SSHD Port Number
    17). Multi-thread compression: pigz,pbzip2,lbzip2...
    18). Suhosin PHP Extension install
    19). Install FFMPEG and FFMPEG PHP Extension
    20). NSD Install/Re-Install
    21). Update - Nginx + PHP-FPM + Siege
    22). Add Wordpress Nginx vhost + Cache Plugin
    23). Update Centmin Mod Code Base
    24). Exit
    --------------------------------------------------------
    Enter option [ 1 - 24 ] 11
    --------------------------------------------------------
    

    Code (Text):
    --------------------------------------------------------
         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). Back to Main menu
    --------------------------------------------------------
    Enter option [ 0 - 7 ] 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]: