[分享] phpMyAdmin 登入時 及/或 phpBB 安裝時出現要求 Upgarde MySQL

phpMyAdmin Running Discuss
關於 phpMyAdmin 架設使用操作討論,非本程式相關問題一律砍文!

版主: 版主管理群

回覆文章
littlebean.net
星球普通子民
星球普通子民
文章: 3
註冊時間: 2005-12-16 11:08

[分享] phpMyAdmin 登入時 及/或 phpBB 安裝時出現要求 Upgarde MySQL

文章 littlebean.net »

小弟這幾天在試裝 phpBB 2.0.18, 遇上了問題, 爬了些文, 發現也有不少新手遇上問題, 所以在此分享一下, 如有錯漏, 敬希各位大大指正\r

平台: MS Windows XP Pro SP2 Eng (on FAT32) + IIS 5.1 + PHP 4.4.1 + MySQL 4.1.15 (Essential Package) + phpBB 2.0.18

裝好了各樣的軟件後(大概依上面的次序), 執行 {my domain}/phpBB2/install/install.php 安裝時遇上以下問題

---------------------------------------------------------------------------------------------------------------------------------
Warning: mysql_connect(): Client does not support authentication protocol requested by server;
consider upgrading MySQL client in ...\phpbb2\db\mysql4.php on line 48

Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in
...\phpbb2\db\mysql4.php on line 330

Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in
...\phpbb2\db\mysql4.php on line 331
---------------------------------------------------------------------------------------------------------------------------------
\n
再爬爬文, 發現很多大大都在用 phpMyAdmin 來管理, 也下載了 2.6.4 pl4 及 2.7.0 pl1, 跟著大大們的建議修改了 config.inc.php 後, 也出現同樣的問題, 再以"phpMyAdmin"搜索, 發現了這篇文章, 在 MySQL Command Line Client 登入後, 執行 SET PASSWORD FOR {username}@{hostname} = OLD_PASSWORD('{password}'); (注意大小寫) 就能順利安裝 phpBB

http://phpbb-tw.net/phpbb/viewtopic.php?t=40453

至於phpMyAdmin, 所了以上修正後, 修改了 config.inc.php 成下面的樣子 (只顯示修改的部份), 亦能登入及建立新的戶口, 由於本人把 $cfg['Servers'][$i]['auth_type'] 設成 "http" 時會出現"Not Authorized" 之類的錯誤, 所以改用了 "cookie", 同時亦由於使用cookie, 必須要設定 $cfg['blowfish_secret']

代碼: 選擇全部

$cfg['PmaAbsoluteUri'] = 'http://{my domain}/phpMyAdmin';

$cfg['blowfish_secret'] = 'XXXXXX';                  //任意字串\r

$cfg['Servers'][$i]['host']          = 'localhost'; // MySQL hostname or IP address
$cfg['Servers'][$i]['port']          = '';          // MySQL port - leave blank for default port
$cfg['Servers'][$i]['socket']        = '';          // Path to the socket - leave blank for default socket
$cfg['Servers'][$i]['connect_type']  = 'tcp';       // How to connect to MySQL server ('tcp' or 'socket')
$cfg['Servers'][$i]['extension']     = 'mysql';     // The php MySQL extension to use ('mysql' or 'mysqli')
$cfg['Servers'][$i]['compress']      = FALSE;       // Use compressed protocol for the MySQL connection
                                                    // (requires PHP >= 4.3.0)
$cfg['Servers'][$i]['controluser']   = 'root';          // MySQL control user settings
                                                    // (this user must have read-only
$cfg['Servers'][$i]['controlpass']   = 'xxxxxx';          // access to the "mysql/user"
                                                    // and "mysql/db" tables).
                                                    // The controluser is also
                                                    // used for all relational
                                                    // features (pmadb)
$cfg['Servers'][$i]['auth_type']     = 'cookie';    // Authentication method (config, http or cookie based)?
$cfg['Servers'][$i]['user']          = '';      // MySQL user
$cfg['Servers'][$i]['password']      = '';          // MySQL password (only needed
                                                    // with 'config' auth_type)
建立了新戶口, 給了最高權限, 大大們都說要刪掉舊的 root, 但我的root@localhost刪不了, 惟有把它所有權限都剔除了, 登出之後, 把 $cfg['Servers'][$i]['controluser'] = 'root'; 及 $cfg['Servers'][$i]['controlpass'] 都改成新的戶口, 再替新戶口執行上面 SET PASSWORD 的動作, 就能再次登入phpMyAdmin

希望小弟的少少分享能夠給其他新手們一點點指引
回覆文章

回到「phpMyAdmin」