用戶工具

網站工具


mysql

這是本文件的舊版!


MySQL 資料庫

密碼管理

安裝 MySQL 後 root 管理者帳號預設是沒有密碼的,會有安全性問題

# mysqladmin -u root password newpassword
# mysqladmin -u root -p flush-privileges

避免亂碼

請在 my.cnf (my.ini) 設定檔內加入下列設定。

[client]
default-character-set=utf8

[mysqld]
default-character-set=utf8
init_connect='SET NAMES utf8'

phpMyAdmin

安裝

複製 config.sample.inc.php 到 config.inc.php

編輯 config.inc.php 內容

修改設定 $cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */

變更成 http 認證模式 $cfg['Servers'][$i]['auth_type'] = 'http';

問題

  1. 無法讀取 mysql 模組,<br />請檢查 PHP 設定
    • 安裝 php-mysql 解決
  2. 找不到 PHP 內的 mbstring 編碼模組, 沒有這個模組, phpMyAdmin 無法準確地分割雙字元文字, 而可能產生問題
    • 安裝 php-mbstring 解決
  3. 設定檔案現在需要密碼 (passphrase) (blowfish_secret).
    • 修改 config.inc.php 的 $cfg['blowfish_secret'] 解決
  4. 無法讀取 mcrypt 模組,<br />請檢查 PHP 設定
mysql.1236307860.txt.gz · 上一次變更: 2010/08/23 15:30 (外部編輯)