You can start a mysql server in a console with mysqld. This will start a mysql server with default settings. If you want to run a mysql server with special settings then you can use the defaults-file parameter to specify your configuration.
1 |
sudo mysqld --defaults-file=/etc/mysql-1/my.cnf |
On ubuntu 14.04 with mysqld 5.5 I get a fatal error by using the defaults-file parameter.
Issue on ubuntu
As described for mysql_install_db we must stop apparmor before using the defaults-file parameter. With a running apparmor service we getting a similar error message:
Could not open required defaults file: /etc/mysql-1/my.cnf
1 2 3 4 |
151230 19:25:18 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql-1 Could not open required defaults file: /etc/mysql-1/my.cnf Fatal error in defaults handling. Program aborted 151230 19:25:18 mysqld_safe mysqld from pid file /var/run/mysql-1d/mysqld.pid ended |
Stopping apparmor will solve this issue.
1 |
sudo service apparmor teardown |
This means if you want to run a mysql server by using the defaults-file parameter then you must stop using apparmor.