Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mariadb 10.3.8: Installation from MariaDB repo , missing files?

Tags:

mariadb

I've installed MariaDB 10.3.8 on Ubuntu 18 Server, as follows:

sudo apt-get install software-properties-common
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
sudo add-apt-repository 'deb [arch=amd64,arm64,ppc64el] http://sfo1.mirrors.digitalocean.com/mariadb/repo/10.3/ubuntu bionic main'
sudo apt update
sudo apt install mariadb-server
sudo apt install mariadb-client

It does not start:

sudo service mariadb start
Job for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl -xe" for details.

Log:

systemctl status mariadb.service
● mariadb.service - MariaDB 10.3.8 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/mariadb.service.d
           └─migrated-from-my.cnf-settings.conf
   Active: failed (Result: exit-code) since Thu 2018-07-12 20:18:48 PDT; 46s ago
   Docs: man:mysqld(8)
       https://mariadb.com/kb/en/library/systemd/
  Process: 3392 ExecStartPost=/etc/mysql/debian-start (code=exited, status=203/EXEC)
  Process: 3359 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=exited, status=0/SUCCESS)
  Process: 3349 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ]
  Process: 3342 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
   Process: 3332 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
  Main PID: 3359 (code=exited, status=0/SUCCESS)

Status: "MariaDB server is down"

Then, I see a file that is missing:

sudo ls -l /etc/mysql/debian-start
ls: cannot access '/etc/mysql/debian-start': No such file or directory

Other files missing:

/etc/mysql/my.cnf
/etc/mysql/conf.d
/etc/mysql/mariadb.cnf
/etc/init.d/mysql
like image 683
freeAR Avatar asked Jul 13 '18 03:07

freeAR


People also ask

Where does MariaDB get installed?

The data directory location is controlled by the datadir variable. Look at your /etc/mysql/my. cnf file to see where your installation of MariaDB is configured to store data. The default is /var/lib/mysql but it is often changed, like for example if you are using a RAID array.

How do I install a specific version of MariaDB?

Note that you can add some parameters when you pull the file, like –mariadb-server-version=<version> that will override the default MariaDB Server version. Then don't forget to give the execution right to the script you just downloaded. You can now install the MariaDB server.

How do I create a MariaDB repository?

If you are looking to set up MariaDB Server, it is often easiest to use a repository. The MariaDB Foundation has a repository configuration tool at https://mariadb.org/download/ and MariaDB Corporation provides a convenient shell script to configure access to their MariaDB Package Repositories.

What version of MySQL is MariaDB?

MariaDB version numbers follow MySQL's numbering scheme up to version 5.5. Thus, MariaDB 5.5 offers all of the MySQL 5.5 features. There exists a gap in MySQL versions between 5.1 and 5.5, while MariaDB issued 5.2 and 5.3 point releases.


1 Answers

I found a solution:

The following command:

apt-get install --reinstall -o Dpkg::Options::="--force-confmiss" mariadb-server-10.3

Created some files:

/etc/mysql/conf.d
/etc/init.d/mysql
/etc/mysql/debian-start

And:

apt-get install --reinstall -o Dpkg::Options::="--force-confmiss" mysql-common

Created:

/etc/mysql/my.cnf
like image 158
freeAR Avatar answered Nov 15 '22 23:11

freeAR