This section gives a general overview of starting the MySQL server. The following sections provide more specific information for starting the MySQL server from the command line or as a Windows service.
The information here applies primarily if you installed MySQL
Noinstall version, or if you wish
to configure and test MySQL manually rather than with the GUI
The MySQL server will automatically start after using the MySQL Installer, and the MySQL Notifier GUI can be used to start/stop/restart at any time.
The examples in these sections assume that MySQL is installed
under the default location of
Files\MySQL\MySQL Server 5.7. Adjust the
path names shown in the examples if you have MySQL installed in
a different location.
Clients have two options. They can use TCP/IP, or they can use a named pipe if the server supports named-pipe connections.
For information about which server binary to run, see Section 220.127.116.11, “Selecting a MySQL Server Type”.
Testing is best done from a command prompt in a console window (or “DOS window”). In this way you can have the server display status messages in the window where they are easy to see. If something is wrong with your configuration, these messages make it easier for you to identify and fix any problems.
To start the server, enter this command:
"C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqld" --console
For a server that includes
you should see the messages similar to those following as it
starts (the path names and sizes may differ):
2013-09-24T12:55:18.897250Z 0 [Note] InnoDB: The first specified data file "ibdata1" did not exist : a new database to be created! 2013-09-24T12:55:18.897299Z 0 [Note] InnoDB: Need to create new data file "ibdata2" 2013-09-24T12:55:18.897492Z 0 [Note] InnoDB: Setting file "./ibdata1" size to 128 MB 2013-09-24T12:55:18.897509Z 0 [Note] InnoDB: Database physically writes the file full: wait ... 2013-09-24T12:55:19.013723Z 0 [Note] InnoDB: Setting file "./ibdata2" size to 250 MB 2013-09-24T12:55:19.013766Z 0 [Note] InnoDB: Database physically writes the file full: wait ... 2013-09-24T12:55:19.131808Z 0 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB 2013-09-24T12:55:19.571493Z 0 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB 2013-09-24T12:55:20.226902Z 0 [Note] InnoDB: Renaming log file ./ib_logfile101 to ./ib_logfile0 2013-09-24T12:55:20.227251Z 0 [Warning] InnoDB: New log files created, LSN=45781 2013-09-24T12:55:21.227716Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables 2013-09-24T12:55:21.228286Z 0 [Note] InnoDB: Setting file "./ibtmp1" size to 12 MB 2013-09-24T12:55:21.228334Z 0 [Note] InnoDB: Database physically writes the file full: wait ... 2013-09-24T12:55:21.329536Z 0 [Note] InnoDB: Doublewrite buffer not found: creating new 2013-09-24T12:55:21.476956Z 0 [Note] InnoDB: Doublewrite buffer created 2013-09-24T12:55:22.077524Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active. 2013-09-24T12:55:22.077564Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active. 2013-09-24T12:55:22.182853Z 0 [Warning] InnoDB: Creating foreign key constraint system tables. 2013-09-24T12:55:22.195621Z 0 [Note] InnoDB: Foreign key constraint system tables created 2013-09-24T12:55:22.195791Z 0 [Note] InnoDB: Creating tablespace and datafile system tables. 2013-09-24T12:55:22.202725Z 0 [Note] InnoDB: Tablespace and datafile system tables created. 2013-09-24T12:55:22.202844Z 0 [Note] InnoDB: Waiting for purge to start 2013-09-24T12:55:22.253342Z 0 [Note] InnoDB: 5.7.6 started; log sequence number 0
When the server finishes its startup sequence, you should see something like this, which indicates that the server is ready to service client connections:
mysqld: ready for connections Version: '5.7.6' socket: '' port: 3306
The server continues to write to the console any further diagnostic output it produces. You can open a new console window in which to run client programs.
If you omit the
the server writes diagnostic output to the error log in the data
C:\Program Files\MySQL\MySQL Server
5.7\data by default). The error log is
the file with the
.err extension, and may
be set using the
The accounts that are listed in the MySQL grant tables initially have no passwords. After starting the server, you should set up passwords for them using the instructions in Section 2.9.2, “Securing the Initial MySQL Accounts”.