灰儿 发表于 2011-12-12 14:09:24

MySql 服务器mysqld命令使用详解

本帖最后由 灰儿 于 2011-12-12 14:24 编辑

windows 系统启动/停止 mysql 服务器

启动:
mysql_home\bin\mysqld --console
mysql_home\bin\mysqld


停止:
mysqladmin -u root -p shutdown
Enter password:密码


显示mysqld的所有选项:
mysqld --help

使用mysqld --console命令详解

下载了noinstall 5.1版本的mysql ,为了测试mysql是正常,第一次可以尝试手动启动 MySql 服务器。

手动启动服务命令:
C:\>C:\Program Files\MySQL\MySQL Server 5.1\bin\mysqld --console

支持InnoDB的服务器启动时,你应当能看见下面的消息:
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 31457280(略)InnoDB: Doublewrite buffer not found: creating newInnoDB: Doublewrite buffer createdInnoDB: creating foreign key constraint system tablesInnoDB: foreign key constraint system tables created011024 10:58:25InnoDB: Started

服务器完成启动序列后,你应当能看见下述内容,表示 MySql 服务已经启动,可以登陆进行客户端连接:mysqld: ready for connectionsVersion: '5.1.2-alpha'socket: ''port: 3306服务器继续向控制台写入诊断输出。你可以打开新的控制台窗口运行客户端程序。
如果省略--console选项,服务器向数据目录(默认为C:\Program Files\MySQL\MySQL Server 5.1\data)中的错误日志写入诊断输出。错误日志文件的扩展名为.err。
页: [1]
查看完整版本: MySql 服务器mysqld命令使用详解