windows 下使用免安裝版MySql5.5

windows 下使用面安裝版MySql5.5步驟如下

1、解壓下載的壓縮文件到指定文件夾。如:F:\DB\mysql-5.5.18-win32\mysql-5.5.18-win32;

2、在根目錄F:\DB\mysql-5.5.18-win32\mysql-5.5.18-win32下創建配置文件my.ini,可從根目錄中的my-huge.ini,my-innodb-heavy-4G.ini,my-large.ini,my-medium.ini,my-small.ini下複製一個將其名稱改為my.ini;

用記事本打開my.ini并在其中添加如下內容

# set basedir to your installation path
basedir=F:/DB/mysql-5.5.18-win32/mysql-5.5.18-win32

# set datadir to the location of your data directory
datadir=F:/DB/data

character-set-server = utf8
collation-server = utf8_general_ci

3、如果是win7系統並且你在my.ini中配置了datadir參數,記得將解壓出來的mysql跟目錄下的data文件裏面的內容夾複製到my.ini文件中配置的datadir指定的目錄下,這裡是F:/DB/data。否則數據庫無法啟動。

4、配置windows系統環境變量,添加MYSQL_HOME  = F:/DB/mysql-5.5.18-win32/mysql-5.5.18-win32,在PATH中添加%MYSQL_HOME%\bin。

5、在doc命令行下輸入命令:mysqld -u -root啟動mysql服務;

6、新開一個doc窗口,輸入命令:mysql,顯示如下信息則說明服務啟動成功

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.5.18-log MySQL Community Server (GPL)

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

至此,mysql安裝完成。

转自:http://www.cnblogs.com/samkin/archive/2013/01/16/2862200.html

上一篇:centos6.5 命令行配置无线上网


下一篇:格式化日期时间字符串 Get-Date -Uformat , -format