• Root password for MySQL.

    From Doug Laidlaw@2:250/1 to All on Sat Apr 17 20:50:19 2021
    Since I run a Web server not connected to the outside world, I have
    never bothered with a root password for MariaDB itself. I use the root account only on the latest reinstall. The only database I have is for
    my family tree program. Suddenly, I can't access the database. I know
    that they have been tightening up on passwords, and the password I
    normally gave users is no longer good enough. But now it seems that I
    need a password for the root user. I have looked at several HOWTO
    articles on the Web, but they all throw up error messages.

    Can anybody give me some guidance, please? Running Mageia 8.

    Doug.

    --- MBSE BBS v1.0.7.21 (GNU/Linux-x86_64)
    * Origin: Aioe.org NNTP Server (2:250/1@fidonet)
  • From David W. Hodgins@2:250/1 to All on Sat Apr 17 21:07:03 2021
    On Sat, 17 Apr 2021 15:50:19 -0400, Doug Laidlaw <laidlaws@hotkey.net.au> wrote:

    Since I run a Web server not connected to the outside world, I have
    never bothered with a root password for MariaDB itself. I use the root account only on the latest reinstall. The only database I have is for
    my family tree program. Suddenly, I can't access the database. I know
    that they have been tightening up on passwords, and the password I
    normally gave users is no longer good enough. But now it seems that I
    need a password for the root user. I have looked at several HOWTO
    articles on the Web, but they all throw up error messages.

    Can anybody give me some guidance, please? Running Mageia 8.

    As root run "systemctl start mysqld.service" and "mysql_secure_installation". Just press enter at each of the prompts except the one to set a new password for root. Note this is the mysql/mariadb root account, not the linux root account
    that the password is being set for.

    Regards, Dave Hodgins

    --
    Change dwhodgins@nomail.afraid.org to davidwhodgins@teksavvy.com for
    email replies.

    --- MBSE BBS v1.0.7.21 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Doug Laidlaw@2:250/1 to All on Sun Apr 18 00:09:18 2021
    On 18/4/21 6:07 am, David W. Hodgins wrote:
    On Sat, 17 Apr 2021 15:50:19 -0400, Doug Laidlaw
    <laidlaws@hotkey.net.au> wrote:

    Since I run a Web server not connected to the outside world, I have
    never bothered with a root password for MariaDB itself.  I use the root
    account only on the latest reinstall.  The only database I have is for
    my family tree program.  Suddenly, I can't access the database.  I know
    that they have been tightening up on passwords, and the password I
    normally gave users is no longer good enough.  But now it seems that I
    need a password for the root user.  I have looked at several HOWTO
    articles on the Web, but they all throw up error messages.

    Can anybody give me some guidance, please?  Running Mageia 8.

    As root run "systemctl start mysqld.service" and "mysql_secure_installation".
    Just press enter at each of the prompts except the one to set a new
    password
    for root. Note this is the mysql/mariadb root account, not the linux
    root account
    that the password is being set for.

    Regards, Dave Hodgins

    Thanks, Dave. That worked like a charm, as they say, and it was much
    more straightforward than the online solutions. At least one of those
    seemed to be out of date.

    Doug.

    --- MBSE BBS v1.0.7.21 (GNU/Linux-x86_64)
    * Origin: Aioe.org NNTP Server (2:250/1@fidonet)
  • From Bit Twister@2:250/1 to All on Sun Apr 18 15:51:29 2021
    On Sun, 18 Apr 2021 09:09:18 +1000, Doug Laidlaw wrote:
    On 18/4/21 6:07 am, David W. Hodgins wrote:


    As root run "systemctl start mysqld.service" and
    "if".
    Just press enter at each of the prompts except the one to set a new
    password
    for root. Note this is the mysql/mariadb root account, not the linux
    root account
    that the password is being set for.

    Regards, Dave Hodgins

    Thanks, Dave. That worked like a charm, as they say, and it was much
    more straightforward than the online solutions. At least one of those
    seemed to be out of date.

    Be aware that those "online solution" are for resetting a forgotten
    password. Also those instructions depend on what version of mariadb
    you running,


    I have not tested if mysql_secure_installation will let you
    change password if you have forgotten current password.


    --- MBSE BBS v1.0.7.21 (GNU/Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Doug Laidlaw@2:250/1 to All on Tue Apr 20 12:20:41 2021
    On 19/4/21 12:51 am, Bit Twister wrote:
    On Sun, 18 Apr 2021 09:09:18 +1000, Doug Laidlaw wrote:
    On 18/4/21 6:07 am, David W. Hodgins wrote:


    As root run "systemctl start mysqld.service" and
    "if".
    Just press enter at each of the prompts except the one to set a new
    password
    for root. Note this is the mysql/mariadb root account, not the linux
    root account
    that the password is being set for.

    Regards, Dave Hodgins

    Thanks, Dave. That worked like a charm, as they say, and it was much
    more straightforward than the online solutions. At least one of those
    seemed to be out of date.

    Be aware that those "online solution" are for resetting a forgotten
    password. Also those instructions depend on what version of mariadb
    you running,


    I have not tested if mysql_secure_installation will let you
    change password if you have forgotten current password.

    Yes, I checked them for relevance. In this regard, MariaDB and MySQL
    have recently changed. For MariaDB, the critical version is 10.2, which introduced the "ALTER USER" statement, and obsoletes anything earlier.

    Dave's method worked, then it didn't. I am about to start completely
    from scratch.

    --- MBSE BBS v1.0.7.21 (GNU/Linux-x86_64)
    * Origin: Aioe.org NNTP Server (2:250/1@fidonet)