如何从Windows命令行启动MySQL
要想从命令行启动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的所有选项。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

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 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...

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.

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...

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 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. �...

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? In the nginx php mysql environment built using the Baota background, how to make the PC side and...
