|
Home >> FAQs/Tutorials >> MySQL Tutorials >> Index
MySQL FAQs - Server Daemon mysqld Administration
By: FYIcenter.com
Part:
1
2
3
4
A collection of 12 FAQs on MySQL server mysqld administration. Clear answers are provided with tutorial exercises on starting and shuting down the server; turning on server log files; viewing binary log files; running server on different port numbers.
Topics included in this collection are:
- What Is the MySQL Server Daemon - mysqld?
- What Are the "mysqld" Command Line Options?
- How To Start MySQL Server Daemon mysqld?
- How To Properly Shutdown MySQL Server Daemon mysqld?
- How Much Memory Does the Server Take?
- How To Turn on Query Logs?
- How To Turn on Error Logs?
- What Is Binary Log File?
- How To Turn on Binary Logs?
- How To Use mysqlbinlog to View Binary Logs?
- How To Run MySQL Server on a Different Port?
- How To Connect to MySQL Server on a Different Port?
Please note that all answers and tutorials are based on MySQL 5.0.
What Is the MySQL Server Daemon - mysqld?
"mysqld" is MySQL server daemon program which runs quietly in background on
your computer system. Invoking "mysqld" will start the MySQL server on your system.
Terminating "mysqld" will shutdown the MySQL server.
Here is a tutorial example of invoking "mysqld" with the "--console" option:
>cd \mysql\bin
>mysqld --console
... 19:52:54 InnoDB: Started; log sequence number 0 43655
... 19:52:54 [Note] mysqld: ready for connections.
Version: '5.0.24-community' socket: '' port: 3306
MySQL Community Edition (GPL)
What Are the "mysqld" Command Line Options?
"mysqld" offers a big list of command line options. Here are some
commonly used options:
- "--help" - Displays a short help message on how to use "mysqld".
- "--verbose --help" - Displays a long help messages on how to use "mysqld".
- "--console" - Specifies that the server to send error messages to launching window.
- "--datadir=dirName" - Specifies that server data goes to the specified director.
- "--init-file=fileName" - Specifies that server to execute all commands in the specified file at startup time.
- "--log=fileName" - Specifies that server to write query logs to the specified file.
- "--log-bin=fileBaseName" - Specifies that server to write binary logs to a file with the specified file base name.
- "--log-error=fileName" - Specifies that server to write error logs to the specified file.
- "--port=portNumber" - Specifies that server to listen client connections at the specified port number.
- "--version" - Returns the version information of the server.
How To Start MySQL Server Daemon mysqld?
There are a number of ways to start MySQL server daemon, mysqld:
- Double click on the file name, mysqld.exe, in a file explorer window.
This is an easy way to start the server. But you will not be able to specify any command line options.
- Enter "mysqld" command with options in a command window.
- Create a launch shell script with "mysqld" command and its options.
Then run the script to start the server.
- Create a Windows system service with "mysqld" command and its options.
Then run the service to start the server.
How To Properly Shutdown MySQL Server Daemon mysqld?
The proper way to shutdown your MySQL server is to the use "mysqladmin shutdown"
command. Other ways to shutdown your server include:
- Enter "mysqladmin -u root -ppassowrd shutdown" command with options in a command window.
- Use Windows Task Manager to end the process: "mysqld.exe".
- Of course, shutdown the computer system will also shutdown your MySQL server.
How Much Memory Does the Server Take?
If you are interested to know how much memory your MySQL server is taking,
you can use Windows Task Manager to find out. Try to following this tutorial exercise:
- Start your MySQL server.
- Press Ctrl-Alt-Del and click Task Manager. The Task Manager window shows up.
- Click the Process tab. Then click the Image Name to sort processes by name.
- Locate the "mysqld.exe" entry. See the Mem Usage column. mysqld.exe should use something
like 9,000K to 10,000K initially. But memory usage will grow as more client programs are
connecting to MySQL server.
(Continued on next part...)
Part:
1
2
3
4
|