0

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.

Daniel
  • 1
  • 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 Aug 25 '21 at 04:04
  • So therefore, go to /etc/my.cnf, and change err-log to log-error, or just get rid of that line. – Grace Thompson Aug 25 '21 at 04:08

1 Answers1

0

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.

Daniel
  • 1