Skip to main content
Topic: Creating mariadb database fails with mariadb-openrc (Read 64 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Creating mariadb database fails with mariadb-openrc

artix:[root]:~# /etc/init.d/mariadb setup
mariadb          | * Creating a new MySQL database ...
mariadb          |/bin/mysql_install_db: Deprecated program name. It will be removed in a future release, use 'mariadb-install-db' instead
mariadb          |
mariadb          |FATAL ERROR: Could not find ./share/mysql/fill_help_tables.sql
mariadb          |
mariadb          |If you compiled from source, you need to either run 'make install' to
mariadb          |copy the software into the correct location ready for operation.
mariadb          |If you don't want to do a full install, you can use the --srcdir
mariadb          |option to only install the mysql database and privilege tables.
mariadb          |
mariadb          |If you are using a binary release, you must either be at the top
mariadb          |level of the extracted archive, or pass the --basedir option
mariadb          |pointing to that location.
mariadb          |
mariadb          |The latest information about mariadb-install-db is available at
mariadb          |https://mariadb.com/kb/en/installing-system-tables-mysql_install_db                                                                                             [ !! ]
artix:[root]:~#

---------------------------------------------------------------------------------------------------------

artix:[root]:~# rc-service mariadb start
mariadb          | * Datadir '/var/lib/mysql' is empty or invalid.
mariadb          | * Run '/etc/init.d/mariadb setup' to create new database.
mariadb          | * ERROR: mariadb failed to start

----------------------------------------------------------------------------------------------------------

artix:[root]:~# mariadb -u root@localhost
ERROR 2002 (HY000): Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)

------------------------------------------------------------------------------------------------------------

Maybe it did not find the correct directories ?
I read also following guide,
https://dev.to/sujit-shrc/mariadb-installation-made-easy-a-guide-for-arch-based-linux-users-19o4