MySQL Server Startup Options

In order to properly setup our server we need to know what options are available, what those options do and how to specify them. There are literally hundreds of such options for the mysql server, but there are only few of them that we need to use for the basic server configuration. This blog is about how we can learn what options are available.

Most command line programs offers help information to tell us about the options it offers. There are two basic sources for this. The first source is to invoke the “man” or manual pages for the program. The second is to invoke that program with its help option, usually by following the name of the program with the option double dash help. The mysql server “mysqld” offers both of these. But unless we read the fine print we could get a little bit frustrated. Yes the “mysqld” dose have a man page, but that page basically tells us that we need to invoke the help option to learn anything. The man page itself is pretty short and uninformative regarding startup options. It only shows us the syntax for using them. The double dash help option isn’t much better (mysqld –help). It’s just gives us a quick overview of server program. But both of these options do send us to the right place to get all the information we could want, since there is so much information in the ultimate help file we need to use an additional option beyond just double dash help if we truly want to see everything. That option is the double dash verbose option (i.e. mysqld –verbose –help). So type the way it’s shown and then pressing the return key will get us what we want. Since there is so much information in this file, just retrieving it on the command line is little inconvenient, because most of the file scroll’s off the top of the terminal window. It can take like forever to locate everything. In the windows platform there isn’t even enough buffer space allocated to the command prompt program to scroll back to the top of it all. So it’s better if perform a little command line magic, and redirect the output of our request into creating a new file containing the results of our command for retrieving that help information.

The little greater then symbol means send the output to a new file at the following location. Once we have done this, we have our own mini manual file for the mysql server. We just have to open it in a text editor, to read all the options for the server. There are number of sections in this document, so I won’t go over all that it covers right now. We are interested in the only one thing at the moment, and that is the list of startup options for mysqld. This isn’t too hard to find since it takes up most of the space in this document. The first thing that we notice, that there are two form that the option can take.

 

All of the options have a long form, this just characterized by one or more words by the name of the option separated by hyphen characters, some options have a second shortcut form , in here this is the shortcut.

So now we know where to find the names and spellings of various mysql server startup options for mysqld.