hi
I upgrade my leap 15.4 to 15.5 and mariadb does’nt start ?
could you help me ?
rcmysql status
x mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
Active: failed (Result: signal) since Mon 2024-06-17 11:56:28 CEST; 39min ago
Docs: man:mysqld(8) systemd - MariaDB Knowledge Base
Process: 1341 ExecStartPre=/usr/lib/mysql/mysql-systemd-helper install (code=exited, status=0/SUCCESS)
Process: 1353 ExecStartPre=/usr/lib/mysql/mysql-systemd-helper upgrade (code=killed, signal=TERM)
Jun 17 11:52:34 localhost.localdomain mysql-systemd-helper[1433]: mysql.time_zone_leap_second OK
Jun 17 11:52:34 localhost.localdomain mysql-systemd-helper[1433]: mysql.time_zone_name OK
Jun 17 11:52:34 localhost.localdomain mysql-systemd-helper[1433]: mysql.time_zone_transition OK
Jun 17 11:52:34 localhost.localdomain mysql-systemd-helper[1433]: mysql.time_zone_transition_type OK
Jun 17 11:52:34 localhost.localdomain mysql-systemd-helper[1433]: mysql.transaction_registry OK
Jun 17 11:52:34 localhost.localdomain mysql-systemd-helper[1433]: Phase 2/8: Installing used storage engines… Skipped
Jun 17 11:52:38 localhost.localdomain mysql-systemd-helper[1433]: Phase 3/8: Running ‘mysql_fix_privilege_tables’
Jun 17 11:56:20 localhost.localdomain systemd[1]: mariadb.service: Control process exited, code=killed, status=15/TERM
Jun 17 11:56:28 localhost.localdomain systemd[1]: mariadb.service: Failed with result ‘signal’.
Jun 17 11:56:28 localhost.localdomain systemd[1]: Stopped MariaDB database server.
Can you please also upload the last lines of the mariadb log.
It should be located below /var/log in an own directory named mariadb.
I would expect more information regearding the cause of this there.
Hi
First of all tanks for taking my problem in your mind
second i have look at the /etc/my.cnf and the line for sock are’nt in use
# These are commonly set, remove the # and set as required.
# port = 3306
# socket = /run/mysql/mysql.sock
is it normal ? the mariadb look at the file ?
localhost:/home/download/antidote/Connectix_11.3_8_Linux # mysqladmin -u root -p status
Enter password:
mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local server through socket '/run/mysql/mysql.sock' (2)'
Check that mariadbd is running and that the socket: '/run/mysql/mysql.sock' exists!
i can give you this log
’
: systemctl status mysql.service
× mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2024-06-17 18:51:58 CEST; 2min 47s ago
Docs: man:mysqld(8) systemd - MariaDB Knowledge Base
Process: 5818 ExecStartPre=/usr/lib/mysql/mysql-systemd-helper install (code=exited, status=0/SUCCESS)
Process: 5827 ExecStartPre=/usr/lib/mysql/mysql-systemd-helper upgrade (code=exited, status=1/FAILURE)
juin 17 18:50:58 localhost.localdomain mysql-systemd-helper[5827]: Checking MySQL configuration for obsolete options…
juin 17 18:50:58 localhost.localdomain mysql-systemd-helper[5827]: Trying to run upgrade of MySQL databases…
juin 17 18:50:58 localhost.localdomain mysql-systemd-helper[5827]: Stale files from previous upgrade detected, cleaned them up
juin 17 18:50:58 localhost.localdomain mysql-systemd-helper[5827]: Running protected MySQL…
juin 17 18:50:58 localhost.localdomain mysql-systemd-helper[5827]: Waiting for MySQL to start
juin 17 18:51:58 localhost.localdomain mysql-systemd-helper[5827]: MySQL is still dead
juin 17 18:51:58 localhost.localdomain mysql-systemd-helper[5827]: MySQL didn’t start, can’t continue
juin 17 18:51:58 localhost.localdomain systemd[1]: mariadb.service: Control process exited, code=exited, status=1/FAILURE
juin 17 18:51:58 localhost.localdomain systemd[1]: mariadb.service: Failed with result ‘exit-code’.
juin 17 18:51:58 localhost.localdomain systemd[1]: Failed to start MariaDB database server.
’
I think I will need more lines from the end.
I would expect the reason, why he is not continuing after starting the upgrade.
The last entry from the start command showed the “mysql_fix_privilege_tables” phase.
I would not expect the database to need several minutes for that phase.
There are round about 1 hour difference between the output of systemd and the mysqld.log. Are they from the same start operation ?
The mysql socket error may be misleading.
But you should check, whether the path is available and the user who is running mariadb has the appropiate privileges.
On my openSUSE system I do have a file for the running mariadb instance
srwxrwxrwx 1 mysql mysql 0 Jun 17 17:00 mysql.sock
in directory /run/:
drwxr-xr-x 2 mysql mysql 60 Jun 17 17:00 mysql
It will be created in the start phase.
Do you have a backup of your database ?
If the instance is stopped you can also just tar the files.
In /var/log/messages we may find also some information.
If the start is not working via systemctl, we can also start the instance manually and then execute mariadb_upgrade manually (you should have created a backup of the my.cnf and the data directory / database directory!).
So first systemctl stop mariadb
Then start mysql as user mysql (mysqld_safe --defaults-file=/my.cnf --datadir=<path where to find the data)
Then execute mariadb_uprade
But I would recommend first looking for more information in the existing logs.
systemd is doing this automatically for you. - If it is working.
hi
i don’t understand all you said
i have a backup of my db from leap 15.4
i have try to update mariadb but mariadb still hooked
systemctl start mariadb
Job for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl -xeu mariadb.service" for details.
localhost:/home/download/antidote/Connectix_11.3_8_Linux # systemctl status mariadb.service
× mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2024-06-17 20:08:24 CEST; 45s ago
Docs: man:mysqld(8)
https://mariadb.com/kb/en/library/systemd/
Process: 6963 ExecStartPre=/usr/lib/mysql/mysql-systemd-helper install (code=exited, status=0/SUCCESS)
Process: 6972 ExecStartPre=/usr/lib/mysql/mysql-systemd-helper upgrade (code=exited, status=1/FAILURE)
juin 17 20:07:24 localhost.localdomain mysql-systemd-helper[6972]: Checking MySQL configuration for obsolete options...
juin 17 20:07:24 localhost.localdomain mysql-systemd-helper[6972]: Trying to run upgrade of MySQL databases...
juin 17 20:07:24 localhost.localdomain mysql-systemd-helper[6972]: Stale files from previous upgrade detected, cleaned them up
juin 17 20:07:24 localhost.localdomain mysql-systemd-helper[6972]: Running protected MySQL...
juin 17 20:07:24 localhost.localdomain mysql-systemd-helper[6972]: Waiting for MySQL to start
juin 17 20:08:24 localhost.localdomain mysql-systemd-helper[6972]: MySQL is still dead
juin 17 20:08:24 localhost.localdomain mysql-systemd-helper[6972]: MySQL didn't start, can't continue
juin 17 20:08:24 localhost.localdomain systemd[1]: mariadb.service: Control process exited, code=exited, status=1/FAILURE
juin 17 20:08:24 localhost.localdomain systemd[1]: mariadb.service: Failed with result 'exit-code'.
juin 17 20:08:24 localhost.localdomain systemd[1]: Failed to start MariaDB database server.
``
no i don't have any .sock file
regard
localhost:/etc # systemctl start mariadb
Job for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl -xeu mariadb.service" for details.
localhost:/etc #
localhost:/etc # systemctl status mariadb.service
× mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2024-06-17 20:32:36 CEST; 43s ago
Docs: man:mysqld(8)
https://mariadb.com/kb/en/library/systemd/
Process: 9929 ExecStartPre=/usr/lib/mysql/mysql-systemd-helper install (code=exited, status=0/SUCCESS)
Process: 9938 ExecStartPre=/usr/lib/mysql/mysql-systemd-helper upgrade (code=exited, status=1/FAILURE)
juin 17 20:31:35 localhost.localdomain mysql-systemd-helper[9938]: Checking MySQL configuration for obsolete options...
juin 17 20:31:35 localhost.localdomain mysql-systemd-helper[9938]: Trying to run upgrade of MySQL databases...
juin 17 20:31:35 localhost.localdomain mysql-systemd-helper[9938]: Stale files from previous upgrade detected, cleaned them up
juin 17 20:31:35 localhost.localdomain mysql-systemd-helper[9938]: Running protected MySQL...
juin 17 20:31:35 localhost.localdomain mysql-systemd-helper[9938]: Waiting for MySQL to start
juin 17 20:32:36 localhost.localdomain mysql-systemd-helper[9938]: MySQL is still dead
juin 17 20:32:36 localhost.localdomain mysql-systemd-helper[9938]: MySQL didn't start, can't continue
juin 17 20:32:36 localhost.localdomain systemd[1]: mariadb.service: Control process exited, code=exited, status=1/FAILURE
juin 17 20:32:36 localhost.localdomain systemd[1]: mariadb.service: Failed with result 'exit-code'.
juin 17 20:32:36 localhost.localdomain systemd[1]: Failed to start MariaDB database server.
localhost:/etc #
localhost:/etc # journalctl -xeu mariadb.service
juin 17 20:08:24 localhost.localdomain mysql-systemd-helper[6972]: MySQL is still dead
juin 17 20:08:24 localhost.localdomain mysql-systemd-helper[6972]: MySQL didn't start, can't continue
juin 17 20:08:24 localhost.localdomain systemd[1]: mariadb.service: Control process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ An ExecStartPre= process belonging to unit mariadb.service has exited.
░░
░░ The process' exit code is 'exited' and its exit status is 1.
juin 17 20:08:24 localhost.localdomain systemd[1]: mariadb.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ The unit mariadb.service has entered the 'failed' state with result 'exit-code'.
juin 17 20:08:24 localhost.localdomain systemd[1]: Failed to start MariaDB database server.
░░ Subject: L'unité (unit) mariadb.service a échoué
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ L'unité (unit) mariadb.service a échoué, avec le résultat failed.
juin 17 20:31:35 localhost.localdomain systemd[1]: Starting MariaDB database server...
░░ Subject: L'unité (unit) mariadb.service a commencé à démarrer
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ L'unité (unit) mariadb.service a commencé à démarrer.
juin 17 20:31:35 localhost.localdomain mysql-systemd-helper[9938]: Checking MySQL configuration for obsolete options...
juin 17 20:31:35 localhost.localdomain mysql-systemd-helper[9938]: Trying to run upgrade of MySQL databases...
juin 17 20:31:35 localhost.localdomain mysql-systemd-helper[9938]: Stale files from previous upgrade detected, cleaned them up
juin 17 20:31:35 localhost.localdomain mysql-systemd-helper[9938]: Running protected MySQL...
juin 17 20:31:35 localhost.localdomain mysql-systemd-helper[9938]: Waiting for MySQL to start
juin 17 20:32:36 localhost.localdomain mysql-systemd-helper[9938]: MySQL is still dead
juin 17 20:32:36 localhost.localdomain mysql-systemd-helper[9938]: MySQL didn't start, can't continue
juin 17 20:32:36 localhost.localdomain systemd[1]: mariadb.service: Control process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ An ExecStartPre= process belonging to unit mariadb.service has exited.
░░
░░ The process' exit code is 'exited' and its exit status is 1.
juin 17 20:32:36 localhost.localdomain systemd[1]: mariadb.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ The unit mariadb.service has entered the 'failed' state with result 'exit-code'.
juin 17 20:32:36 localhost.localdomain systemd[1]: Failed to start MariaDB database server.
░░ Subject: L'unité (unit) mariadb.service a échoué
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ L'unité (unit) mariadb.service a échoué, avec le résultat failed.
Bjournalctl -u mariadb juin 17 21:03:23 localhost.localdomain systemd[1]: Starting MariaDB database server... juin 17 21:03:24 localhost.localdomain mysql-systemd-helper[1449]: Checking MySQL configuration for obsolete options... juin 17 21:03:24 localhost.localdomain mysql-systemd-helper[1449]: Trying to run upgrade of MySQL databases... juin 17 21:03:24 localhost.localdomain mysql-systemd-helper[1449]: Running protected MySQL... juin 17 21:03:24 localhost.localdomain mysql-systemd-helper[1449]: Waiting for MySQL to start juin 17 21:04:25 localhost.localdomain mysql-systemd-helper[1449]: MySQL is still dead juin 17 21:04:25 localhost.localdomain mysql-systemd-helper[1449]: MySQL didn't start, can't continue juin 17 21:04:25 localhost.localdomain systemd[1]: mariadb.service: Control process exited, code=exited, status=1/FAILURE juin 17 21:04:25 localhost.localdomain systemd[1]: mariadb.service: Failed with result 'exit-code'. juin 17 21:04:25 localhost.localdomain systemd[1]: Failed to start MariaDB database server. lockquote
Do you have more output from mysql.log or mariadb.log ?
The systemd will continue to try to upgrade the database instance.
Is the path /run/mysql present with the mentioned privileges ?
I just asked for the backup because it will give us another try.
Are you some kind of a database adminstrator ?
I am asking because what systemd does:
Starting MySQL - checking for new versions, executing mysql_upgrade or mariadb_upgrade if necessary and the completely starting MariaDB / MySQL.
This can also be done manually. My idea is: it may give better output, what happens.
The phase “mysql_fix_privilege_tables” should not take to much time.
wrong news
i have rename mysql directory and try to reinstall from clean, i have a backup of the database
when i launch mysql-secure_installation i got the same error message `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
haven’t set the root password yet, you should just press enter here.
Enter current password for root (enter for none):
ERROR 2002 (HY000): Can’t connect to local server through socket ‘/run/mysql/mysql.sock’ (2)
`
HI !!
I don’t know why but the mysql_secure_installation works !!!
I can go to database
and i saw the rights was wrong for the mysql directory , i presume when i restore file saw i change user : mysql and groupe root and everything is OK !!