Home Database Mysql Tutorial 如何从Windows命令行启动MySQL

如何从Windows命令行启动MySQL

Jun 07, 2016 pm 04:15 PM
mysql windows start up Command Line how

要想从命令行启动mysqld服务器,你应当启动控制台窗口(或DOS window)并输入命令: C: C:Program FilesMySQLMySQL Server 5.0binmysqld 根据系统中MySQL安装位置的不同,前面的例子中使用的路径也不同。 在非NT版本的Windows中,在后台启动mysqld。也就是,

   要想从命令行启动mysqld服务器,你应当启动控制台窗口(或“DOS window”)并输入命令:

  C:> C:Program FilesMySQLMySQL Server 5.0binmysqld

  根据系统中MySQL安装位置的不同,前面的例子中使用的路径也不同。

  在非NT版本的Windows中,在后台启动mysqld。也就是,服务器启动后,,你应当可以看见后面的命令提示。如果你用该方法在Windows NT、2000、XP或2003中启动服务器,服务器则在前台运行,在服务器退出前,不会出现命令提示。因此,当服务器运行时,应当打开另一个控制台窗口来运行客户端程序。

  下述命令可以停止MySQL服务器:

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

  该命令调用MySQL管理工具mysqladmin连接服务器并告知它关闭服务。该命令使用MySQL root用户连接,这是MySQL权限系统中的默认管理账户。请注意MySQL权限系统中的用户完全独立于Windows下的登录用户。

  如果mysqld不能启动,检查错误日志看看服务器是否写入了显示问题原因的任何消息。错误日志位于C:Program FilesMySQLMySQL Server 5.1data目录中。是带后缀.err的文件。还可以尝试将服务器启动为mysqld --console;此时,可以从窗口中获得一些有用的信息,可以帮助解决问题。

  最后选项是用--standalone --debug启动mysqld。此时,mysqld 写入日志文件C:mysqld.trace,应当包含mysqld不启动的原因。

  使用mysqld --verbose --help显示mysqld的所有选项。

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to solve the problem of third-party interface returning 403 in Node.js environment? How to solve the problem of third-party interface returning 403 in Node.js environment? Mar 31, 2025 pm 11:27 PM

Solve the problem of third-party interface returning 403 in Node.js environment. When we use Node.js to call third-party interfaces, we sometimes encounter an error of 403 from the interface returning 403...

The page is blank after PHP is connected to MySQL. What is the reason for the invalid die() function? The page is blank after PHP is connected to MySQL. What is the reason for the invalid die() function? Apr 01, 2025 pm 03:03 PM

The page is blank after PHP connects to MySQL, and the reason why die() function fails. When learning the connection between PHP and MySQL database, you often encounter some confusing things...

How to download okx trading platform How to download okx trading platform Mar 26, 2025 pm 05:18 PM

The OKX trading platform can be downloaded through mobile devices (Android and iOS) and computers (Windows and macOS). 1. Android users can download it from the official website or Google Play, and they need to pay attention to security settings. 2. iOS users can download it through the App Store or follow the official announcement to obtain other methods. 3. Computer users can download the client of the corresponding system from the official website. Always make sure to use official channels when downloading, and register, log in and security settings after installation.

How to efficiently integrate Node.js or Python services under LAMP architecture? How to efficiently integrate Node.js or Python services under LAMP architecture? Apr 01, 2025 pm 02:48 PM

Many website developers face the problem of integrating Node.js or Python services under the LAMP architecture: the existing LAMP (Linux Apache MySQL PHP) architecture website needs...

PHP optimistic locking combined with transaction deduction balance failed: How to ensure that the balance is correctly deducted in concurrency situations? PHP optimistic locking combined with transaction deduction balance failed: How to ensure that the balance is correctly deducted in concurrency situations? Mar 31, 2025 pm 11:42 PM

Detailed explanation of the problem of deducting balances in combination with PHP optimistic locks and transactions in this article will analyze in detail a balance deduction using PHP, optimistic locks and database transactions, only...

How to avoid third-party interfaces returning 403 errors in Node environment? How to avoid third-party interfaces returning 403 errors in Node environment? Apr 01, 2025 pm 02:03 PM

How to avoid the third-party interface returning 403 error in the Node environment. When calling the third-party website interface using Node.js, you sometimes encounter the problem of returning 403 error. �...

What should I do if Beyond Compare fails to case sensitivity when synchronizing Windows and Linux files? What should I do if Beyond Compare fails to case sensitivity when synchronizing Windows and Linux files? Apr 01, 2025 am 08:06 AM

The problem of comparing and synchronizing BeyondCompare files: Case sensitivity failure when using Beyond...

How to share the same page on the PC and mobile side and handle cache issues? How to share the same page on the PC and mobile side and handle cache issues? Apr 01, 2025 pm 01:57 PM

How to share the same page on the PC and mobile side and handle cache issues? In the nginx php mysql environment built using the Baota background, how to make the PC side and...

See all articles