MySQL 5.5.22 安裝配置筆記
1. 準(zhǔn)備文件
mysql解壓版 下載地址ftp://ftp.iij.ad.jp/pub/db/mysql/Downloads/MySQL-5.5/mysql-5.5.22-win32.zip
2. 解壓到本地目錄
D:\devTools\mysql
3. 把添加系統(tǒng)環(huán)境變量
MYSQL_HOME ==> D:\devTools\mysql (新建)
Path ==> ;%MYSQL_HOME%\bin (追加)
4. 修改MySQL5.5的配置文件,把my-small.ini改名為my.ini進(jìn)行編輯
a)在[mysqld]下追加
-------
basedir = "d:\\devTools\\mysql"
datadir = "d:\\devTools\\mysql\\data"
character-set-server = utf8
-------
b) 在[client]下追加
-------
default-character-set = utf8
-------
5. 保存my.ini的配置, 然后打開命令行(開始菜單==>運(yùn)行==>cmd )
輸入: mysqld --console 然后回車將看到如下類似內(nèi)容:
-------
C:\Windows\system32>mysqld --console
120410 14:25:22 [Note] Plugin 'FEDERATED' is disabled.
120410 14:25:22 InnoDB: The InnoDB memory heap is disabled
120410 14:25:22 InnoDB: Mutexes and rw_locks use Windows interlocked functions
120410 14:25:22 InnoDB: Compressed tables use zlib 1.2.3
120410 14:25:22 InnoDB: Initializing buffer pool, size = 128.0M
120410 14:25:22 InnoDB: Completed initialization of buffer pool
120410 14:25:22 InnoDB: highest supported file format is Barracuda.
120410 14:25:22 InnoDB: Waiting for the background threads to start
120410 14:25:23 InnoDB: 1.1.8 started; log sequence number 1595675
120410 14:25:23 [Note] Event Scheduler: Loaded 0 events
120410 14:25:23 [Note] mysqld: ready for connections.
Version: '5.5.22' socket: '' port: 3306 MySQL Community Server (GPL)
-------
==> 證明mysql服務(wù)已啟動(dòng)
6. 設(shè)置登陸mysql root帳號(hào)的的密碼
打開新的命令行,輸入 mysql -uroot 回車
-------
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.5.22 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.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
-------
==〉看到上面類似內(nèi)容說明登陸成功,此時(shí)的root帳號(hào)是沒有密碼的
執(zhí)行命令修改密碼: update user set password=PASSWORD("這里填寫你要設(shè)置的密碼") where user='root';
執(zhí)行完成后退出mysql操作,然后關(guān)閉mysql服務(wù)(ctrl+C 關(guān)閉另一個(gè)命令窗口),然后重啟mysql服務(wù)
mysql解壓版 下載地址ftp://ftp.iij.ad.jp/pub/db/mysql/Downloads/MySQL-5.5/mysql-5.5.22-win32.zip
2. 解壓到本地目錄
D:\devTools\mysql
3. 把添加系統(tǒng)環(huán)境變量
MYSQL_HOME ==> D:\devTools\mysql (新建)
Path ==> ;%MYSQL_HOME%\bin (追加)
4. 修改MySQL5.5的配置文件,把my-small.ini改名為my.ini進(jìn)行編輯
a)在[mysqld]下追加
-------
basedir = "d:\\devTools\\mysql"
datadir = "d:\\devTools\\mysql\\data"
character-set-server = utf8
-------
b) 在[client]下追加
-------
default-character-set = utf8
-------
5. 保存my.ini的配置, 然后打開命令行(開始菜單==>運(yùn)行==>cmd )
輸入: mysqld --console 然后回車將看到如下類似內(nèi)容:
-------
C:\Windows\system32>mysqld --console
120410 14:25:22 [Note] Plugin 'FEDERATED' is disabled.
120410 14:25:22 InnoDB: The InnoDB memory heap is disabled
120410 14:25:22 InnoDB: Mutexes and rw_locks use Windows interlocked functions
120410 14:25:22 InnoDB: Compressed tables use zlib 1.2.3
120410 14:25:22 InnoDB: Initializing buffer pool, size = 128.0M
120410 14:25:22 InnoDB: Completed initialization of buffer pool
120410 14:25:22 InnoDB: highest supported file format is Barracuda.
120410 14:25:22 InnoDB: Waiting for the background threads to start
120410 14:25:23 InnoDB: 1.1.8 started; log sequence number 1595675
120410 14:25:23 [Note] Event Scheduler: Loaded 0 events
120410 14:25:23 [Note] mysqld: ready for connections.
Version: '5.5.22' socket: '' port: 3306 MySQL Community Server (GPL)
-------
==> 證明mysql服務(wù)已啟動(dòng)
6. 設(shè)置登陸mysql root帳號(hào)的的密碼
打開新的命令行,輸入 mysql -uroot 回車
-------
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.5.22 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.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
-------
==〉看到上面類似內(nèi)容說明登陸成功,此時(shí)的root帳號(hào)是沒有密碼的
執(zhí)行命令修改密碼: update user set password=PASSWORD("這里填寫你要設(shè)置的密碼") where user='root';
執(zhí)行完成后退出mysql操作,然后關(guān)閉mysql服務(wù)(ctrl+C 關(guān)閉另一個(gè)命令窗口),然后重啟mysql服務(wù)
posted on 2012-04-11 01:22 Lotn 閱讀(380) 評(píng)論(0) 編輯 收藏