Spec-Zone .ru
спецификации, руководства, описания, API
|
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 using the Noinstall
version, or if you wish to configure and test MySQL manually rather than with the GUI tools.
The MySQL server will automatically start after using the MySQL Installer, and the MySQL Notifier for Microsoft Windows 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 C:\Program Files\MySQL\MySQL Server 5.6
. 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.
MySQL for Windows also supports shared-memory connections if the server is started with the --shared-memory
option. Clients can connect through shared memory by using the --protocol=MEMORY
option.
For information about which server binary to run, see Section 2.3.5.3, "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:\> "C:\Program Files\MySQL\MySQL Server
5.6\bin\mysqld" --console
For a server that includes InnoDB
support, you should see the messages similar to
those following as it starts (the path names and sizes may differ):
InnoDB: The first specified datafile c:\ibdata\ibdata1 did not exist:InnoDB: a new database to be created!InnoDB: Setting file c:\ibdata\ibdata1 size to 209715200InnoDB: Database physically writes the file full: wait...InnoDB: Log file c:\iblogs\ib_logfile0 did not exist: new to be createdInnoDB: Setting log file c:\iblogs\ib_logfile0 size to 31457280InnoDB: Log file c:\iblogs\ib_logfile1 did not exist: new to be createdInnoDB: Setting log file c:\iblogs\ib_logfile1 size to 31457280InnoDB: Log file c:\iblogs\ib_logfile2 did not exist: new to be createdInnoDB: Setting log file c:\iblogs\ib_logfile2 size to 31457280InnoDB: Doublewrite buffer not found: creating newInnoDB: Doublewrite buffer createdInnoDB: creating foreign key constraint system tablesInnoDB: foreign key constraint system tables created011024 10:58:25 InnoDB: Started
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 connectionsVersion: '5.6.13' 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 --console
option, the server writes diagnostic output to the error log in the data directory (C:\Program
Files\MySQL\MySQL Server 5.6\data
by default). The error log is the file with the .err
extension, and may be set using the --log-error
option.
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.10, "Postinstallation Setup and Testing".