MySql noinstall-5.1.34-win32 配置

MySql noinstall-5.1.34-win32 配置

1. 解压mysql-noinstall-5.1.34-win32.zip 到你喜欢的目录,例如:E:\soft_install\mysql-5.1.34-win32

2. 在根目录E:\soft_install\mysql-5.1.34-win32中有五个配置信息文件:my-small.ini (memory <= 64M),my-medium.ini (memory 128M ),my-large.ini (memory 512M), my-huge.ini (memory 1G-2G),my-innodb-heavy-4G.ini (memory 4GB),选择其中一个适合自己机子的配置文件。假设选择了my-medium.ini,拷贝到目录C:\WINDOWS,改名为my.ini,并修改一下部分

[mysqld]

# set basedir to your installation path
basedir=E:/soft_install/mysql-5.1.34-win32
# set datadir to the *** of your data directory
datadir=E:/soft_install/mysql-5.1.34-win32/data

# 设置mysql服务器的字符集
default-character-set=utf8

[client]
# 设置mysql客户端的字符集
default-character-set=gbk
 

请注意在选项文件中使用正斜线儿不是反斜线指定Windows路径名。如果使用反斜线,必须用双反斜线:

[mysqld]
# set basedir to your installation path
basedir=E:\\soft_install\\mysql-5.1.34-win32
# set datadir to the location of your data directory
datadir=E:\\soft_install\\mysql-5.1.34-win32\\data

3. 打开dos命令行窗口,进入到目录E:\soft_install\mysql-5.1.34-win32\bin>

E:\soft_install\mysql-5.1.34-win32\bin>mysqld install
Service successfully installed.

E:\soft_install\mysql-5.1.34-win32\bin>net start mysql
The MySQL service is starting.
The MySQL service was started successfully.
E:\soft_install\mysql-5.1.34-win32\bin>mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.34-community MySQL Community Server (GPL)

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

mysql> exit
Bye

E:\soft_install\mysql-5.1.34-win32\bin>net stop mysql
The MySQL service is stopping.
The MySQL service was stopped successfully.

E:\soft_install\mysql-5.1.34-win32\bin>mysqld remove
Service successfully removed.

转自:http://www.cnblogs.com/qiongchun/archive/2009/05/02/1447958.html

你可能感兴趣的:(数据库,mysql,职场,休闲)