Start MySQL_MySQL from the Windows command line

Source: Internet
Author: User
Start MySQL from the Windows command line to start the mysqld server from the command line, you should start the console window (or "DOS window") and enter the command:
C:> C: Program FilesMySQLMySQL Server 5.0 inmysqld

The path used in the preceding example varies depending on the MySQL installation location in the system.

In non-NT Windows, start mysqld in the background. That is, after the server is started, you should be able to see the following command prompt. If you use this method to start the server in Windows NT, 2000, XP, or 2003, the server runs on the front-end. no command prompt is displayed before the server exits. Therefore, when the server is running, you should open another console window to run the client program.

Run the following command to stop the MySQL server:

C:> C: Program FilesMySQLMySQL Server 5.0 inmysqladmin-u root shutdown

This command calls MySQL management tool mysqladmin to connect to the server and notify it to disable the service. This command uses the MySQL root user to connect. this is the default management account in the MySQL permission system. Note that users in the MySQL permission system are completely independent from those logged on to Windows.

If mysqld cannot be started, check the error log to see if the server has written any message indicating the cause of the problem. The error log is located in the directory C: Program FilesMySQLMySQL Server 5.1data. Is a file with a suffix. err. You can also start the server as mysqld -- console. in this case, you can obtain some useful information from the window to help solve the problem.

The final option is to start mysqld with -- standalone -- debug. In this case, mysqld writes the log file C: mysqld. trace, which should contain the reason why mysqld is not started.

Use mysqld -- verbose -- help to display all the options of mysqld.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.