Database Reference
In-Depth Information
Options, options everywhere
Each individual program and utility included with MariaDB has its own set of
configuration options. Run one from the command line with --help and we'll
get a list of all the options the program has and what they are currently set to.
Run the command with --print-defaults and we'll see the values that we've set.
For example, here's the output of the mysql command-line client program on my
local machine:
shell> mysql --print-defaults
mysql would have been started with the following arguments:
--port=3306 --socket=/var/run/mysqld/mysqld.sock
If we want to see all of the default values for a command (what they would be if we
didn't have a config file), use --no-defaults --help --verbose . For example:
shell> mysqld --no-defaults --help --verbose
The list that gets printed by this command is quite long, so we won't show it here.
And it shows more information than just the default values of options. What we're
interested in for now is a table towards the end of the output that begins with:
Variables (--variable-name=value)
and boolean options {FALSE|TRUE}
Putting all of the above information into practice, I've created a fairly generic and
heavily commented example my.cnf file. It is available in the code bundle given
away with this topic.
There isn't space here to go into detail on the many options available for configuring
MariaDB. If we want to learn more, a good place to start is in the Optimization and
Tuning section of the MariaDB Knowledge Base available at https://mariadb.com/
kb/en/optimization-and-tuning/ .
Activating configuration changes
The last stop on our highlights tour of MariaDB configuration is how to activate
changes once we've made them. To do so, we need to reload or restart MariaDB.
On Windows, we perform the following command:
sc stop mysql
sc start mysql
These two commands assume that we set the service name to mysql (the default)
during installation. If we set it to a different name, we would specify that instead.
 
Search WWH ::




Custom Search