Mysql安裝配置
1. 下載mysql5.5.18綠色版,mysql下載官網:mysql.com。
2. 解壓到目錄D:\mysql5.5.18。
3. 將mysql添加到環境變數path:
;D:\ mysql5.5.18\bin
4. 修改連接埠和字元集:在安裝目錄下找到my.ini設定檔開啟編輯,把連接埠改成3306(註:安裝的時候預設就是3306),並且把伺服器的字元集改成utf8(註:注意版本),如下:
# The following options will be passed to all MySQL clients
[client]
#password = your_password
port = 3306
socket = /tmp/mysql.sock
default-character-set=gbk
# Here follows entries for some specific programs
# The MySQL server
[mysqld]
port = 3306
socket = /tmp/mysql.sock
skip-locking
key_buffer_size = 256M
max_allowed_packet = 1M
table_open_cache = 256
sort_buffer_size = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 4M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size= 16M
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 8
default-character-set=utf8
log_bin_trust_function_creators = 1
注意:my.ini設定檔一定要有。
5. mysql資料庫安裝好後,找到其安裝目錄下data檔案夾,將資料庫檔案拷入data檔案夾內。然後啟動其安裝目錄下bin檔案夾裡面的mysqld。