Bug 26923 - impossibility to set the root passwd for the newly updated mariadb-10.3.23-1.mga7.x86_64
Summary: impossibility to set the root passwd for the newly updated mariadb-10.3.23-1....
Status: RESOLVED INVALID
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 7
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-08 13:47 CEST by peter lawford
Modified: 2020-07-09 14:27 CEST (History)
2 users (show)

See Also:
Source RPM: mariadb-10.3.23-1.mga7.x86_64
CVE:
Status comment:


Attachments

Description peter lawford 2020-07-08 13:47:10 CEST
Description of problem:when achieving the last packages update, I got the message:
NOTE: MariaDB is installed without root password, it is recommended to set the
root password with the following command as soon as possible:

 # mysql_secure_installation
 press enter at each question except the new root password.

The initscript used to start mysql has been reverted to use the one shipped
by MariaDB. This means the following changes:

 * The generation of the initial system mysql database is now done when mysql
   is started from the initscript and only if the /var/lib/mysql/mysql
   directory is empty (mysql_install_db). Previousely this was quite hidden and
   silently done at (rpm) install time. As a consequence to this change you may
   have to perform some manual tasks to upgrade the mysql system database and
   such. So, doing something like this might help you:

   systemctl stop mysqld.service
   TMPDIR=/var/tmp mysql_install_db
   mysql_upgrade --skip-write-binlog

The cluster functionalities (ndb) has been deactivated and will be removed in
future mysql versions. Oracle has a new product named mysql-cluster that
replaces the cluster functionalities.

The mysql-common-core package ships with a default /etc/my.cnf file that is
based on the my-medium.cnf file that comes with the source code.

If you need time zone data, run the following command after install:
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -D mysql

I attempted to set my root passwd for mariadb as required:

[root@mag6 alain4]# mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user.  If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none): 
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Enter current password for root (enter for none): 
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Enter current password for root (enter for none): 
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Enter current password for root (enter for none): 
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
  
but after entering my root passwd and pressed enter, I got a message error (see above), and that several times



Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
Comment 1 Jani Välimaa 2020-07-08 17:07:51 CEST
Is mariadb server started and running?
Comment 2 Lewis Smith 2020-07-08 21:51:38 CEST
Also Peter, can you say whether you are installing mariadb, or reacting to the message for an existing updated system? I think this 'mysql_secure_installation' business has been around for ages, to do at installation; and is not tied to this update. I feel I have seen it in previous mariadb updates, but may be wrong about this.

CC: (none) => lewyssmith

Comment 3 peter lawford 2020-07-09 12:41:47 CEST
(In reply to Jani Välimaa from comment #1)
> Is mariadb server started and running?

sorry, but I can't say, I know nothing about mysql and mariadb, I've just got the above message

(In reply to Lewis Smith from comment #2)
> Also Peter, can you say whether you are installing mariadb, or reacting to
> the message for an existing updated system? I think this
> 'mysql_secure_installation' business has been around for ages, to do at
> installation; and is not tied to this update. I feel I have seen it in
> previous mariadb updates, but may be wrong about this.

I am only reacting to the message, thinking it was important; my mga7 is obtained by upgrading successively all the mageia versions since mageia1; I think that mariadb was installed a long time ago
Comment 4 Barry Jackson 2020-07-09 13:18:55 CEST
mariadb changed fairly recently, so that it is no longer required to set a mysql root password, as it was in the past.

I would ignore the message if nothing appears broken.

To check if the mariadb server is running, assuming that you have something that actually needs it, then in a terminal:

su
(system root password required)

systemctl status mysqld.service

If the message says it is disabled, then it will not start automatically on boot. To enable the service so it starts on boot:

systemctl enable mysqld.service

To start the service now:

systemctl start mysqld.service

If any of the above fail then there will be error messages.

Hope that helps.

CC: (none) => zen25000

Comment 5 Barry Jackson 2020-07-09 13:37:27 CEST
I just noticed that this is reported against mariadb in Mga7, which is still at version 10.3, the changes I mention above came in at 10.4 which has been in Cauldron for a while.

I would still ignore the message unless you are running a web facing application that uses mysql, as when you upgrade to Mga 8 it should not be there.

For reference read:
https://mariadb.com/kb/en/authentication-from-mariadb-104/
Comment 6 peter lawford 2020-07-09 14:03:06 CEST
(In reply to Barry Jackson from comment #4)
> mariadb changed fairly recently, so that it is no longer required to set a
> mysql root password, as it was in the past.
> 
> I would ignore the message if nothing appears broken.
> 
> To check if the mariadb server is running, assuming that you have something
> that actually needs it, then in a terminal:
> 
> su
> (system root password required)
> 
> systemctl status mysqld.service
> 
> If the message says it is disabled, then it will not start automatically on
> boot. To enable the service so it starts on boot:
> 
> systemctl enable mysqld.service
> 
> To start the service now:
> 
> systemctl start mysqld.service
> 
> If any of the above fail then there will be error messages.
> 
> Hope that helps.

I have run the commands you advise to do (systemctl <status, enable, start,status> mysqld.service), and now eveything seems OK
thank you
Comment 7 Barry Jackson 2020-07-09 14:27:54 CEST
OK that's good, closing then.

Status: NEW => RESOLVED
Resolution: (none) => INVALID


Note You need to log in before you can comment on or make changes to this bug.