[SOLVED] After upgrade mga1 -> mga2 mysql cannot be started

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[SOLVED] After upgrade mga1 -> mga2 mysql cannot be started

Postby magfan » Jun 1st, '12, 09:49

Yes, I read that mysqld will not be enabled and not be started. The point is: it cannot be startet even manually. How can I solve this problem?

Code: Select all
[root@cortex etc]# systemctl start mysqld.service
Job failed. See system journal and 'systemctl status' for details.
[root@cortex etc]# systemctl status mysqld.service
mysql.service - LSB: start and stop MySQL
          Loaded: loaded (/etc/rc.d/init.d/mysql)
          Active: failed (Result: exit-code) since Fri, 01 Jun 2012 09:27:48 +0200; 1min 0s ago
         Process: 12261 ExecStart=/etc/rc.d/init.d/mysql start (code=exited, status=1/FAILURE)
          CGroup: name=systemd:/system/mysql.service

Jun 01 09:27:44 cortex mysql[12261]: 120601  9:27:44 [Warning] option 'query_cache_limit': unsigned value 429496...967295
Jun 01 09:27:44 cortex mysql[12261]: 120601  9:27:44 [Warning] option 'table_definition_cache': unsigned value 1...524288
Jun 01 09:27:44 cortex mysql[12261]: expr: Syntaxfehler
Jun 01 09:27:44 cortex mysql[12261]: /etc/rc.d/init.d/mysql: Zeile 338: [: : Ganzzahliger Ausdruck erwartet.
Jun 01 09:27:48 cortex mysql[12261]: Starting MySQL: ....[FEHLER]
[root@cortex etc]#


The lines around 338 are:

Code: Select all
    if [ "`get_mysql_id $NEW_VER`" -gt "`get_mysql_id $OLD_VER`" ]; then
        upgrade_message="WARNING: mysql_upgrade should be run (as root). The upgrade from mysql-$OLD_VER to mysql-$NEW_VER may require it."
        echo $echo_n "$upgrade_message"
        logger -p daemon.info -t mysql $upgrade_message
        echo
    fi


So, it seems to have to do with the upgrade (mysql -> mariadb). But I could run mysql_upgrade only if mysql already started...
Last edited by magfan on Jun 4th, '12, 12:53, edited 1 time in total.
magfan
 
Posts: 334
Joined: Apr 3rd, '12, 12:33

Re: After upgrade mga1 -> mga2 mysql cannot be started

Postby djennings » Jun 1st, '12, 11:41

It is telling you that there is a syntax error on line 338 within the conditions of the IF statement.

The full section of code concerned is
Code: Select all
 
    # Check if the system database should be updated and alert the user.
    NEW_VER="`$libexecdir/mysqld --version | cut -d' ' -f4 | cut -d- -f 1`"
    OLD_VER="`cat $datadir/mysql_upgrade_info | cut -d' ' -f4 | cut -d- -f 1`"
  get_mysql_id() {
   MAJOR="`echo $1|cut -d. -f1`"; MINOR="`echo $1|cut -d. -f2`"; PATCH="`echo $1|cut -d. -f3`"
   expr 10000 \* ${MAJOR} + 100 \* ${MINOR} + ${PATCH}
    }

    if [ "`get_mysql_id $NEW_VER`" -gt "`get_mysql_id $OLD_VER`" ]; then
        upgrade_message="WARNING: mysql_upgrade should be run (as root). The upgrade from mysql-$OLD_VER to mysql-$NEW_VER may require it."
        echo $echo_n "$upgrade_message"
        logger -p daemon.info -t mysql $upgrade_message
        echo
    fi


This could be because the script was unable to correctly determine the old database version. What do you get if you do ?
Code: Select all
mysqld --version

and
Code: Select all
cat /var/lib/mysql/mysql_upgrade_info

Those commands should return the new and old versions respectively. If either returns a null value then that could be your problem.

You can work around the issue by commenting out all the lines of that IF which should allow mysqld to start and then you can do the database upgrade.
User avatar
djennings
 
Posts: 613
Joined: Jun 2nd, '11, 23:51
Location: Wokingham, UK

Re: After upgrade mga1 -> mga2 mysql cannot be started

Postby magfan » Jun 1st, '12, 13:04

Well, the output looks really strange:

Code: Select all
[root@cortex]# mysqld --version
120601 12:35:03 [Warning] option 'query_cache_limit': unsigned value 4294967296 adjusted to 4294967295
120601 12:35:03 [Warning] option 'table_definition_cache': unsigned value 1048576 adjusted to 524288
mysqld  Ver 5.5.23-MariaDB-log for Linux on x86_64 (Mageia - MariaDB Community Edition (GPL))
[root@cortex]# cat /var/lib/mysql/mysql_upgrade_info
5.5.23


After changing both parameters in my.cnf I tried again, but the result is not better:

Code: Select all
[root@cortex ]# cat /var/lib/mysql/mysql_upgrade_info
5.5.23
[root@cortex]# mysqld --version
mysqld  Ver 5.5.23-MariaDB-log for Linux on x86_64 (Mageia - MariaDB Community Edition (GPL))
[root@cortex]# systemctl restart mysql.service
Job failed. See system journal and 'systemctl status' for details.
[root@cortex]# systemctl status mysql.service
mysql.service - LSB: start and stop MySQL
          Loaded: loaded (/etc/rc.d/init.d/mysql)
          Active: failed (Result: exit-code) since Fri, 01 Jun 2012 12:48:06 +0200; 7s ago
          Process: 32010 ExecStart=/etc/rc.d/init.d/mysql start (code=exited, status=1/FAILURE)
          CGroup: name=systemd:/system/mysql.service
Jun 01 12:48:02 cortex mysql[32010]: expr: Syntaxfehler
Jun 01 12:48:02 cortex mysql[32010]: /etc/rc.d/init.d/mysql: Zeile 338: [: : Ganzzahliger Ausdruck erwartet.
Jun 01 12:48:06 cortex mysql[32010]: Starting MySQL: ....[FEHLER]
[root@cortex]#


Even commenting out the section in mysqld did not help:

Code: Select all
[root@cortex]# systemctl --system daemon-reload
[root@cortex]# systemctl start mysql.service
Job failed. See system journal and 'systemctl status' for details.
[root@cortex]# systemctl status mysql.service
mysql.service - LSB: start and stop MySQL
          Loaded: loaded (/etc/rc.d/init.d/mysql)
          Active: failed (Result: exit-code) since Fri, 01 Jun 2012 12:56:52 +0200; 4s ago
         Process: 3233 ExecStart=/etc/rc.d/init.d/mysql start (code=exited, status=1/FAILURE)
          CGroup: name=systemd:/system/mysql.service

Jun 01 12:56:52 cortex mysql[3233]: Starting MySQL: ....[FEHLER]
[root@cortex]#



What else can I try?
magfan
 
Posts: 334
Joined: Apr 3rd, '12, 12:33

Re: After upgrade mga1 -> mga2 mysql cannot be started

Postby djennings » Jun 1st, '12, 13:23

Code: Select all
[root@cortex]# mysqld --version
120601 12:35:03 [Warning] option 'query_cache_limit': unsigned value 4294967296 adjusted to 4294967295
120601 12:35:03 [Warning] option 'table_definition_cache': unsigned value 1048576 adjusted to 524288
mysqld  Ver 5.5.23-MariaDB-log for Linux on x86_64 (Mageia - MariaDB Community Edition (GPL))


Well that explains why the IF statement failed. Those two error lines will have been misinterpreted.

Have you tried commenting out the query_cache_limit and table_definition_cache lines in my.cnf? My own mysqld manages happily without those parameters defined.
User avatar
djennings
 
Posts: 613
Joined: Jun 2nd, '11, 23:51
Location: Wokingham, UK

Re: After upgrade mga1 -> mga2 mysql cannot be started

Postby magfan » Jun 1st, '12, 14:13

I have commented out those lines in my.cnf and I get the following upgrade info:

Code: Select all
[root@cortex etc]#
[root@cortex etc]# cat /var/lib/mysql/mysql_upgrade_info
5.5.23[root@cortex etc]#
[root@cortex etc]# mysqld --version
mysqld  Ver 5.5.23-MariaDB-log for Linux on x86_64 (Mageia - MariaDB Community Edition (GPL))
[root@cortex etc]#



But starting mysql still fails. Just the warnings about those cache parameters are missing:

Code: Select all
[root@cortex etc]#
[root@cortex etc]# systemctl start mysql.service
Job failed. See system journal and 'systemctl status' for details.
[root@cortex etc]# systemctl status mysql.service
mysql.service - LSB: start and stop MySQL
     Loaded: loaded (/etc/rc.d/init.d/mysql)
     Active: failed (Result: exit-code) since Fri, 01 Jun 2012 14:05:54 +0200; 12s ago
    Process: 22401 ExecStart=/etc/rc.d/init.d/mysql start (code=exited, status=1/FAILURE)
     CGroup: name=systemd:/system/mysql.service

Jun 01 14:05:50 cortex mysql[22401]: expr: Syntaxfehler
Jun 01 14:05:50 cortex mysql[22401]: /etc/rc.d/init.d/mysql: Zeile 338: [: : Ganzzahliger Ausdruck erwartet.
Jun 01 14:05:54 cortex mysql[22401]: Starting MySQL: ....[FEHLER]
[root@cortex etc]#
magfan
 
Posts: 334
Joined: Apr 3rd, '12, 12:33

Re: After upgrade mga1 -> mga2 mysql cannot be started

Postby djennings » Jun 1st, '12, 14:22

What do you get in syslog?
User avatar
djennings
 
Posts: 613
Joined: Jun 2nd, '11, 23:51
Location: Wokingham, UK

Re: After upgrade mga1 -> mga2 mysql cannot be started

Postby djennings » Jun 1st, '12, 14:50

Try this

change line 331 from
Code: Select all
    OLD_VER="`cat $datadir/mysql_upgrade_info | cut -d' ' -f4 | cut -d- -f 1`"

to
Code: Select all
    OLD_VER="`cat $datadir/mysql_upgrade_info`"
User avatar
djennings
 
Posts: 613
Joined: Jun 2nd, '11, 23:51
Location: Wokingham, UK

Re: After upgrade mga1 -> mga2 mysql cannot be started

Postby magfan » Jun 1st, '12, 15:00

Below there are the errors just from today. Some warnings disappeared after correcting my.cnf and even the expression error and the error around line 338 are not fatal. If I comment out that section or make your proposed changes (`cat $datadir/mysql_upgrade_info`) those messages simply do not appear any more. But then there is still one line without any further information:

Code: Select all
[root@cortex mer]# systemctl status mysql.service
mysql.service - LSB: start and stop MySQL
          Loaded: loaded (/etc/rc.d/init.d/mysql)
          Active: failed (Result: exit-code) since Fri, 01 Jun 2012 14:59:35 +0200; 12s ago
         Process: 6064 ExecStart=/etc/rc.d/init.d/mysql start (code=exited, status=1/FAILURE)
          CGroup: name=systemd:/system/mysql.service

Jun 01 14:59:35 cortex mysql[6064]: Starting MySQL: ....[FEHLER]
[root@cortex mer]#



This means that the script mysql continues at least until line 359. But then something must go wrong...

Code: Select all
Jun  1 04:07:43 cortex msec: - Removed processes with open network ports : tcp        0      0 *:mysql                     *:*                         LISTEN      mysqld
Jun  1 07:26:45 cortex drakxservices[9806]: running: /bin/systemctl --quiet is-enabled mysql.service
Jun  1 07:30:07 cortex drakxservices[9806]: running: /bin/systemctl --quiet is-enabled mysql.service
Jun  1 08:28:20 cortex mysql[8993]: 120601  8:28:19 [Warning] option 'query_cache_limit': unsigned value 4294967296 adjusted to 4294967295
Jun  1 08:28:20 cortex mysql[8993]: 120601  8:28:19 [Warning] option 'table_definition_cache': unsigned value 1048576 adjusted to 524288
Jun  1 08:28:20 cortex mysql[8993]: expr: Syntaxfehler
Jun  1 08:28:20 cortex mysql[8993]: /etc/rc.d/init.d/mysql: Zeile 338: [: : Ganzzahliger Ausdruck erwartet.
Jun  1 08:28:24 cortex mysql[8993]: Starting MySQL: .....[FEHLER]
Jun  1 08:28:24 cortex systemd[1]: mysql.service: control process exited, code=exited status=1
Jun  1 08:28:26 cortex systemd[1]: Unit mysql.service entered failed state.
Jun  1 08:31:22 cortex mysql[2207]: 120601  8:31:22 [Warning] option 'query_cache_limit': unsigned value 4294967296 adjusted to 4294967295
Jun  1 08:31:22 cortex mysql[2207]: 120601  8:31:22 [Warning] option 'table_definition_cache': unsigned value 1048576 adjusted to 524288
Jun  1 08:31:22 cortex mysql[2207]: expr: Syntaxfehler
Jun  1 08:31:22 cortex mysql[2207]: /etc/rc.d/init.d/mysql: Zeile 338: [: : Ganzzahliger Ausdruck erwartet.
Jun  1 08:31:26 cortex mysql[2207]: Starting MySQL: ....[FEHLER]
Jun  1 08:31:26 cortex systemd[1]: mysql.service: control process exited, code=exited status=1
Jun  1 08:31:26 cortex systemd[1]: Unit mysql.service entered failed state.
Jun  1 08:32:06 cortex mysql[10900]: 120601  8:32:06 [Warning] option 'query_cache_limit': unsigned value 4294967296 adjusted to 4294967295
Jun  1 08:32:06 cortex mysql[10900]: 120601  8:32:06 [Warning] option 'table_definition_cache': unsigned value 1048576 adjusted to 524288
Jun  1 08:32:06 cortex mysql[10900]: expr: Syntaxfehler
Jun  1 08:32:06 cortex mysql[10900]: /etc/rc.d/init.d/mysql: Zeile 338: [: : Ganzzahliger Ausdruck erwartet.
Jun  1 08:32:10 cortex mysql[10900]: Starting MySQL: ....[FEHLER]
Jun  1 08:32:10 cortex systemd[1]: mysql.service: control process exited, code=exited status=1
Jun  1 08:32:10 cortex systemd[1]: Unit mysql.service entered failed state.
Jun  1 09:05:50 cortex mysql[32238]: 120601  9:05:50 [Warning] option 'query_cache_limit': unsigned value 4294967296 adjusted to 4294967295
Jun  1 09:05:50 cortex mysql[32238]: 120601  9:05:50 [Warning] option 'table_definition_cache': unsigned value 1048576 adjusted to 524288
Jun  1 09:05:50 cortex mysql[32238]: expr: Syntaxfehler
Jun  1 09:05:50 cortex mysql[32238]: /etc/rc.d/init.d/mysql: Zeile 338: [: : Ganzzahliger Ausdruck erwartet.
Jun  1 09:05:54 cortex mysql[32238]: Starting MySQL: ....[FEHLER]
Jun  1 09:05:54 cortex systemd[1]: mysql.service: control process exited, code=exited status=1
Jun  1 09:05:54 cortex systemd[1]: Unit mysql.service entered failed state.
Jun  1 09:10:27 cortex mysql[3942]: 120601  9:10:27 [Warning] option 'query_cache_limit': unsigned value 4294967296 adjusted to 4294967295
Jun  1 09:10:27 cortex mysql[3942]: 120601  9:10:27 [Warning] option 'table_definition_cache': unsigned value 1048576 adjusted to 524288
Jun  1 09:10:27 cortex mysql[3942]: expr: Syntaxfehler
Jun  1 09:10:27 cortex mysql[3942]: /etc/rc.d/init.d/mysql: Zeile 338: [: : Ganzzahliger Ausdruck erwartet.
Jun  1 09:10:31 cortex mysql[3942]: Starting MySQL: ....[FEHLER]
Jun  1 09:10:31 cortex systemd[1]: mysql.service: control process exited, code=exited status=1
Jun  1 09:10:31 cortex systemd[1]: Unit mysql.service entered failed state.
Jun  1 09:12:08 cortex mysql[18086]: 120601  9:12:08 [Warning] option 'query_cache_limit': unsigned value 4294967296 adjusted to 4294967295
Jun  1 09:12:08 cortex mysql[18086]: 120601  9:12:08 [Warning] option 'table_definition_cache': unsigned value 1048576 adjusted to 524288
Jun  1 09:12:08 cortex mysql[18086]: expr: Syntaxfehler
Jun  1 09:12:08 cortex mysql[18086]: /etc/rc.d/init.d/mysql: Zeile 338: [: : Ganzzahliger Ausdruck erwartet.
Jun  1 09:12:12 cortex mysql[18086]: Starting MySQL: ....[FEHLER]
Jun  1 09:12:12 cortex systemd[1]: mysql.service: control process exited, code=exited status=1
Jun  1 09:12:12 cortex systemd[1]: Unit mysql.service entered failed state.
Jun  1 09:27:44 cortex mysql[12261]: 120601  9:27:44 [Warning] option 'query_cache_limit': unsigned value 4294967296 adjusted to 4294967295
Jun  1 09:27:44 cortex mysql[12261]: 120601  9:27:44 [Warning] option 'table_definition_cache': unsigned value 1048576 adjusted to 524288
Jun  1 09:27:44 cortex mysql[12261]: expr: Syntaxfehler
Jun  1 09:27:44 cortex mysql[12261]: /etc/rc.d/init.d/mysql: Zeile 338: [: : Ganzzahliger Ausdruck erwartet.
Jun  1 09:27:48 cortex mysql[12261]: Starting MySQL: ....[FEHLER]
Jun  1 09:27:48 cortex systemd[1]: mysql.service: control process exited, code=exited status=1
Jun  1 09:27:48 cortex systemd[1]: Unit mysql.service entered failed state.
Jun  1 12:36:13 cortex mysql[25606]: Starting MySQL: ....[FEHLER]
Jun  1 12:36:13 cortex systemd[1]: mysql.service: control process exited, code=exited status=1
Jun  1 12:36:13 cortex systemd[1]: Unit mysql.service entered failed state.
Jun  1 12:37:04 cortex mysql[26264]: Starting MySQL: ....[FEHLER]
Jun  1 12:37:04 cortex systemd[1]: mysql.service: control process exited, code=exited status=1
Jun  1 12:37:04 cortex systemd[1]: Unit mysql.service entered failed state.
Jun  1 12:38:05 cortex mysql[26934]: 120601 12:38:05 [Warning] option 'query_cache_limit': unsigned value 4294967296 adjusted to 4294967295
Jun  1 12:38:05 cortex mysql[26934]: 120601 12:38:05 [Warning] option 'table_definition_cache': unsigned value 1048576 adjusted to 524288
Jun  1 12:38:05 cortex mysql[26934]: expr: Syntaxfehler
Jun  1 12:38:05 cortex mysql[26934]: /etc/rc.d/init.d/mysql: Zeile 338: [: : Ganzzahliger Ausdruck erwartet.
Jun  1 12:38:09 cortex mysql[26934]: Starting MySQL: ....[FEHLER]
Jun  1 12:38:09 cortex systemd[1]: mysql.service: control process exited, code=exited status=1
Jun  1 12:38:09 cortex systemd[1]: Unit mysql.service entered failed state.
Jun  1 12:38:17 cortex mysql[27577]: 120601 12:38:17 [Warning] option 'query_cache_limit': unsigned value 4294967296 adjusted to 4294967295
Jun  1 12:38:17 cortex mysql[27577]: 120601 12:38:17 [Warning] option 'table_definition_cache': unsigned value 1048576 adjusted to 524288
Jun  1 12:38:17 cortex mysql[27577]: expr: Syntaxfehler
Jun  1 12:38:17 cortex mysql[27577]: /etc/rc.d/init.d/mysql: Zeile 338: [: : Ganzzahliger Ausdruck erwartet.
Jun  1 12:38:21 cortex mysql[27577]: Starting MySQL: ....[FEHLER]
Jun  1 12:38:21 cortex systemd[1]: mysql.service: control process exited, code=exited status=1
Jun  1 12:38:21 cortex systemd[1]: Unit mysql.service entered failed state.
Jun  1 12:42:23 cortex mysql[29094]: 120601 12:42:23 [Warning] option 'query_cache_limit': unsigned value 4294967296 adjusted to 4294967295
Jun  1 12:42:23 cortex mysql[29094]: 120601 12:42:23 [Warning] option 'table_definition_cache': unsigned value 1048576 adjusted to 524288
Jun  1 12:42:27 cortex mysql[29094]: Starting MySQL: ....[FEHLER]
Jun  1 12:42:27 cortex systemd[1]: mysql.service: control process exited, code=exited status=1
Jun  1 12:42:28 cortex systemd[1]: Unit mysql.service entered failed state.
Jun  1 12:45:40 cortex mysql[29953]: expr: Syntaxfehler
Jun  1 12:45:40 cortex mysql[29953]: /etc/rc.d/init.d/mysql: Zeile 338: [: : Ganzzahliger Ausdruck erwartet.
Jun  1 12:45:44 cortex mysql[29953]: Starting MySQL: ....[FEHLER]
Jun  1 12:45:44 cortex systemd[1]: mysql.service: control process exited, code=exited status=1
Jun  1 12:45:44 cortex systemd[1]: Unit mysql.service entered failed state.
Jun  1 12:46:41 cortex mysql[30665]: expr: Syntaxfehler
Jun  1 12:46:41 cortex mysql[30665]: /etc/rc.d/init.d/mysql: Zeile 338: [: : Ganzzahliger Ausdruck erwartet.
Jun  1 12:46:45 cortex mysql[30665]: Starting MySQL: ....[FEHLER]
Jun  1 12:46:45 cortex systemd[1]: mysql.service: control process exited, code=exited status=1
Jun  1 12:46:46 cortex systemd[1]: Unit mysql.service entered failed state.
Jun  1 12:48:02 cortex mysql[32010]: expr: Syntaxfehler
Jun  1 12:48:02 cortex mysql[32010]: /etc/rc.d/init.d/mysql: Zeile 338: [: : Ganzzahliger Ausdruck erwartet.
Jun  1 12:48:06 cortex mysql[32010]: Starting MySQL: ....[FEHLER]
Jun  1 12:48:06 cortex systemd[1]: mysql.service: control process exited, code=exited status=1
Jun  1 12:48:07 cortex systemd[1]: Unit mysql.service entered failed state.
Jun  1 12:56:20 cortex mysql[2496]: Starting MySQL: ....[FEHLER]
Jun  1 12:56:20 cortex systemd[1]: mysql.service: control process exited, code=exited status=1
Jun  1 12:56:20 cortex systemd[1]: Unit mysql.service entered failed state.
Jun  1 12:56:52 cortex mysql[3233]: Starting MySQL: ....[FEHLER]
Jun  1 12:56:52 cortex systemd[1]: mysql.service: control process exited, code=exited status=1
Jun  1 12:56:52 cortex systemd[1]: Unit mysql.service entered failed state.
Jun  1 13:21:41 cortex drakxservices[8913]: running: /bin/systemctl --quiet is-enabled mysql.service
Jun  1 13:32:18 cortex mysql[5932]: Starting MySQL: .....[FEHLER]
Jun  1 13:32:18 cortex systemd[1]: mysql.service: control process exited, code=exited status=1
Jun  1 13:32:18 cortex systemd[1]: Unit mysql.service entered failed state.
Jun  1 13:44:20 cortex mysql[11827]: Starting MySQL: ....[FEHLER]
Jun  1 13:44:20 cortex systemd[1]: mysql.service: control process exited, code=exited status=1
Jun  1 13:44:20 cortex systemd[1]: Unit mysql.service entered failed state.
Jun  1 13:48:40 cortex mysql[13878]: Starting MySQL: ....[FEHLER]
Jun  1 13:48:40 cortex systemd[1]: mysql.service: control process exited, code=exited status=1
Jun  1 13:48:40 cortex systemd[1]: Unit mysql.service entered failed state.
Jun  1 13:56:23 cortex mysql[9498]: Starting MySQL: ....[FEHLER]
Jun  1 13:56:23 cortex systemd[1]: mysql.service: control process exited, code=exited status=1
Jun  1 13:56:23 cortex systemd[1]: Unit mysql.service entered failed state.
Jun  1 13:57:22 cortex mysql[18106]: expr: Syntaxfehler
Jun  1 13:57:22 cortex mysql[18106]: /etc/rc.d/init.d/mysql: Zeile 338: [: : Ganzzahliger Ausdruck erwartet.
Jun  1 13:57:26 cortex mysql[18106]: Starting MySQL: ....[FEHLER]
Jun  1 13:57:26 cortex systemd[1]: mysql.service: control process exited, code=exited status=1
Jun  1 13:57:26 cortex systemd[1]: Unit mysql.service entered failed state.
Jun  1 13:57:38 cortex mysql[21328]: expr: Syntaxfehler
Jun  1 13:57:38 cortex mysql[21328]: /etc/rc.d/init.d/mysql: Zeile 338: [: : Ganzzahliger Ausdruck erwartet.
Jun  1 13:57:42 cortex mysql[21328]: Starting MySQL: ....[FEHLER]
Jun  1 13:57:42 cortex systemd[1]: mysql.service: control process exited, code=exited status=1
Jun  1 13:57:42 cortex systemd[1]: Unit mysql.service entered failed state.
Jun  1 13:59:44 cortex mysql[6013]: Starting MySQL: ....[FEHLER]
Jun  1 13:59:44 cortex systemd[1]: mysql.service: control process exited, code=exited status=1
Jun  1 13:59:44 cortex systemd[1]: Unit mysql.service entered failed state.
Jun  1 14:00:36 cortex mysql[12119]: expr: Syntaxfehler
Jun  1 14:00:36 cortex mysql[12119]: /etc/rc.d/init.d/mysql: Zeile 338: [: : Ganzzahliger Ausdruck erwartet.
Jun  1 14:00:40 cortex mysql[12119]: Starting MySQL: ....[FEHLER]
Jun  1 14:00:40 cortex systemd[1]: mysql.service: control process exited, code=exited status=1
Jun  1 14:00:40 cortex systemd[1]: Unit mysql.service entered failed state.
Jun  1 14:00:45 cortex mysql[15365]: expr: Syntaxfehler
Jun  1 14:00:45 cortex mysql[15365]: /etc/rc.d/init.d/mysql: Zeile 338: [: : Ganzzahliger Ausdruck erwartet.
Jun  1 14:00:49 cortex mysql[15365]: Starting MySQL: ....[FEHLER]
Jun  1 14:00:49 cortex systemd[1]: mysql.service: control process exited, code=exited status=1
Jun  1 14:00:49 cortex systemd[1]: Unit mysql.service entered failed state.
Jun  1 14:01:26 cortex mysql[21273]: expr: Syntaxfehler
Jun  1 14:01:26 cortex mysql[21273]: /etc/rc.d/init.d/mysql: Zeile 338: [: : Ganzzahliger Ausdruck erwartet.
Jun  1 14:01:30 cortex mysql[21273]: Starting MySQL: ....[FEHLER]
Jun  1 14:01:30 cortex systemd[1]: mysql.service: control process exited, code=exited status=1
Jun  1 14:01:30 cortex systemd[1]: Unit mysql.service entered failed state.
Jun  1 14:01:59 cortex mysql[24482]: expr: Syntaxfehler
Jun  1 14:01:59 cortex mysql[24482]: /etc/rc.d/init.d/mysql: Zeile 338: [: : Ganzzahliger Ausdruck erwartet.
Jun  1 14:02:03 cortex mysql[24482]: Starting MySQL: ....[FEHLER]
Jun  1 14:02:03 cortex systemd[1]: mysql.service: control process exited, code=exited status=1
Jun  1 14:02:03 cortex systemd[1]: Unit mysql.service entered failed state.
Jun  1 14:05:50 cortex mysql[22401]: expr: Syntaxfehler
Jun  1 14:05:50 cortex mysql[22401]: /etc/rc.d/init.d/mysql: Zeile 338: [: : Ganzzahliger Ausdruck erwartet.
Jun  1 14:05:54 cortex mysql[22401]: Starting MySQL: ....[FEHLER]
Jun  1 14:05:54 cortex systemd[1]: mysql.service: control process exited, code=exited status=1
Jun  1 14:05:54 cortex systemd[1]: Unit mysql.service entered failed state.
Jun  1 14:13:02 cortex mysql[14567]: Starting MySQL: ....[FEHLER]
Jun  1 14:13:02 cortex systemd[1]: mysql.service: control process exited, code=exited status=1
Jun  1 14:13:02 cortex systemd[1]: Unit mysql.service entered failed state.
Jun  1 14:13:48 cortex mysql[20468]: Starting MySQL: ....[FEHLER]
Jun  1 14:13:48 cortex systemd[1]: mysql.service: control process exited, code=exited status=1
Jun  1 14:13:48 cortex systemd[1]: Unit mysql.service entered failed state.
Jun  1 14:14:43 cortex mysql[28998]: expr: Syntaxfehler
Jun  1 14:14:43 cortex mysql[28998]: /etc/rc.d/init.d/mysql: Zeile 338: [: : Ganzzahliger Ausdruck erwartet.
Jun  1 14:14:47 cortex mysql[28998]: Starting MySQL: ....[FEHLER]
Jun  1 14:14:47 cortex systemd[1]: mysql.service: control process exited, code=exited status=1
Jun  1 14:14:47 cortex systemd[1]: Unit mysql.service entered failed state.
Jun  1 14:28:27 cortex mysql[5297]: expr: Syntaxfehler
Jun  1 14:28:27 cortex mysql[5297]: /etc/rc.d/init.d/mysql: Zeile 338: [: : Ganzzahliger Ausdruck erwartet.
Jun  1 14:28:33 cortex mysql[5297]: Starting MySQL: ......[FEHLER]
Jun  1 14:28:33 cortex systemd[1]: mysql.service: control process exited, code=exited status=1
Jun  1 14:28:33 cortex systemd[1]: Unit mysql.service entered failed state.
Jun  1 14:29:27 cortex mysql[15620]: expr: Syntaxfehler
Jun  1 14:29:27 cortex mysql[15620]: /etc/rc.d/init.d/mysql: Zeile 338: [: : Ganzzahliger Ausdruck erwartet.
Jun  1 14:29:31 cortex mysql[15620]: Starting MySQL: ....[FEHLER]
Jun  1 14:29:31 cortex systemd[1]: mysql.service: control process exited, code=exited status=1
Jun  1 14:29:31 cortex systemd[1]: Unit mysql.service entered failed state.
Jun  1 14:31:35 cortex mysql[32565]: /etc/rc.d/init.d/mysql: Zeile 338: [: : Ganzzahliger Ausdruck erwartet.
Jun  1 14:31:39 cortex mysql[32565]: Starting MySQL: ....[FEHLER]
Jun  1 14:31:39 cortex systemd[1]: mysql.service: control process exited, code=exited status=1
Jun  1 14:31:39 cortex systemd[1]: Unit mysql.service entered failed state.
Jun  1 14:32:31 cortex mysql[9206]: Starting MySQL: ....[FEHLER]
Jun  1 14:32:31 cortex systemd[1]: mysql.service: control process exited, code=exited status=1
Jun  1 14:32:31 cortex systemd[1]: Unit mysql.service entered failed state.
Jun  1 14:40:26 cortex mysql[8792]: expr: Syntaxfehler
Jun  1 14:40:26 cortex mysql[8792]: /etc/rc.d/init.d/mysql: Zeile 338: [: : Ganzzahliger Ausdruck erwartet.
Jun  1 14:40:30 cortex mysql[8792]: Starting MySQL: ....[FEHLER]
Jun  1 14:40:30 cortex systemd[1]: mysql.service: control process exited, code=exited status=1
Jun  1 14:40:30 cortex systemd[1]: Unit mysql.service entered failed state.
Jun  1 14:42:18 cortex mysql[27650]: expr: Syntaxfehler
Jun  1 14:42:18 cortex mysql[27650]: /etc/rc.d/init.d/mysql: Zeile 338: [: : Ganzzahliger Ausdruck erwartet.
Jun  1 14:42:22 cortex mysql[27650]: Starting MySQL: ....[FEHLER]
Jun  1 14:42:22 cortex systemd[1]: mysql.service: control process exited, code=exited status=1
Jun  1 14:42:22 cortex systemd[1]: Unit mysql.service entered failed state.
Jun  1 14:43:17 cortex mysql[4438]: expr: Syntaxfehler
Jun  1 14:43:17 cortex mysql[4438]: /etc/rc.d/init.d/mysql: Zeile 338: [: : Ganzzahliger Ausdruck erwartet.
Jun  1 14:43:21 cortex mysql[4438]: Starting MySQL: ....[FEHLER]
Jun  1 14:43:21 cortex systemd[1]: mysql.service: control process exited, code=exited status=1
Jun  1 14:43:21 cortex systemd[1]: Unit mysql.service entered failed state.
[root@cortex log]#
magfan
 
Posts: 334
Joined: Apr 3rd, '12, 12:33

Re: After upgrade mga1 -> mga2 mysql cannot be started

Postby djennings » Jun 1st, '12, 15:16

what do you have in /var/lib/mysql/<hostname>.err
User avatar
djennings
 
Posts: 613
Joined: Jun 2nd, '11, 23:51
Location: Wokingham, UK

Re: After upgrade mga1 -> mga2 mysql cannot be started

Postby djennings » Jun 2nd, '12, 13:14

There is clearly a bug in the init.d script and I have raised a bug report on that https://bugs.mageia.org/show_bug.cgi?id=6288, but since mysqld is a native systemd service I am wondering why your computer is using the init.d script at all?

When you check the status of the service you have
Code: Select all
# systemctl status mysql.service
mysql.service - LSB: start and stop MySQL
     Loaded: loaded (/etc/rc.d/init.d/mysql)
     Active: failed (Result: exit-code) since Fri, 01 Jun 2012 14:05:54 +0200; 12s ago
    Process: 22401 ExecStart=/etc/rc.d/init.d/mysql start (code=exited, status=1/FAILURE)


When I check my own mysqld status I get
Code: Select all
# systemctl status mysqld.service
mysqld.service - MySQL database server
          Loaded: loaded (/lib/systemd/system/mysqld.service; enabled)
          Active: active (running) since Sat, 02 Jun 2012 12:00:51 +0100; 3s ago
         Process: 3000 ExecStartPost=/usr/sbin/mysqld-wait-ready $MAINPID (code=exited, status=0/SUCCESS)
         Process: 2667 ExecStart=/usr/bin/mysqld_safe --nowatch (code=exited, status=0/SUCCESS)
         Process: 2649 ExecStartPre=/usr/sbin/mysqld-prepare-db-dir (code=exited, status=0/SUCCESS)


Did you deliberately choose to use init.d instead of systemd?
What happens if you do
Code: Select all
systemctl enable mysqld.service
and then start the service?
User avatar
djennings
 
Posts: 613
Joined: Jun 2nd, '11, 23:51
Location: Wokingham, UK

Re: After upgrade mga1 -> mga2 mysql cannot be started

Postby alien » Jun 3rd, '12, 12:53

i see several things:

1.
[ ]# start mysqld.service
but the output below is from mysql.service from a /etc/init.d/mysql script (why isn't there a mysqld init.d script?) or are both there? if so, it's not from mysql.

2.
the tuning parameters are definately not in there by default (those which gave errors)

3.
when you do the last test, you restart mysqld.service, only to look at the log file, but the last entry is 15 min before you restarted the last time. meaning the logs are from previous time. so the failed is due to something else.

4.
i kinda need the logfile as djennings requested, to see what the latest error was

conclusion: either mysql has been manually installed, or this wasn't a clean mga1 setup, was it an upgrade from mdv? etc...

plz look at the logs, at least there we'll get more info on what is going on.

good luck

AL13N (mageia mariadb maintainer)
alien
 
Posts: 24
Joined: Dec 15th, '11, 22:30

Re: After upgrade mga1 -> mga2 mysql cannot be started

Postby magfan » Jun 3rd, '12, 21:29

Yes, I upgraded from Mandriva 2010.2 to Mageia 1 and recently to Mageia 2. The first upgrade did not cause any severe problems. And yes, the tuning parameters were added to my.conf a long time ago.

I have never chosen to use either systemd or init scripts. I simply tried to upgrade and obviously I ended up with a mix of both. So, as soon as I will be at work tomorrow I will try to enable mysqld.service just to see whether it solves my problem. If not I will post the required log files from tomorrow.
magfan
 
Posts: 334
Joined: Apr 3rd, '12, 12:33

Re: After upgrade mga1 -> mga2 mysql cannot be started

Postby doktor5000 » Jun 3rd, '12, 22:32

If it doesn't please post the output of
Code: Select all
rpm -qa | grep systemd | sort
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18058
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: After upgrade mga1 -> mga2 mysql cannot be started

Postby magfan » Jun 4th, '12, 07:11

Just enabling did not work.

Here is the output of 'rpm -qa | grep systemd | sort':

Code: Select all
lib64systemd-daemon0-44-13.mga2
lib64systemd-id1280-44-13.mga2
lib64systemd-journal0-44-13.mga2
lib64systemd-login0-44-13.mga2
systemd-44-13.mga2
systemd-sysvinit-44-13.mga2
systemd-units-44-13.mga2


And attached is the last part of /var/lib/mysql/cortex.err
Attachments
cortex.error.log
/var/lib/mysql/cortex.err
(366.21 KiB) Downloaded 209 times
magfan
 
Posts: 334
Joined: Apr 3rd, '12, 12:33

Re: After upgrade mga1 -> mga2 mysql cannot be started

Postby alien » Jun 4th, '12, 07:47

so, can you see if you have:

/etc/init.d/mysql
/etc/init.d/mysqld

and the output of: "systemctl list-unit-files | grep mysql"

the error becomes obvious if you see the log file:

120604 7:05:56 [ERROR] Can't open shared library '/usr/lib64/mysql/plugin/ha_innodb.so' (errno: 17 /usr/lib64/mysql/plugin/ha_innodb.so: cannot open shared object file: No such file or directory)
120604 7:05:56 [ERROR] Couldn't load plugin named '(null)' with soname 'ha_innodb.so'.
120604 7:05:56 [ERROR] Function 'ARCHIVE' already exists
120604 7:05:56 [Warning] Couldn't load plugin named 'ARCHIVE' with soname 'ha_archive.so'.
120604 7:05:56 [ERROR] Can't open shared library '/usr/lib64/mysql/plugin/ha_federated.so' (errno: 0 /usr/lib64/mysql/plugin/ha_federated.so: cannot open shared object file: No such file or directory)
120604 7:05:56 [Warning] Couldn't load plugin named 'FEDERATED' with soname 'ha_federated.so'.
120604 7:05:56 [ERROR] Function 'BLACKHOLE' already exists
120604 7:05:56 [Warning] Couldn't load plugin named 'BLACKHOLE' with soname 'ha_blackhole.so'.
120604 7:05:56 [ERROR] Function 'InnoDB' already exists
120604 7:05:56 [Warning] Couldn't load plugin named 'InnoDB' with soname 'ha_innodb.so'.
120604 7:05:56 [ERROR] /usr/sbin/mysqld: unknown option '--federated'

can you give me the output of "rpm -q -a | grep maria" ? i wonder if you specified in my.cnf a different load-modules or if you didn't install the federatedX and xtradb plugin.
alien
 
Posts: 24
Joined: Dec 15th, '11, 22:30

Re: After upgrade mga1 -> mga2 mysql cannot be started

Postby magfan » Jun 4th, '12, 08:09

I have both installed. Well, mysql is just a symbolic link to mysqld:

Code: Select all
[root@cortex etc]# ll /etc/init.d/mysql*
lrwxrwxrwx 1 root root     6 Dez 21  2010 /etc/init.d/mysql -> mysqld*
-rwxr-xr-x 1 root root 14044 Jun  1 14:59 /etc/init.d/mysqld*
[root@cortex etc]#



I enabled this service today:

Code: Select all
[root@cortex etc]# systemctl list-unit-files | grep mysql
mysqld.service                          enabled
[root@cortex etc]#



Here are the installed packages:

Code: Select all
[root@cortex etc]# rpm -q -a | grep maria
mariadb-common-5.5.23-4.mga2
lib64mariadb-embedded18-5.5.23-4.mga2
mariadb-common-core-5.5.23-4.mga2
mariadb-extra-5.5.23-4.mga2
lib64mariadb-devel-5.5.23-4.mga2
lib64mariadb18-5.5.23-4.mga2
mariadb-client-5.5.23-4.mga2
mariadb-5.5.23-4.mga2
mariadb-core-5.5.23-4.mga2
[root@cortex etc]#



And here is the part of my.cnf which refers to plugins:

Code: Select all
# plugins
plugin_dir=/usr/lib64/mysql/plugin
plugin-load=ha_archive.so;ha_blackhole.so;ha_innodb.so;ha_federatedx.so
# alternative innodb plugin: ha_innodb_plugin.so
# third party plugins: ha_revision.so;ha_sphinx.so;sphinx.so;ha_spider.so;libpbxt.so;libpinba_engine.so

# activate the federated storage engine
federated



And yes, ha_innodb.so is really missing. But I do not understand why it is complaining about missing ha_federated.so. According to the plugin list it should be ha_federatedx.so which is there:

Code: Select all
[root@cortex etc]# ls /usr/lib64/mysql/plugin
adt_null.so*     ha_archive.so*     ha_oqgraph.so*  mysql_clear_password.so*  qa_auth_server.so*   sql_errlog.so*
auth_socket.so*  ha_blackhole.so*   ha_sphinx.so*   qa_auth_client.so*        semisync_master.so*
dialog.so*       ha_federatedx.so*  mypluglib.so*   qa_auth_interface.so*     semisync_slave.so*
[root@cortex etc]#




Except for some tuning values I never changed my.cnf manually. Do I have to install additional plugins?
magfan
 
Posts: 334
Joined: Apr 3rd, '12, 12:33

Re: After upgrade mga1 -> mga2 mysql cannot be started

Postby djennings » Jun 4th, '12, 11:32

And yes, ha_innodb.so is really missing. But I do not understand why it is complaining about missing ha_federated.so. According to the plugin list it should be ha_federatedx.so which is there:


ha_innodb.so and ha_federated.so are both in the mariadb-obsolete package which you do not have installed.

Given the name is 'obsolete' I suspect you can just comment out those plugins in your my.cnf

In fact if it was me I would just abandon my old my.cnf and use my.cnf.rpmnew which you should have.
User avatar
djennings
 
Posts: 613
Joined: Jun 2nd, '11, 23:51
Location: Wokingham, UK

Re: After upgrade mga1 -> mga2 mysql cannot be started

Postby alien » Jun 4th, '12, 12:50

ah wait.

federated is replaced by federatedx.so so that's normal, innodb is not required, and the replacement xtradb is linked in.

the reason the startup fails is that the federatedx.so can't be loaded for some reason, and "federated" is used to turn it on, so federated is unknown and therefor fails.

if you don't use federated or federatedx, you can comment out that line though.

perhaps ldd /usr/lib64/mysql/plugin/ha_federatedx.so will show if there's some requirement missing?
alien
 
Posts: 24
Joined: Dec 15th, '11, 22:30

Re: After upgrade mga1 -> mga2 mysql cannot be started

Postby magfan » Jun 4th, '12, 12:53

Thanks a lot! It is working again!!!

Now I will try to tune the database again - after a couple of days.

And I will mark this thread as [solved]. PostgreSQL is waiting for reactivation because my backup software (SEP sesam) is using it internally. This upgrade from Mageia 1 to Mageia 2 is really challenging concerning databases...
magfan
 
Posts: 334
Joined: Apr 3rd, '12, 12:33

Re: [SOLVED] After upgrade mga1 -> mga2 mysql cannot be star

Postby alien » Jun 4th, '12, 13:26

sorry about that.

I guess in your sort of environment this is a bit challenging, anyway, you'll be happy to hear that alot of people are very happy with mariadb, definately concerning subquerys.

i'll give some background info on mysql vs mariadb:
- mariadb-obsolete has the original unpatched innodb and federated storage engines.
- xtradb is innodb, but patched with patches from facebook, google, etc...
- federatedx is federated, and also patched/improved
- the sphinx and oqgraph storage engines are also incorporated in mariadb
- there's a feedback plugin, which is in mariadb-feedback package (you'll also have to put that plugin in the plugin-load line too)
- there's also the aria storage engine, which is can be used as a replacement for myISAM, except that it can be used both transactional and nontransactional

for the rest, there isn't much change between mysql and mariadb.

likely in mga3, i will include handlersocket (which is a noSQL implementation) and i'll redo the configuration (with some help upstream) so that we can better split and autoload plugins. (you might also be pleased to know that mariadb devs have asked how i did the rpms, so that they can do something similar in their rpms :-) )

btw: i would advise you to remove the /etc/init.d/mysql symlink to avoid troubles in the future.
alien
 
Posts: 24
Joined: Dec 15th, '11, 22:30

Re: [SOLVED] After upgrade mga1 -> mga2 mysql cannot be star

Postby djennings » Jun 4th, '12, 13:57

Good news it is working. I have certainly learned more about mariadb :D

Although I am still puzzled why systemctl start mysqld is executing the init.d script instead of the native systemd script?
User avatar
djennings
 
Posts: 613
Joined: Jun 2nd, '11, 23:51
Location: Wokingham, UK

Re: [SOLVED] After upgrade mga1 -> mga2 mysql cannot be star

Postby magfan » Jun 4th, '12, 14:03

Thank you all for your quick replies, your help and patience! Permanently loosing access to a few million medical image data would have caused a lot of troubles...
magfan
 
Posts: 334
Joined: Apr 3rd, '12, 12:33

Re: [SOLVED] After upgrade mga1 -> mga2 mysql cannot be star

Postby alien » Jun 4th, '12, 19:35

djennings wrote:Good news it is working. I have certainly learned more about mariadb :D

Although I am still puzzled why systemctl start mysqld is executing the init.d script instead of the native systemd script?


i syspect that since mysql was symlink to mysql that by accident he might have "systemd start mysql" which would have selected the init script, i didn't check if older releases of mga/mdv did contain an initscript for mysql or a symlink though.
alien
 
Posts: 24
Joined: Dec 15th, '11, 22:30

Re: After upgrade mga1 -> mga2 mysql cannot be started

Postby flink » Aug 4th, '12, 16:38

djennings wrote:In fact if it was me I would just abandon my old my.cnf and use my.cnf.rpmnew which you should have.

Thanks. By this I could get MariaDb running. The other steps to edit the script file are too complicated for me.
flink
 
Posts: 207
Joined: Mar 3rd, '12, 19:23


Return to Basic support

Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron