This section provides a quick introduction of the MySQL server daemon program. By default, MySQL server starts in standalone mode.
What Is mysqld?
mysqld is the MySQL server daemon program. The syntax to run mysqld is:
\mysql\bin\mysqld [OPTIONS]
mysqld version 5.0 supports about 65 options. You can get a list of supported options by running
this command:
\mysql\bin\mysqld --help --verbose
\mysql\bin\mysqld Ver 5.0.45-community-nt for Win32 on ia32 (MySQL
Community Edition (GPL))
Copyright (C) 2000 MySQL AB, by Monty and others
This software comes with ABSOLUTELY NO WARRANTY. This is free
software, and you are welcome to modify and redistribute it under the
GPL license
Starts the MySQL database server
Usage: \mysql\bin\mysqld [OPTIONS]
NT and Win32 specific options:
--install Install the default service (NT)
--install-manual Install the default service started
manually (NT)
--install service_name Install an optional service (NT)
--install-manual service_name Install an optional service started
manually (NT)
--remove Remove the default service from the
service list (NT)
--remove service_name Remove the service_name from the
service list (NT)
--enable-named-pipe Only to be used for the default server
(NT)
--standalone Dummy option to start as a standalone
server (NT)
Default options are read from the following files in the given order:
C:\my.ini C:\my.cnf C:\WINDOWS\my.ini C:\WINDOWS\my.cnf
C:\mysql\my.ini C:\mysql\my.cnf
The following groups are read: mysqld server mysqld-5.0
The following options may be given as the first argument:
--print-defaults Print the program argument list and exit
--no-defaults Don't read default options from any options
file
--defaults-file=# Only read default options from the given file#
--defaults-extra-file=# Read this file after the global files are read
-?, --help Display this help and exit.
--abort-slave-event-count=#
Option used by mysql-test for debugging and
testing of replication.
--allow-suspicious-udfs
Allows use of UDFs consisting of only one symbol
xxx() without corresponding xxx_init() or
xxx_deinit(). That also means that one can load
any function from any library, for example
exit() from libc.so
-a, --ansi Use ANSI SQL syntax instead of MySQL syntax.
This mode will also set transaction isolation
level 'serializable'.
--auto-increment-increment[=#]
Auto-increment columns are incremented by this
...
The easiest way to run mysqld is to run it without any options, which runs mysqld in the standalone mode,
since --standalone is a dummy option.
The Windows only option, --console, is useful, if you want error messages come back on the console window
instead of the log file.
Here is an example of starting MySQL server in standalone mode with error messages printed on the console:
\mysql\bin\mysqld --standalone --console
nnnnnn 9:26:35 InnoDB: Started; log sequence number 0 43665
nnnnnn 9:26:35 [Note] \mysql\bin\mysqld: ready for connections.
Version: '5.0.45-community-nt' socket: '' port: 3306 MySQL
Community Edition (GPL)