Score:0

MariaDB installation using RPM failed

us flag

I'm trying to reinstall MariaDB since unable to restart the service. Using Centos 7.6.

Previous uninstalled was using yum but this install i'm using RPM since i chose for specific older version (10.3.17) that doesn't offer in yum package anymore.

Upon uninstalled i didn't remove any config files except in /home/mysql

Mine my.cnf datadir : home/mysql

However, my RPM installation has facing error :-

    # rpm -ivh MariaDB-*


Preparing...                          ################################# [100%]
Updating / installing...
   1:MariaDB-client-10.3.17-1.el7.cent################################# [ 25%]
   2:MariaDB-server-10.3.17-1.el7.cent################################# [ 50%]

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

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

    shell> /usr/bin/mysql_install_db --defaults-file=~/.my.cnf

You can also try to start the mysqld daemon with:

    shell> /usr/sbin/mysqld --skip-grant-tables --general-log &

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

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

Try 'mysqld --help' if you have problems with paths.  Using
--general-log gives you a log in /home/mysql that may be helpful.

The latest information about mysql_install_db is available at
https://mariadb.com/kb/en/installing-system-tables-mysql_install_db
You can find the latest source at https://downloads.mariadb.org and
the maria-discuss email list at https://launchpad.net/~maria-discuss

Please check all of the above before submitting a bug report
at http://mariadb.org/jira

chmod: cannot access ‘/home/mysql/mysql’: No such file or directory
   3:MariaDB-server-debuginfo-10.3.17-################################# [ 75%]
   4:MariaDB-client-debuginfo-10.3.17-################################# [100%]

Error log also showing

[ERROR] /usr/sbin/mysqld: unknown variable 'err-log=/var/log/mysqld.log'

Appreciate any helps. Thanks very much.

Grace Thompson avatar
gp flag
It is common for Yum or APT package installations to configure an error log file location under /var/log with an option like log-error=/var/log/mysqld.log in a server configuration file. Removing the path name from the option causes the host_name.err file in the data directory to be used.
Grace Thompson avatar
gp flag
So therefore, go to /etc/my.cnf, and change err-log to log-error, or just get rid of that line.
Score:0
us flag

However just now i've solved it myself by removing all RPM with --deps , renaming existing my.cnf file to other and removed /home/mysql folder. Reinstall the RPMs again without anymore issue. Anyways Grace thanks for the answer that should the alternative.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.