1 頁 (共 1 頁)

[求幫]如何連接coolfreepages的mysql數據庫

發表於 : 2004-04-29 22:29
Doioi
各位大大好, 小弟在coolfreepages 上的空間架設了phpbb 論壇己有二年, 但一直都摸索不到連接coolfreepages的mysql數據庫的方法
我最初由phpbb 2.0.4 裝起, 因種種問題需要重裝很多次, 到了現在phpbb 2.0.6, 都有2x次了, 因不懂delete 之前的database, 所以每次重裝都要開一個新的, 我覺得這樣下去遲早會出事, 所以dick 起心肝去連接coolfreepages的mysql數據庫, 但屢次失敗............

這post 的篇幅頗長, 不便之處敬請原諒.
我裝了Appserv 2.4.0, coolfreepages 的網址為ttf.ionichost.com,
●架設主機作業系統:Windows XP Pro
●免費空間連結: http://www.coolfreepages.com
●我的上網方式:香港區網 (網上行 http://www.netvigator.com)。
●我的 phpBB2 版本:phpBB 2.0.6。

但我怎樣設定C:\Appserv\www\phpmyadmin\config.inc.php 都不能存取coolfreepages的mysql數據庫, 以下是我的設定方法及其在IE 連接 htp://localhost/phpmyadmin 的結果:


原來的config.inc.php 要設定的部分:

代碼: 選擇全部

/**
 * Server(s) configuration
 */
$i = 0;
// The $cfg['Servers'] array starts with $cfg['Servers'][1].  Do not use $cfg['Servers'][0].
// You can disable a server config entry by setting host to ''.
$i++;
$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]['compress']      = FALSE;       // Use compressed protocol for the MySQL connection
                                                    // (requires PHP >= 4.3.0)
$cfg['Servers'][$i]['controluser']   = '';          // MySQL control user settings
                                                    // (this user must have read-only
$cfg['Servers'][$i]['controlpass']   = '';          // access to the "mysql/user"
                                                    // and "mysql/db" tables).
                                                    // The controluser is also
                                                    // used for all relational
                                                    // features (pmadb)
$cfg['Servers'][$i]['auth_type']     = 'config';    // Authentication method (config, http or cookie based)?
$cfg['Servers'][$i]['user']          = 'nac92136';      // MySQL user
$cfg['Servers'][$i]['password']      = 'doioi';          // MySQL password (only needed
                                                    // with 'config' auth_type)
$cfg['Servers'][$i]['only_db']       = 'DB_nac92136';          // If set to a db-name, only
                                                    // this db is displayed in left frame
                                                    // It may also be an array of db-names, where sorting order is relevant.
$cfg['Servers'][$i]['verbose']       = '';          // Verbose name for this host - leave blank to show the hostname

$cfg['Servers'][$i]['pmadb']         = '';          // Database used for Relation, Bookmark and PDF Features
                                                    // (see scripts/create_tables.sql)
                                                    //   - leave blank for no support
                                                    //     DEFAULT: 'phpmyadmin'
$cfg['Servers'][$i]['bookmarktable'] = '';          // Bookmark table
                                                    //   - leave blank for no bookmark support
                                                    //     DEFAULT: 'pma_bookmark'
$cfg['Servers'][$i]['relation']      = '';          // table to describe the relation between links (see doc)
                                                    //   - leave blank for no relation-links support
                                                    //     DEFAULT: 'pma_relation'
$cfg['Servers'][$i]['table_info']    = '';          // table to describe the display fields
                                                    //   - leave blank for no display fields support
                                                    //     DEFAULT: 'pma_table_info'
$cfg['Servers'][$i]['table_coords']  = '';          // table to describe the tables position for the PDF schema
                                                    //   - leave blank for no PDF schema support
                                                    //     DEFAULT: 'pma_table_coords'
$cfg['Servers'][$i]['pdf_pages']     = '';          // table to describe pages of relationpdf
                                                    //   - leave blank if you don't want to use this
                                                    //     DEFAULT: 'pma_pdf_pages'
$cfg['Servers'][$i]['column_info']   = '';          // table to store column information
                                                    //   - leave blank for no column comments/mime types
                                                    //     DEFAULT: 'pma_column_info'
$cfg['Servers'][$i]['history']       = '';          // table to store SQL history
                                                    //   - leave blank for no SQL query history
                                                    //     DEFAULT: 'pma_history'
$cfg['Servers'][$i]['verbose_check'] = TRUE;        // set to FALSE if you know that your pma_* tables
                                                    // are up to date. This prevents compatibility
                                                    // checks and thereby increases performance.
$cfg['Servers'][$i]['AllowDeny']['order']           // Host authentication order, leave blank to not use
                                     = '';
$cfg['Servers'][$i]['AllowDeny']['rules']           // Host authentication rules, leave blank for defaults
                                     = array();
我的設定方法如下: (註: 只列出修改了的部分)
(1)
$i = 1;
...
$cfg['Servers'][$i]['host'] = 'localhost';
....
$cfg['Servers'][$i]['user'] = 'nacXXXXX'; // MySQL user
$cfg['Servers'][$i]['password'] = 'YYYYY'; // MySQL password (only needed (註: X, Y 不便透露)
// with 'config' auth_type)
$cfg['Servers'][$i]['only_db'] = 'DB_nacXXXXX'; // If set to a db-name, only
...

結果:
請輸入主機名稱!

(2)
keep 住(1) 的setting, 但 cfg['Servers'][$i]['host'] = 'localhost'; 改為cfg['Servers'][$i]['host'] = 'ttf.ionichost.com'; 或cfg['Servers'][$i]['host'] = 'ionichost.com';

結果:
請輸入主機名稱!

(3)
keep 住(1) 的setting, 但$i = 1;改為default 的 $i = 0;

結果:
歡迎使用 phpMyAdmin 2.5.6


phpMyAdmin 嘗試連線到 MySQL 伺服器, 但伺服器拒絕了連線. 您應於 config.inc.php 內檢查主機名稱, 登入名稱及密碼及確保這些資料是與系統管理人員所提供的 MySQL 伺服器資料相同

錯誤

MySQL 傳回:


#1045 - Access denied for user: 'nacXXXXX@localhost' (Using password: YES)

[說明文件]

(4)
keep 住(3) 的setting,但 cfg['Servers'][$i]['host'] = 'localhost'; 改為cfg['Servers'][$i]['host'] = 'ttf.ionichost.com';

結果:
歡迎使用 phpMyAdmin 2.5.6


phpMyAdmin 嘗試連線到 MySQL 伺服器, 但伺服器拒絕了連線. 您應於 config.inc.php 內檢查主機名稱, 登入名稱及密碼及確保這些資料是與系統管理人員所提供的 MySQL 伺服器資料相同

錯誤

MySQL 傳回:


#1045 - Access denied for user: 'nac92136@(我的ip)'(Using password: YES)

[說明文件]

--------------------------------------------------------------------------------------------------------------------------------------------

我摸不著頭腦:(:( http://coolfreepages.com/faq.html為FAQ page, 希望大大們用得著
請大大們教我應怎樣設定吧!! 多謝幫忙~~

發表於 : 2004-05-01 18:38
Doioi
嘩!幸得友人幫手, 終於搞掂了!
完來只要upload phpmyadmin 到server 便可以了

發表於 : 2007-04-21 14:44
網發家
好文章
謝謝分享喔!