Windows環境下phpMyAdmin的安裝配置方法
phpMyAdmin是一款很受歡迎的MySQL管理工具,Windows下的安裝配置方法如下:
去下載XAMPP包,裡面會有配置好的phpMyAdmin環境
https://www.apachefriends.org/index.html
下載好安裝包後,直接安裝
安裝完成後,會自動彈出控制檯視窗,在以後的使用中,可以點選安裝目錄下面的控制檯執行程式來啟動控制檯
xampp-control.exe
點選Apache和MySQL模組後的Start按鈕來啟動服務

啟動的Apache過程中,有時候因為監聽埠衝突,會報錯而啟動失敗,類似的錯誤資訊如下:
17:09:04 [Apache] Error: Apache shutdown unexpectedly.
17:09:04 [Apache] This may be due to a blocked port, missing dependencies,
17:09:04 [Apache] improper privileges, a crash, or a shutdown by another method.
17:09:04 [Apache] Press the Logs button to view error logs and check
17:09:04 [Apache] the Windows Event Viewer for more clues
17:09:04 [Apache] If you need more help, copy and post this
17:09:04 [Apache] entire log window on the forums
17:09:12 [Apache] Problem detected!
17:09:12 [Apache] Port 443 in use by ""E:\Program Files (x86)\VMware Workstation\vmware-hostd.exe" -u "C:\ProgramData\VMware\hostd\config.xml"" with PID 2952!
17:09:12 [Apache] Apache WILL NOT start without the configured ports free!
17:09:12 [Apache] You need to uninstall/disable/reconfigure the blocking application
17:09:12 [Apache] or reconfigure Apache and the Control Panel to listen on a different port
對於這個錯誤,解決方法是更換監聽的埠,點選進行Apache配置檔案httpd-ssl.conf

修改監聽的埠
#
# When we also provide SSL we have to listen to the
# standard HTTP port (see above) and to the HTTPS port
#
Listen 4450
##
修改埠後,再次啟動Apache,直到正常啟動
Apache和MySQL服務均成功啟動後,通過本地網頁進入管理介面
http://192.168.8.99

點選頁面右上角的phpMyAdmin

預設是不需要密碼,即可連線到資料庫;如果修改了root使用者的密碼,則需要編輯F:\xampp\phpMyAdmin目錄下的config.inc.php檔案,更改裡面的連線密碼

預設連線的是本地的MySQL伺服器,如果我們想連線多臺MySQL伺服器,可以編輯F:\xampp\phpMyAdmin目錄下的config.inc.php檔案,增加資料庫。
下面配置引數中,second server是仿照first server增加的資料庫配置檔案。
<?php
/*
* This is needed for cookie based authentication to encrypt password in
* cookie
*/
$cfg['blowfish_secret'] = 'xampp'; /* YOU SHOULD CHANGE THIS FOR A MORE SECURE COOKIE AUTH! */
/*
* Servers configuration
*/
$i = 0;
/*
* First server
*/
$i++;
/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'root';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Lang'] = '';
/* Bind to the localhost ipv4 address and tcp */
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
/* User for advanced features */
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = '';
/* Advanced phpMyAdmin features */
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
$cfg['Servers'][$i]['relation'] = 'pma__relation';
$cfg['Servers'][$i]['table_info'] = 'pma__table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma__column_info';
$cfg['Servers'][$i]['history'] = 'pma__history';
$cfg['Servers'][$i]['designer_coords'] = 'pma__designer_coords';
$cfg['Servers'][$i]['tracking'] = 'pma__tracking';
$cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
$cfg['Servers'][$i]['recent'] = 'pma__recent';
$cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
$cfg['Servers'][$i]['users'] = 'pma__users';
$cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
$cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
$cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';
$cfg['Servers'][$i]['central_columns'] = 'pma__central_columns';
$cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings';
$cfg['Servers'][$i]['export_templates'] = 'pma__export_templates';
$cfg['Servers'][$i]['favorite'] = 'pma__favorite';
/*
* second server
*/
$i++;
/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'neo';
$cfg['Servers'][$i]['password'] = 'neo';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Lang'] = '';
/* Bind to the localhost ipv4 address and tcp */
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
/* User for advanced features */
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = '';
/* Advanced phpMyAdmin features */
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
$cfg['Servers'][$i]['relation'] = 'pma__relation';
$cfg['Servers'][$i]['table_info'] = 'pma__table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma__column_info';
$cfg['Servers'][$i]['history'] = 'pma__history';
$cfg['Servers'][$i]['designer_coords'] = 'pma__designer_coords';
$cfg['Servers'][$i]['tracking'] = 'pma__tracking';
$cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
$cfg['Servers'][$i]['recent'] = 'pma__recent';
$cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
$cfg['Servers'][$i]['users'] = 'pma__users';
$cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
$cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
$cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';
$cfg['Servers'][$i]['central_columns'] = 'pma__central_columns';
$cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings';
$cfg['Servers'][$i]['export_templates'] = 'pma__export_templates';
$cfg['Servers'][$i]['favorite'] = 'pma__favorite';
/*
* End of servers configuration
*/
?>
這樣,在開啟phpMyAdmin頁面後,可以選擇兩個資料庫

去下載XAMPP包,裡面會有配置好的phpMyAdmin環境
https://www.apachefriends.org/index.html
下載好安裝包後,直接安裝
安裝完成後,會自動彈出控制檯視窗,在以後的使用中,可以點選安裝目錄下面的控制檯執行程式來啟動控制檯
xampp-control.exe
點選Apache和MySQL模組後的Start按鈕來啟動服務

啟動的Apache過程中,有時候因為監聽埠衝突,會報錯而啟動失敗,類似的錯誤資訊如下:
17:09:04 [Apache] Error: Apache shutdown unexpectedly.
17:09:04 [Apache] This may be due to a blocked port, missing dependencies,
17:09:04 [Apache] improper privileges, a crash, or a shutdown by another method.
17:09:04 [Apache] Press the Logs button to view error logs and check
17:09:04 [Apache] the Windows Event Viewer for more clues
17:09:04 [Apache] If you need more help, copy and post this
17:09:04 [Apache] entire log window on the forums
17:09:12 [Apache] Problem detected!
17:09:12 [Apache] Port 443 in use by ""E:\Program Files (x86)\VMware Workstation\vmware-hostd.exe" -u "C:\ProgramData\VMware\hostd\config.xml"" with PID 2952!
17:09:12 [Apache] Apache WILL NOT start without the configured ports free!
17:09:12 [Apache] You need to uninstall/disable/reconfigure the blocking application
17:09:12 [Apache] or reconfigure Apache and the Control Panel to listen on a different port
對於這個錯誤,解決方法是更換監聽的埠,點選進行Apache配置檔案httpd-ssl.conf

修改監聽的埠
#
# When we also provide SSL we have to listen to the
# standard HTTP port (see above) and to the HTTPS port
#
Listen 4450
##
修改埠後,再次啟動Apache,直到正常啟動
Apache和MySQL服務均成功啟動後,通過本地網頁進入管理介面
http://192.168.8.99

點選頁面右上角的phpMyAdmin

預設是不需要密碼,即可連線到資料庫;如果修改了root使用者的密碼,則需要編輯F:\xampp\phpMyAdmin目錄下的config.inc.php檔案,更改裡面的連線密碼

預設連線的是本地的MySQL伺服器,如果我們想連線多臺MySQL伺服器,可以編輯F:\xampp\phpMyAdmin目錄下的config.inc.php檔案,增加資料庫。
下面配置引數中,second server是仿照first server增加的資料庫配置檔案。
<?php
/*
* This is needed for cookie based authentication to encrypt password in
* cookie
*/
$cfg['blowfish_secret'] = 'xampp'; /* YOU SHOULD CHANGE THIS FOR A MORE SECURE COOKIE AUTH! */
/*
* Servers configuration
*/
$i = 0;
/*
* First server
*/
$i++;
/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'root';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Lang'] = '';
/* Bind to the localhost ipv4 address and tcp */
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
/* User for advanced features */
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = '';
/* Advanced phpMyAdmin features */
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
$cfg['Servers'][$i]['relation'] = 'pma__relation';
$cfg['Servers'][$i]['table_info'] = 'pma__table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma__column_info';
$cfg['Servers'][$i]['history'] = 'pma__history';
$cfg['Servers'][$i]['designer_coords'] = 'pma__designer_coords';
$cfg['Servers'][$i]['tracking'] = 'pma__tracking';
$cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
$cfg['Servers'][$i]['recent'] = 'pma__recent';
$cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
$cfg['Servers'][$i]['users'] = 'pma__users';
$cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
$cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
$cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';
$cfg['Servers'][$i]['central_columns'] = 'pma__central_columns';
$cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings';
$cfg['Servers'][$i]['export_templates'] = 'pma__export_templates';
$cfg['Servers'][$i]['favorite'] = 'pma__favorite';
/*
* second server
*/
$i++;
/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'neo';
$cfg['Servers'][$i]['password'] = 'neo';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Lang'] = '';
/* Bind to the localhost ipv4 address and tcp */
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
/* User for advanced features */
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = '';
/* Advanced phpMyAdmin features */
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
$cfg['Servers'][$i]['relation'] = 'pma__relation';
$cfg['Servers'][$i]['table_info'] = 'pma__table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma__column_info';
$cfg['Servers'][$i]['history'] = 'pma__history';
$cfg['Servers'][$i]['designer_coords'] = 'pma__designer_coords';
$cfg['Servers'][$i]['tracking'] = 'pma__tracking';
$cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
$cfg['Servers'][$i]['recent'] = 'pma__recent';
$cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
$cfg['Servers'][$i]['users'] = 'pma__users';
$cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
$cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
$cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';
$cfg['Servers'][$i]['central_columns'] = 'pma__central_columns';
$cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings';
$cfg['Servers'][$i]['export_templates'] = 'pma__export_templates';
$cfg['Servers'][$i]['favorite'] = 'pma__favorite';
/*
* End of servers configuration
*/
?>
這樣,在開啟phpMyAdmin頁面後,可以選擇兩個資料庫

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26506993/viewspace-2094504/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- (轉)Windows下安裝Docker, GitBash環境配置WindowsDockerGit
- Windows 環境下 Python 環境安裝WindowsPython
- Linux & Windows 環境下 RabbitMQ 安裝與基本配置LinuxWindowsMQ
- Linux & Windows 環境下 Redis 安裝與基本配置LinuxWindowsRedis
- Windows10下如何安裝配置 perl 環境Windows
- Windows環境下安裝LinuxWindowsLinux
- Windows環境下安裝NexusWindows
- Windows 環境下安裝 RedisWindowsRedis
- Windows 環境下安裝 LaravelWindowsLaravel
- Windows環境下安裝RabbitMQWindowsMQ
- HMMer在Windows環境下的安裝HMMWindows
- Linux環境下nginx安裝配置LinuxNginx
- Docker 下安裝配置 lnmp 環境DockerLNMP
- Mac環境下安裝配置RedisMacRedis
- Windows下安裝配置爬蟲工具Scrapy及爬蟲環境Windows爬蟲
- Anaconda(conda)在windows安裝與環境配置Windows
- jenkins簡單安裝及配置(Windows環境JenkinsWindows
- windows環境下memcache配置方法 詳細篇Windows
- Linux環境下的Android的ADK安裝配置LinuxAndroid
- Windows 下 Laravel 環境配置WindowsLaravel
- Laragon 下的 PhpMyAdmin 安裝GoPHP
- Windows10下JDK8的下載安裝與環境變數的配置WindowsJDK變數
- 不用rustup,Windows下gnu版Rust安裝與開發環境配置RustWindows開發環境
- Windows環境下Python3.7安裝TensorflowWindowsPython
- Windows環境安裝ScrapyWindows
- Windows 環境安裝LdapWindowsLDA
- 如何下載安裝jdk和配置環境JDK
- Linux下安裝Python,以及環境變數的配置LinuxPython變數
- Windows環境下Oracle11g安裝的問題WindowsOracle
- Windows環境下PHPstudy的安裝步驟圖文教程WindowsPHP
- Java8.0下載安裝以及配置環境Java
- jdk在linux下安裝、配置環境變數JDKLinux變數
- Linux環境下elasticsearch-6.2.2安裝以及配置LinuxElasticsearch
- Node.js 下載安裝與環境配置Node.js
- Linux 7安裝和配置phpmyadminLinuxPHP
- 本地windows搭建spark環境,安裝與詳細配置(jdk安裝與配置,scala安裝與配置,hadoop安裝與配置,spark安裝與配置)WindowsSparkJDKHadoop
- 在windows下配置Eclipse + go環境WindowsEclipseGo
- Java安裝和環境配置Java
- Linux環境HBase安裝配置Linux