1

downloaded MySQL 8.0.36 from the AUR repository and then ran sudo systemctl start mysqld (after running sudo systemctl enable mysqld). However, it gives the following error:


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 contents of journalctl -xeu mysqld.service:

-- Journal begins at Fri 2021-08-13 03:39:16 IST, ends at Mon 2021-09-20 16:06:37 IST. --
Sep 20 15:02:20 archlinux systemd[1]: Starting MySQL Server...
░░ Subject: A start job for unit mysqld.service has begun execution
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ A start job for unit mysqld.service has begun execution.
░░ 
░░ The job identifier is 3035.
Sep 20 15:02:20 archlinux mysqld_pre_systemd[46389]: mktemp: failed to create file via template '/var/lib/mysql-files/install-validate-password-plugin.XXXXXX.sql': No such file or directory
Sep 20 15:02:20 archlinux mysqld_pre_systemd[46390]: chmod: cannot access '': No such file or directory
Sep 20 15:02:20 archlinux mysqld_pre_systemd[46388]: /usr/bin/mysqld_pre_systemd: line 43: : No such file or directory
Sep 20 15:02:20 archlinux mysqld_pre_systemd[46388]: /usr/bin/mysqld_pre_systemd: line 44: $initfile: ambiguous redirect
Sep 20 15:02:20 archlinux mysqld_pre_systemd[46391]: 2021-09-20T09:32:20.610211Z 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.
Sep 20 15:02:20 archlinux mysqld_pre_systemd[46391]: 2021-09-20T09:32:20.610288Z 0 [System] [MY-013169] [Server] /usr/bin/mysqld (mysqld 8.0.26) initializing of server in progress as process 46391
Sep 20 15:02:20 archlinux mysqld_pre_systemd[46391]: 2021-09-20T09:32:20.641296Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
Sep 20 15:02:34 archlinux mysqld_pre_systemd[46391]: 2021-09-20T09:32:34.012850Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
Sep 20 15:03:09 archlinux mysqld_pre_systemd[46391]: 2021-09-20T09:33:09.683021Z 0 [Warning] [MY-013746] [Server] A deprecated TLS version TLSv1 is enabled for channel mysql_main
Sep 20 15:03:09 archlinux mysqld_pre_systemd[46391]: 2021-09-20T09:33:09.683407Z 0 [Warning] [MY-013746] [Server] A deprecated TLS version TLSv1.1 is enabled for channel mysql_main
Sep 20 15:03:09 archlinux mysqld_pre_systemd[46391]: 2021-09-20T09:33:09.781991Z 0 [ERROR] [MY-010455] [Server] Failed to open the bootstrap file (null)
Sep 20 15:03:09 archlinux mysqld_pre_systemd[46391]: 2021-09-20T09:33:09.782008Z 0 [ERROR] [MY-013236] [Server] The designated data directory /var/lib/mysql/ is unusable. You can remove all files that the server added to it.
Sep 20 15:03:09 archlinux mysqld_pre_systemd[46391]: 2021-09-20T09:33:09.782034Z 0 [ERROR] [MY-010119] [Server] Aborting
Sep 20 15:03:27 archlinux mysqld_pre_systemd[46391]: 2021-09-20T09:33:27.728729Z 0 [System] [MY-010910] [Server] /usr/bin/mysqld: Shutdown complete (mysqld 8.0.26)  Source distribution.
Sep 20 15:03:28 archlinux mysqld[46486]: 2021-09-20T09:33:28.102954Z 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.
Sep 20 15:03:28 archlinux mysqld[46486]: 2021-09-20T09:33:28.103034Z 0 [System] [MY-010116] [Server] /usr/bin/mysqld (mysqld 8.0.26) starting as process 46486
Sep 20 15:03:28 archlinux mysqld[46486]: 2021-09-20T09:33:28.129728Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
Sep 20 15:03:29 archlinux mysqld[46486]: 2021-09-20T09:33:29.170005Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
Sep 20 15:03:29 archlinux mysqld[46486]: mysqld: Table 'mysql.plugin' doesn't exist
Sep 20 15:03:29 archlinux mysqld[46486]: 2021-09-20T09:33:29.385429Z 0 [ERROR] [MY-010735] [Server] Could not open the mysql.plugin table. Please perform the MySQL upgrade procedure.
Sep 20 15:03:29 archlinux mysqld[46486]: 2021-09-20T09:33:29.386859Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
Sep 20 15:03:29 archlinux mysqld[46486]: 2021-09-20T09:33:29.387861Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
Sep 20 15:03:29 archlinux mysqld[46486]: 2021-09-20T09:33:29.388740Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
Sep 20 15:03:29 archlinux mysqld[46486]: 2021-09-20T09:33:29.389869Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
Sep 20 15:03:29 archlinux mysqld[46486]: 2021-09-20T09:33:29.390711Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
Sep 20 15:03:29 archlinux mysqld[46486]: 2021-09-20T09:33:29.391554Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
Sep 20 15:03:29 archlinux mysqld[46486]: 2021-09-20T09:33:29.392562Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
Sep 20 15:03:29 archlinux mysqld[46486]: 2021-09-20T09:33:29.780759Z 0 [Warning] [MY-010015] [Repl] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
Sep 20 15:03:30 archlinux mysqld[46486]: 2021-09-20T09:33:30.017576Z 0 [Warning] [MY-010015] [Repl] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
Sep 20 15:03:30 archlinux mysqld[46486]: 2021-09-20T09:33:30.049664Z 0 [Warning] [MY-013746] [Server] A deprecated TLS version TLSv1 is enabled for channel mysql_main
Sep 20 15:03:30 archlinux mysqld[46486]: 2021-09-20T09:33:30.050224Z 0 [Warning] [MY-013746] [Server] A deprecated TLS version TLSv1.1 is enabled for channel mysql_main
Sep 20 15:03:30 archlinux mysqld[46486]: 2021-09-20T09:33:30.053313Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
Sep 20 15:03:30 archlinux mysqld[46486]: 2021-09-20T09:33:30.054132Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
Sep 20 15:03:30 archlinux mysqld[46486]: 2021-09-20T09:33:30.059712Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
Sep 20 15:03:30 archlinux mysqld[46486]: 2021-09-20T09:33:30.060885Z 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
Sep 20 15:03:30 archlinux mysqld[46486]: 2021-09-20T09:33:30.061569Z 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.
Sep 20 15:03:30 archlinux mysqld[46486]: 2021-09-20T09:33:30.063609Z 0 [ERROR] [MY-010326] [Server] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
Sep 20 15:03:30 archlinux mysqld[46486]: 2021-09-20T09:33:30.064458Z 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.
Sep 20 15:03:30 archlinux mysqld[46486]: 2021-09-20T09:33:30.066133Z 0 [ERROR] [MY-010119] [Server] Aborting
Sep 20 15:03:32 archlinux mysqld[46486]: 2021-09-20T09:33:32.332310Z 0 [System] [MY-010910] [Server] /usr/bin/mysqld: Shutdown complete (mysqld 8.0.26)  Source distribution.
Sep 20 15:03:32 archlinux systemd[1]: mysqld.service: Main process exited, code=exited, status=1/FAILURE
░░ 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.
Sep 20 15:03:32 archlinux systemd[1]: mysqld.service: Failed with result 'exit-code'.
░░ 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 'exit-code'.
Sep 20 15:03:32 archlinux 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 3035 and the job result is failed.
Sep 20 15:03:32 archlinux systemd[1]: mysqld.service: Consumed 5.170s CPU time.
░░ Subject: Resources consumed by unit runtime
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ The unit mysqld.service completed and consumed the indicated resources.
Sep 20 15:09:11 archlinux systemd[1]: Starting MySQL Server...
░░ Subject: A start job for unit mysqld.service has begun execution
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ A start job for unit mysqld.service has begun execution.
░░ 
░░ The job identifier is 3201.
Sep 20 15:09:11 archlinux mysqld[47078]: 2021-09-20T09:39:11.388078Z 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.
Sep 20 15:09:11 archlinux mysqld[47078]: 2021-09-20T09:39:11.388129Z 0 [System] [MY-010116] [Server] /usr/bin/mysqld (mysqld 8.0.26) starting as process 47078
Sep 20 15:09:11 archlinux mysqld[47078]: 2021-09-20T09:39:11.395117Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
Sep 20 15:09:12 archlinux mysqld[47078]: 2021-09-20T09:39:12.422857Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
Sep 20 15:09:12 archlinux mysqld[47078]: mysqld: Table 'mysql.plugin' doesn't exist
Sep 20 15:09:12 archlinux mysqld[47078]: 2021-09-20T09:39:12.658089Z 0 [ERROR] [MY-010735] [Server] Could not open the mysql.plugin table. Please perform the MySQL upgrade procedure.
Sep 20 15:09:12 archlinux mysqld[47078]: 2021-09-20T09:39:12.659336Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
Sep 20 15:09:12 archlinux mysqld[47078]: 2021-09-20T09:39:12.660203Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
Sep 20 15:09:12 archlinux mysqld[47078]: 2021-09-20T09:39:12.661077Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
Sep 20 15:09:12 archlinux mysqld[47078]: 2021-09-20T09:39:12.662207Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
Sep 20 15:09:12 archlinux mysqld[47078]: 2021-09-20T09:39:12.663015Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
Sep 20 15:09:12 archlinux mysqld[47078]: 2021-09-20T09:39:12.663854Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
Sep 20 15:09:12 archlinux mysqld[47078]: 2021-09-20T09:39:12.664683Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
Sep 20 15:09:12 archlinux mysqld[47078]: 2021-09-20T09:39:12.827203Z 0 [Warning] [MY-010015] [Repl] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
Sep 20 15:09:13 archlinux mysqld[47078]: 2021-09-20T09:39:13.164880Z 0 [Warning] [MY-010015] [Repl] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
Sep 20 15:09:13 archlinux mysqld[47078]: 2021-09-20T09:39:13.197466Z 0 [Warning] [MY-013746] [Server] A deprecated TLS version TLSv1 is enabled for channel mysql_main
Sep 20 15:09:13 archlinux mysqld[47078]: 2021-09-20T09:39:13.198322Z 0 [Warning] [MY-013746] [Server] A deprecated TLS version TLSv1.1 is enabled for channel mysql_main
Sep 20 15:09:13 archlinux mysqld[47078]: 2021-09-20T09:39:13.201045Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
Sep 20 15:09:13 archlinux mysqld[47078]: 2021-09-20T09:39:13.201683Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
Sep 20 15:09:13 archlinux mysqld[47078]: 2021-09-20T09:39:13.207418Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
Sep 20 15:09:13 archlinux mysqld[47078]: 2021-09-20T09:39:13.208493Z 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
Sep 20 15:09:13 archlinux mysqld[47078]: 2021-09-20T09:39:13.209144Z 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.
Sep 20 15:09:13 archlinux mysqld[47078]: 2021-09-20T09:39:13.211124Z 0 [ERROR] [MY-010326] [Server] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
Sep 20 15:09:13 archlinux mysqld[47078]: 2021-09-20T09:39:13.211872Z 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.
Sep 20 15:09:13 archlinux mysqld[47078]: 2021-09-20T09:39:13.213634Z 0 [ERROR] [MY-010119] [Server] Aborting
Sep 20 15:09:15 archlinux mysqld[47078]: 2021-09-20T09:39:15.117539Z 0 [System] [MY-010910] [Server] /usr/bin/mysqld: Shutdown complete (mysqld 8.0.26)  Source distribution.
Sep 20 15:09:15 archlinux systemd[1]: mysqld.service: Main process exited, code=exited, status=1/FAILURE
░░ 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.
Sep 20 15:09:15 archlinux systemd[1]: mysqld.service: Failed with result 'exit-code'.
░░ 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 'exit-code'.
Sep 20 15:09:15 archlinux 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 3201 and the job result is failed.
Sep 20 15:09:15 archlinux systemd[1]: mysqld.service: Consumed 1.235s CPU time.
░░ Subject: Resources consumed by unit runtime
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ The unit mysqld.service completed and consumed the indicated resources.
Sep 20 15:09:49 archlinux systemd[1]: Starting MySQL Server...
░░ Subject: A start job for unit mysqld.service has begun execution
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ A start job for unit mysqld.service has begun execution.
░░ 
░░ The job identifier is 3290.
Sep 20 15:09:50 archlinux mysqld[47207]: 2021-09-20T09:39:50.075264Z 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.
Sep 20 15:09:50 archlinux mysqld[47207]: 2021-09-20T09:39:50.075348Z 0 [System] [MY-010116] [Server] /usr/bin/mysqld (mysqld 8.0.26) starting as process 47207
Sep 20 15:09:50 archlinux mysqld[47207]: 2021-09-20T09:39:50.152770Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
Sep 20 15:09:55 archlinux mysqld[47207]: 2021-09-20T09:39:55.107623Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
Sep 20 15:09:55 archlinux mysqld[47207]: mysqld: Table 'mysql.plugin' doesn't exist
Sep 20 15:09:55 archlinux mysqld[47207]: 2021-09-20T09:39:55.251280Z 0 [ERROR] [MY-010735] [Server] Could not open the mysql.plugin table. Please perform the MySQL upgrade procedure.
Sep 20 15:09:55 archlinux mysqld[47207]: 2021-09-20T09:39:55.251890Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
Sep 20 15:09:55 archlinux mysqld[47207]: 2021-09-20T09:39:55.252313Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
Sep 20 15:09:55 archlinux mysqld[47207]: 2021-09-20T09:39:55.252715Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
Sep 20 15:09:55 archlinux mysqld[47207]: 2021-09-20T09:39:55.253229Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
Sep 20 15:09:55 archlinux mysqld[47207]: 2021-09-20T09:39:55.253664Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
Sep 20 15:09:55 archlinux mysqld[47207]: 2021-09-20T09:39:55.254124Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
Sep 20 15:09:55 archlinux mysqld[47207]: 2021-09-20T09:39:55.254496Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
Sep 20 15:09:55 archlinux mysqld[47207]: 2021-09-20T09:39:55.445838Z 0 [Warning] [MY-010015] [Repl] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
Sep 20 15:09:55 archlinux mysqld[47207]: 2021-09-20T09:39:55.686140Z 0 [Warning] [MY-010015] [Repl] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
Sep 20 15:09:55 archlinux mysqld[47207]: 2021-09-20T09:39:55.718563Z 0 [Warning] [MY-013746] [Server] A deprecated TLS version TLSv1 is enabled for channel mysql_main
Sep 20 15:09:55 archlinux mysqld[47207]: 2021-09-20T09:39:55.719234Z 0 [Warning] [MY-013746] [Server] A deprecated TLS version TLSv1.1 is enabled for channel mysql_main
Sep 20 15:09:55 archlinux mysqld[47207]: 2021-09-20T09:39:55.721865Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
Sep 20 15:09:55 archlinux mysqld[47207]: 2021-09-20T09:39:55.722757Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
Sep 20 15:09:55 archlinux mysqld[47207]: 2021-09-20T09:39:55.728447Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
Sep 20 15:09:55 archlinux mysqld[47207]: 2021-09-20T09:39:55.729640Z 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
Sep 20 15:09:55 archlinux mysqld[47207]: 2021-09-20T09:39:55.730413Z 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.
Sep 20 15:09:55 archlinux mysqld[47207]: 2021-09-20T09:39:55.732637Z 0 [ERROR] [MY-010326] [Server] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
Sep 20 15:09:55 archlinux mysqld[47207]: 2021-09-20T09:39:55.733607Z 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.
Sep 20 15:09:55 archlinux mysqld[47207]: 2021-09-20T09:39:55.735486Z 0 [ERROR] [MY-010119] [Server] Aborting
Sep 20 15:09:57 archlinux mysqld[47207]: 2021-09-20T09:39:57.465393Z 0 [System] [MY-010910] [Server] /usr/bin/mysqld: Shutdown complete (mysqld 8.0.26)  Source distribution.
Sep 20 15:09:57 archlinux systemd[1]: mysqld.service: Main process exited, code=exited, status=1/FAILURE
░░ 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.
Sep 20 15:09:57 archlinux systemd[1]: mysqld.service: Failed with result 'exit-code'.
░░ 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 'exit-code'.
Sep 20 15:09:57 archlinux 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 3290 and the job result is failed.
Sep 20 15:09:57 archlinux systemd[1]: mysqld.service: Consumed 1.169s CPU time.
░░ Subject: Resources consumed by unit runtime
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ The unit mysqld.service completed and consumed the indicated resources.

1
  • Have you tried running mariadb? It is compatible with mysql(for all but special cases) works well for me.
    – Ned64
    Sep 20, 2021 at 10:46

1 Answer 1

0

Here is the relevant line in the error log I believe:

Sep 20 15:03:09 archlinux mysqld_pre_systemd[46391]: 2021-09-20T09:33:09.782008Z 0 [ERROR] [MY-013236] [Server] The designated data directory /var/lib/mysql/ is unusable. You can remove all files that the server added to it.

Scrolling shows "The designated data directory /var/lib/mysql/ is unusable."

Have you initialised you mysqld installation so that the folder is populated?

If no: Please see and follow e.g. https://dev.mysql.com/doc/refman/5.7/en/data-directory-initialization.html

If yes: Have you tried restoring that folder (also check owner/group/access mask) and perhaps emptying and re-initialising it (before you do: stop daemon and move files elsewhere, don't delete them)?

This is how the folder itself looks like on my system (example from non-arch but should be the same):

# ls -ld /var/lib/mysql
drwxr-xr-x. 5 mysql mysql 4096 Sep 13 00:13 /var/lib/mysql

How does it look like on your system? Any content?

1
  • I think I'll have to initialise the folder as you suggested; although, this is the first time I'll be using MySQL and Linux after 2 years of MSSQL. I will need some time. I'll get back to you in a day or two :) Thanks Sep 23, 2021 at 6:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.