[solved]Mariadb won't start after install for LAMP stack

had to do a clean installation last night because I broke EOS playing around. Today I went to install my LAMP stack for website testing but mariadb comes back with a failure to start issue. I have reinstalled numerous times with the same result. Before I did the reinstall it was working fine. below is my journal log for the error. When I try to uninstall mariadb pacman comes back with β€œno target found”

edward@Dragon ~]$ journalctl -xeu mariadb.service
May 23 09:00:42 Dragon mariadbd[2589]: 2022-05-23  9:00:42 0 [Note] Server socket created on IP: '0.0.0.0'.
May 23 09:00:42 Dragon mariadbd[2589]: 2022-05-23  9:00:42 0 [Note] Server socket created on IP: '::'.
May 23 09:00:42 Dragon mariadbd[2589]: 2022-05-23  9:00:42 0 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.db' doesn't exist
May 23 09:00:42 Dragon mariadbd[2589]: 2022-05-23  9:00:42 0 [ERROR] Aborting
May 23 09:00:44 Dragon mariadbd[2589]: Warning: Memory not freed: 280
May 23 09:00:44 Dragon systemd[1]: mariadb.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 mariadb.service has exited.
β–‘β–‘ 
β–‘β–‘ The process' exit code is 'exited' and its exit status is 1.
May 23 09:00:44 Dragon 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'.
May 23 09:00:44 Dragon systemd[1]: Failed to start MariaDB 10.7.3 database server.
β–‘β–‘ Subject: A start job for unit mariadb.service has failed
β–‘β–‘ Defined-By: systemd
β–‘β–‘ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
β–‘β–‘ 
β–‘β–‘ A start job for unit mariadb.service has finished with a failure.
β–‘β–‘ 
β–‘β–‘ The job identifier is 1335 and the job result is failed.

Can anyone help with this problem?

you have run the following command line, bevor first start of mariadb?

mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql

if not and you have a clean install, then run the command above.

if you have create database(s) then delete all content in /var/lib/mysql and run the command above.

1 Like

uninstall mariadb pacman comes back with β€œno target found”

can you post the terminal output? with the command you have used.

The command you have me worked. I now have it up and running. Thank you.

As for the terminal command. All I would get was no target found when I went to use:

Sudo pacman -R mysql
1 Like

nice :wink:

you have used the wrong package name. mariadb is the package name.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.