0

I have Ubuntu 14.04 with MariaDB Galera cluster installed. My cluster has just one node now, so I restart the mysql service using: sudo service mysql restart --wsrep-new-cluster How can I set this option to be added automatically when a program restarts the mysql service? In example, I need this when I install a new PHP module, because PHP tries to restart automatically mysql service but it doesn't work without the --wsrep-new-cluster option.

1 Answers1

0

I just realized the way to achieve my goal:

  1. Edit my.cnf file (it is usually located in /etc/mysql/).
  2. Locate [mysqld] group ("Basic Settings").
  3. Write wsrep-new-cluster inside [mysqld] group (I added it under skip-external-locking option).
  4. Save my.cnf file and exit.
  5. Try sudo service mysql restart from terminal. This should work without add more options.

Source: http://dev.mysql.com/doc/refman/5.7/en/option-files.html