You are not logged in.

#1 2022-03-24 14:03:49

Kurokishin
Member
Registered: 2021-03-13
Posts: 39

MySQL server doesn't start.

I installed mysql so that I could use mysql-workbench. I searched for which process should I enable and I found this post. Then, I enabled mysqld but when I tried to start it I received the following:

Job for mysqld.service failed because the control process exited with error code.
See "systemctl status mysqld.service" and "journalctl -xeu mysqld.service" for details.

The error logs:

systemctl status mysqld.service
× mysqld.service - MySQL Server
     Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vend>
     Active: failed (Result: exit-code) since Thu 2022-03-24 10:50:15 -03;>
       Docs: man:mysqld(8)
             http://dev.mysql.com/doc/refman/en/using-systemd.html
    Process: 263681 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited,>
    Process: 263702 ExecStart=/usr/bin/mysqld $MYSQLD_OPTS (code=exited, s>
   Main PID: 263702 (code=exited, status=1/FAILURE)
     Status: "Server startup in progress"
      Error: 22 (Invalid argument)
        CPU: 538ms

Mar 24 10:50:14 arch mysqld[263702]: 2022-03-24T13:50:14.340363Z 0 [Warnin>
Mar 24 10:50:14 arch mysqld[263702]: 2022-03-24T13:50:14.340543Z 0 [ERROR]>
Mar 24 10:50:14 arch mysqld[263702]: 2022-03-24T13:50:14.340568Z 0 [Warnin>
Mar 24 10:50:14 arch mysqld[263702]: 2022-03-24T13:50:14.341001Z 0 [ERROR]>
Mar 24 10:50:14 arch mysqld[263702]: 2022-03-24T13:50:14.341044Z 0 [ERROR]>
Mar 24 10:50:14 arch mysqld[263702]: 2022-03-24T13:50:14.341878Z 0 [ERROR]>
Mar 24 10:50:15 arch mysqld[263702]: 2022-03-24T13:50:15.810180Z 0 [System>
Mar 24 10:50:15 arch systemd[1]: mysqld.service: Main process exited, code>
Mar 24 10:50:15 arch systemd[1]: mysqld.service: Failed with result 'exit->
Mar 24 10:50:15 arch systemd[1]: Failed to start MySQL Server.
journalctl -xeu mysqld.service
Mar 24 10:50:14 arch mysqld[263702]: 2022-03-24T13:50:14.296147Z 0 [Warnin>
Mar 24 10:50:14 arch mysqld[263702]: 2022-03-24T13:50:14.296288Z 0 [Warnin>
Mar 24 10:50:14 arch mysqld[263702]: 2022-03-24T13:50:14.296423Z 0 [Warnin>
Mar 24 10:50:14 arch mysqld[263702]: 2022-03-24T13:50:14.331997Z 0 [Warnin>
Mar 24 10:50:14 arch mysqld[263702]: 2022-03-24T13:50:14.338380Z 0 [Warnin>
Mar 24 10:50:14 arch mysqld[263702]: 2022-03-24T13:50:14.339851Z 0 [Warnin>
Mar 24 10:50:14 arch mysqld[263702]: 2022-03-24T13:50:14.339879Z 0 [System>
Mar 24 10:50:14 arch mysqld[263702]: 2022-03-24T13:50:14.340363Z 0 [Warnin>
Mar 24 10:50:14 arch mysqld[263702]: 2022-03-24T13:50:14.340543Z 0 [ERROR]>
Mar 24 10:50:14 arch mysqld[263702]: 2022-03-24T13:50:14.340568Z 0 [Warnin>
Mar 24 10:50:14 arch mysqld[263702]: 2022-03-24T13:50:14.341001Z 0 [ERROR]>
Mar 24 10:50:14 arch mysqld[263702]: 2022-03-24T13:50:14.341044Z 0 [ERROR]>
Mar 24 10:50:14 arch mysqld[263702]: 2022-03-24T13:50:14.341878Z 0 [ERROR]>
Mar 24 10:50:15 arch mysqld[263702]: 2022-03-24T13:50:15.810180Z 0 [System>
Mar 24 10:50:15 arch systemd[1]: mysqld.service: Main process exited, code>
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ An ExecStart= process belonging to unit mysqld.service has exited.
░░
░░ The process' exit code is 'exited' and its exit status is 1.
Mar 24 10:50:15 arch systemd[1]: mysqld.service: Failed with result 'exit->
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ The unit mysqld.service has entered the 'failed' state with result 'exi>
Mar 24 10:50:15 arch systemd[1]: Failed to start MySQL Server.
░░ Subject: A start job for unit mysqld.service has failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ A start job for unit mysqld.service has finished with a failure.
░░
░░ The job identifier is 24877 and the job result is failed.

Any thoughts?

Offline

#2 2022-03-24 14:32:41

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,076

Re: MySQL server doesn't start.

The logs are truncated and useless, don't copy out of the pager, use --no-pager or paste to a pastebin: https://wiki.archlinux.org/title/List_o … n_services also don't generally use the -x parameter to journalctl it adds useless noise.

Offline

#3 2022-03-24 14:47:58

Kurokishin
Member
Registered: 2021-03-13
Posts: 39

Offline

#4 2022-03-24 15:01:29

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,076

Re: MySQL server doesn't start.

Well you don't appear to have configured/set up anything? FWIW do you have an actual reason for mysql or do you just think you need it? Last I checked mysql workbench worked just fine with mariadb. In an case you are going to need to do some initial configuration, most of which will apply to both: https://wiki.archlinux.org/title/MariaDB#Installation
https://wiki.archlinux.org/title/MariaDB#Configuration I'm assuming mysql comes with a similar mysql-install command

Last edited by V1del (2022-03-24 15:03:06)

Offline

#5 2022-03-24 19:43:20

Kurokishin
Member
Registered: 2021-03-13
Posts: 39

Re: MySQL server doesn't start.

I tried this:

sudo mysqld --user=mysql --basedir=/usr --datadir=/var/lib/mysql
2022-03-24T19:42:11.603321Z 0 [Warning] [MY-010915] [Server] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2022-03-24T19:42:11.603386Z 0 [System] [MY-010116] [Server] /usr/bin/mysqld (mysqld 8.0.28) starting as process 5826
2022-03-24T19:42:11.610990Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2022-03-24T19:42:11.723354Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
mysqld: Table 'mysql.plugin' doesn't exist
2022-03-24T19:42:11.792342Z 0 [ERROR] [MY-010735] [Server] Could not open the mysql.plugin table. Please perform the MySQL upgrade procedure.
2022-03-24T19:42:11.792523Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2022-03-24T19:42:11.792654Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2022-03-24T19:42:11.792764Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2022-03-24T19:42:11.792906Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2022-03-24T19:42:11.793003Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2022-03-24T19:42:11.793108Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2022-03-24T19:42:11.793201Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2022-03-24T19:42:11.822153Z 0 [Warning] [MY-010015] [Repl] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2022-03-24T19:42:11.828257Z 0 [Warning] [MY-010015] [Repl] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2022-03-24T19:42:11.829711Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2022-03-24T19:42:11.829739Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2022-03-24T19:42:11.830225Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2022-03-24T19:42:11.830376Z 0 [ERROR] [MY-013129] [Server] A message intended for a client cannot be sent there as no client-session is attached. Therefore, we're sending the information to the error-log instead: MY-001146 - Table 'mysql.component' doesn't exist
2022-03-24T19:42:11.830397Z 0 [Warning] [MY-013129] [Server] A message intended for a client cannot be sent there as no client-session is attached. Therefore, we're sending the information to the error-log instead: MY-003543 - The mysql.component table is missing or has an incorrect definition.
2022-03-24T19:42:11.830703Z 0 [ERROR] [MY-010326] [Server] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
2022-03-24T19:42:11.830737Z 0 [ERROR] [MY-010952] [Server] The privilege system failed to initialize correctly. For complete instructions on how to upgrade MySQL to a new version please see the 'Upgrading MySQL' section from the MySQL manual.
2022-03-24T19:42:11.831017Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-03-24T19:42:13.306165Z 0 [System] [MY-010910] [Server] /usr/bin/mysqld: Shutdown complete (mysqld 8.0.28)  Source distribution.

Offline

#6 2022-03-24 20:13:19

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: MySQL server doesn't start.

Kurokishin wrote:

I tried this

Why?

You have been offered good advise in this thread - but I'm not seeing any indication that you've made any attempt to use any of it.  You certainly haven't provided the requested information or answered the questions posed to you.  This is a good way to alienate those trying to help you.

While this is not meant to suggest you should continue to ignore the other requests - I'd put the question about whether you really need mysql (rather than mariadb) on the top of the list.  Addressing this will determine which set of steps would be the best to take going forward.

Last edited by Trilby (2022-03-24 20:14:46)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#7 2022-03-24 20:21:29

Kurokishin
Member
Registered: 2021-03-13
Posts: 39

Re: MySQL server doesn't start.

I'm sorry, I thought I had answered it.
Well, I'm taking classes on SQL and wanna use the same software as my professor, so I don't know if mariadb has some differences that could differ to what my professor uses. In the wiki I saw that mysql-workbench is not guaranteed to work with mariadb, so I wanna try to avoid any problems related to compatibility.

Last edited by Kurokishin (2022-03-24 20:23:17)

Offline

#8 2022-03-24 20:36:54

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: MySQL server doesn't start.

Ok, that's a good answer to the one question I prioritized.  I gather you are then using the mysql package from the AUR.  I was going to build it to try to answer a question myself about whether it has an equivalent to mysql-install, but building it will take an exceedingly long time on my hardware ... where you could just check for yourself (though I also wanted to check the man page for the section the error output specifically pointed you to).

Based on the upstream docs linked below, I suspec there may not be an equivalent mysql-install command.  According to these same docs, though, there are some initialization steps you need to follow.  Please do so:
https://dev.mysql.com/doc/refman/8.0/en … ation.html


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

Board footer

Powered by FluxBB