# MariaDB missing all cnf files



## timmc (Aug 17, 2018)

I am installing FEMP on a digital ocean droplet. NGINX and PHP install worked fine. However after installing the MariaDB pkg, 'my.cnf' as well as all the sample .cnf files seem to be missing. The "pkg install" command does not show any errors. I tried to install 10.1, 10.2 and 10.3 all with the same results. "sudo service -v mysql-server start" doesn't show any errors. The exact commands I am running are:

```
$ sudo pkg install mariadb103-server mariadb103-client
$ sudo sysrc mysql_enable="YES" 
$ sudo service mysql-server start
```
Per some other threads, I checked the ownership of the /var/db/mysql/ directory:

drwxr-xr-x  3 mysql     mysql           3 Aug 17 03:18 mysql

I also deleted all the files in that directory and tried restarting, but that did not help either.

I have used UNIX on and off (mostly off) for many years and am a little rusty. I suspect there is something simple I am missing, but don't know where to look next.


----------



## SirDice (Aug 17, 2018)

timmc said:


> However after installing the MariaDB pkg, 'my.cnf' as well as all the sample .cnf files seem to be missing.


You don't need them, it already starts using some sane defaults _without_ a my.cnf. And tuning MySQL is going to depend heavily on _your_ usage.


----------



## timmc (Aug 17, 2018)

OK, thanks for you response! However, I am still having problems.

MariaDB will not start and run using this command:

$ sudo service mysql-server start

It tries to start, but when the prompt returns, its not running.
The only thing in /var/db/mysql is a subdirectory 'mysql'

I created a my.cnf file and put error_log directives for both mysqld and mysqld_safe

No difference when I try to start using pkg service start - still no log file.

So I tried starting it from the command line:

$ ./mysql.server start
Starting MariaDB.180817 17:49:29 mysqld_safe Logging to '/var/log/mysql/mysql_error.log'.
180817 17:49:29 mysqld_safe Starting mysqld daemon with databases from /var/db/mysql
 ERROR!

As I said /var/db/mysql is empty except for the /mysql subdirectory

I have an older version of the MySQL Reference Manual, but haven't found any help there either. And everything I search for on the 'net just assumes that it works fine and I should be able to connect using the 'mysql' command. (Which did happen when I installed locally on Windows.)

Any other ideas?


----------



## timmc (Aug 19, 2018)

I am not going to draw any conclusions from this, but I will identify all the various tests I performed while getting it to run. Note that the only commands I ran during any of these tests were as follows:

sudo pkg install mariadbXXY-server
sudo sysrc mysql_enable=YES
sudo service mysql-server start
sudo service mysql-server stop
sudo pkg remove mariadbXXY-server

Each test was run on a fresh DigitalOcean 11.2 server

Test 1: 
installed 10.0 (worked fine)
remove 10.0
installed 10.1 (worked fine)
remove 10.1
installed 10.2 (worked fine)
removed 10.2
installed 10.3 FAILED
removed 10.3 
installed 10.2 FAILED

Test 2:
Installed 10.3 FAILED

Test 3:
Installed 10.2 (worked fine)

I am going to run on 10.2 since it is working.


----------



## stratacast1 (Sep 13, 2018)

Hey, thought I'd chime in since I just encountered this myself on FreeBSD 11.2. I found that mariadb103-server/client was missing all these files as well and instead using mariadb102-server/client works properly, I get the config files but it does not start for me. Which, is kinda frustrating since I have 3 other pre-11.2 servers currently running this exact config. Pretty silly if you ask me

EDIT: got it to start by just nuking everything that mysql creates, then it recreated everything


----------

