1

I try to configure mysql as mentioned here: https://websiteforstudents.com/install-erpnext-erp-platform-on-ubuntu-16-04-18-04-lts-with-nginx-mariadb-support/ on a Linux Mint 18.2 system.

I added innodb-file-format=barracuda to the [mysqld] section in /etc/mysql/mariadb.conf.d/50-server.cnf and restarted the mysql service. But these settings are taking no effect.

If I run following commands

sudo mysql -u root -p
SHOW VARIABLES LIKE 'innodb_file_format';

then I get following output.

+--------------------+----------+
| Variable_name      | Value    |
+--------------------+----------+
| innodb_file_format | Antelope |
+--------------------+----------+

The settings file ~/.my.cnf is not existing. Why are my settings taking no effect?

++++++++++++ UPDATE 2019-06-03 ++++++++++++

I think I found the issue now. /etc/mysql/mariadb.conf.d/50-server.cnf is the correct logfile and the settings were not overwritten by another *.cnf-file. After a restart of the PC, the changed settings were used. The problem is, that restarting the mysql service (sudo service mysql restart or sudo /etc/init.d/mysql restart) is not enough.

So the question should be:

How do I correctly restart mysql so that changes in the *.cnf-files get active?

wewa
  • 1,628
  • 1
  • 16
  • 35
  • 1
    Did you try to find my.cnf in these locations https://stackoverflow.com/questions/2482234/how-do-i-find-the-mysql-my-cnf-location – Bùi Đức Khánh Jun 22 '19 at 17:19
  • Yes, I checked all locations. But it seems I found the issue now. `sudo service mysql restart` was not enough to overtake the changes in `/etc/mysql/mariadb.conf.d/50-server.cnf`. I had to restart the PC so that the changes get used. How do I correctly restart mysql? – wewa Jun 22 '19 at 17:54

2 Answers2

0

First, you should try to find my.cnf in other locations like

How do I find the MySQL my.cnf location

If no luck, scan all *.cnf files in /etc/mysql/mariadb.conf.d/ because Mariadb may read all *.cnf as config in that folder

Therefore you may add this value on 50-server.cnf, but it is overwritten in another files

Hope this helps

Bùi Đức Khánh
  • 3,975
  • 6
  • 27
  • 43
  • Thank you for your answer. But please take a look at my updated question. The issue seems not to be with the `*.cnf`-files. – wewa Jun 23 '19 at 09:38
0

Don't do this:

systemctl restart mysqld

Instead, do:

systemctl stop mysqld
systemctl start mysqld

Not sure exactly what the syntax is for Debian's 'service' command but I believe that's just a wrapper around systemctl. Syntax should be easily found. Change the service name if your system uses something different, of course. I have found that for some services, doing a restart doesn't seem to reread the config files, while a stop and then start forces a complete reload and config file read.

Dan J.
  • 101
  • 5