Bug 35298 - service mysqld start fails with an error after installation
Summary: service mysqld start fails with an error after installation
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: MySQL-server (show other bugs)
Version: unstable
Hardware: all Linux
: P3 normal
Assignee: Николай Костригин
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-28 12:57 MSK by Ivan Zakharyaschev
Modified: 2018-09-14 01:36 MSK (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Zakharyaschev 2018-08-28 12:57:48 MSK
MySQL-server-5.7.22-alt1.S1.x86_64

Is there an error in the init-script?

-bash-4.3# service mysqld restart
Sending TERM signal to mysqld: Service mysqld is not running.                                                                                                                                                                                                        [PASSED]
Waiting for mysqld to actually shut down:                                                                                                                                                                                                                            [ DONE ]
mysqld: Character set '--user=mysql' is not a compiled character set and is not specified in the '/usr/share/mysql/charsets/Index.xml' file
2018-08-27T22:01:00.707973Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2018-08-27T22:01:00.709878Z 0 [ERROR] Aborting

Adjusting environment for mysqld:                                                                                                                                                                                                                                    [ DONE ]
Starting mysqld service: Initialization of mysqld failed: 0
                                                                                                                                                                                                                                                                     [FAILED]
-bash-4.3# service mysqld start
mysqld: Character set '--user=mysql' is not a compiled character set and is not specified in the '/usr/share/mysql/charsets/Index.xml' file
2018-08-27T22:01:26.556976Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2018-08-27T22:01:26.559157Z 0 [ERROR] Aborting

Adjusting environment for mysqld:                                                                                                                                                                                                                                    [ DONE ]
Starting mysqld service: Initialization of mysqld failed: 0
                                                                                                                                                                                                                                                                     [FAILED]
-bash-4.3# rpm -qf /etc/init.d/mysqld 
MySQL-server-5.7.22-alt1.S1.x86_64
-bash-4.3# rpm -V MySQL-server
S.5....T.  c /etc/my.cnf.d/server.cnf
.M.......    /var/lib/mysql/dev
-bash-4.3# rpm -q service
service-0.5.29-alt1.1.x86_64
-bash-4.3#
Comment 1 Ivan Zakharyaschev 2018-08-28 13:17:24 MSK
Там ничего особенного:

# diff -du /etc/my.cnf.d/server.cnf{.*,}
--- /etc/my.cnf.d/server.cnf.MySQL-server-5.7.22-alt1.S1	2018-07-09 18:53:36.000000000 +0300
+++ /etc/my.cnf.d/server.cnf	2018-08-28 00:57:00.508009599 +0300
@@ -42,7 +42,8 @@
 # Note that using this option without enabling named pipes on Windows
 # (via the "enable-named-pipe" option) will render mysqld useless!
 # 
-skip-networking
+#skip-networking
+bind-address = 127.0.0.1
 
 # Disabling symbolic-links is recommended to prevent assorted security risks
 symbolic-links=0
Comment 2 Ivan Zakharyaschev 2018-08-28 13:25:16 MSK
Это с SysV init, а не systemd.
Comment 3 Anton Farygin 2018-09-01 12:09:04 MSK
Коля, посмотри пожалуйста по возвращении из отпуска.
У меня, правда на p8, осталась ещё конфигурация с SysVinit и mysqld - там работает всё как надо.

базу конвертировал ?
Comment 4 Ivan Zakharyaschev 2018-09-01 18:16:50 MSK
(In reply to comment #3)

> базу конвертировал ?

Это была свежая установка без какой-либо бвзы.

Пытался выполнить https://www.altlinux.org/CVE-Manager#.D0.A0.D0.B0.D0.B7.D0.B2.D0.BE.D1.80.D0.B0.D1.87.D0.B8.D0.B2.D0.B0.D0.BD.D0.B8.D0.B5_.D0.B1.D0.B0.D0.B7.D1.8B_.D0.B4.D0.B0.D0.BD.D0.BD.D1.8B.D1.85_.D1.83.D1.8F.D0.B7.D0.B2.D0.B8.D0.BC.D0.BE.D1.81.D1.82.D0.B5.D0.B9
Comment 5 Николай Костригин 2018-09-10 18:26:54 MSK
(В ответ на комментарий №4)
> (In reply to comment #3)
> 
> > базу конвертировал ?
> 
> Это была свежая установка без какой-либо бвзы.

если установка свежая и базы еще нет, то быстро починить можно так (приводит к ПОЛНОЙ ПОТЕРЕ ДАННЫХ!!!):

rm -rf /var/lib/mysql/db/*
/usr/sbin/mysqld --initialize-insecure

далее как обычно

ошибка у меня воспроизводится на виртуалке с sysVinit, буду чинить
Comment 6 Repository Robot 2018-09-14 01:36:11 MSK
MySQL-5.7.23-alt2.S1 -> sisyphus:

Thu Sep 13 2018 Nikolai Kostrigin <nickel@altlinux> 5.7.23-alt2.S1
- fix mysqld init script charset initialization sequence (closes: #35298)
- move tmpfiles to /run/mysqld (rider@)