学院首页>网络编程>Mysql>[Mysql]让服务进程中自动加载Mysql服务

[Mysql]让服务进程中自动加载Mysql服务

作者:bjbs_270 来源:csdn 添加时间:2006-5-26 9:48:17

在安装mysql解压包时虽然安装成功但在WINDOW自动启动时无法加载MYSQL服务,通过在网上不断的找资料还有自己的实践终于搞定,希望对遇到这要问题的朋友有点作用,如何让MYSQL服务进程中自动加载MYSQL。

1.在 开始--》运行中执行 c:\mysql\bin\mysqld-nt -install (卸载时执行-uninstall)

2.把c:/mysql/my-medium.ini改名为my.ini并修改里面的相关配置拷到c:/winnt 或c:/winnts c:/windows 下

3.然后在开始--》运行 中执行 net start|stop|restart mysql

下面在本地机上采用安装的方式生成的my.ini

[注:要根据自己的实际情况修改相应的参数即可]

# MySQL Server Instance Configuration File

# ----------------------------------------------------------------------

# Generated by the MySQL Server Instance Configuration Wizard

#

#

# Installation Instructions

# ----------------------------------------------------------------------

#

# On Linux you can copy this file to /etc/my.cnf to set global options,

# mysql-data-dir/my.cnf to set server-specific options

# (@localstatedir@ for this installation) or to

# ~/.my.cnf to set user-specific options.

#

# On Windows you should keep this file in the installation directory

# of your server (e.g. C:\Program Files\MySQL\MySQL Server 4.1). To

# make sure the server reads the config file use the startup option

# "--defaults-file".

#

# To run run the server from the command line, execute this in a

# command line shell, e.g.

# mysqld --defaults-file="C:\Program Files\MySQL\MySQL Server 4.1\my.ini"

#

# To install the server as a Windows service manually, execute this in a

# command line shell, e.g.

# mysqld --install MySQL41 --defaults-file="C:\Program Files\MySQL\MySQL Server 4.1\my.ini"

#

# And then execute this in a command line shell to start the server, e.g.

# net start MySQL41

#

#

# Guildlines for editing this file

第 1 页,共 2 页 [1] [2]
站内搜索