You are not logged in.

#1 2023-07-02 08:17:58

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,687

[Solved] mariadb-install-db error on initialization

As mentioned in the wiki, I tried running mariadb-install-db --user=mysql --basedir=/usr datadir=/var/lib/mysql but I'm getting these errors:

2023-07-02  9:01:16 0 [ERROR] mariadbd: Can't create/write to file '/home/friode/data/aria_log_control' (Errcode: 13 "Permission denied")
2023-07-02  9:01:16 0 [ERROR] mariadbd: Got error 'Can't create file' when trying to use aria control file '/home/friode/data/aria_log_control'
2023-07-02  9:01:16 0 [ERROR] Plugin 'Aria' init function returned error.
2023-07-02  9:01:16 0 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
2023-07-02  9:01:17 0 [ERROR] Failed to initialize plugins.
2023-07-02  9:01:17 0 [ERROR] Aborting
2023-07-02  9:01:17 0 [ERROR] InnoDB: Cannot open '/home/friode/data/ib_buffer_pool.incomplete' for writing: Permission denied

Installation of system tables failed!  Examine the logs in
./data for more information.

The problem could be conflicting information in an external
my.cnf files. You can ignore these by doing:

    shell> /usr/bin/mariadb-install-db --defaults-file=~/.my.cnf

You can also try to start the mariadbd daemon with:

    shell> /usr/bin/mariadbd --skip-grant-tables --general-log &

and use the command line tool /usr/bin/mariadb
to connect to the mysql database and look at the grant tables:

    shell> /usr/bin/mariadb -u root mysql
    MariaDB> show tables;

Try '/usr/bin/mariadbd --help' if you have problems with paths.  Using
--general-log gives you a log in ./data that may be helpful.

I can implement the suggestedremidies but I'd like first to understand why I'm getting these errors and understand the implications of the suggested remedies before I apply any of them. An explanation is highly appreciated.

Last edited by d_fajardo (2023-07-02 21:37:19)

Offline

#2 2023-07-02 12:05:43

jonno2002
Member
Registered: 2016-11-21
Posts: 877

Re: [Solved] mariadb-install-db error on initialization

did you run that command as root ?

EDIT: i think you missed the "--" before datadir

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

Last edited by jonno2002 (2023-07-02 12:16:50)

Offline

#3 2023-07-02 21:36:47

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,687

Re: [Solved] mariadb-install-db error on initialization

For some reason, the magic of reboot made it work.

Offline

Board footer

Powered by FluxBB