1 把phpMyAdmin-4.6.5.2-all-languages.zip文件解壓到「/Library/WebServer/Documents/
」中,並更名爲phpmyadmin。php
2 複製「/Library/WebServer/Documents/phpmyadmin/
」中的config.sample.inc.php,並命名爲config.inc.php服務器
3 編輯config.inc.php,修改以下:加密
用於Cookie加密,隨意的長字符串 $cfg['blowfish_secret'] = 'a8b7c6d'; 當phpMyAdmin中出現「#2002 沒法登陸 MySQL 服務器(#2002 Cannot log in to the MySQL server)」時, 請把localhost改爲127.0.0.1就ok了, 這是由於MySQL守護程序作了IP綁定(bind-address =127.0.0.1)形成的 $cfg['Servers'][$i]['host'] = 'localhost'; 把false改爲true,這樣就能夠訪問無密碼的MySQL了, 即便MySQL設置了密碼也能夠這樣設置,而後登陸phpMyAdmin時輸入密碼 $cfg['Servers'][$i]['AllowNoPassword'] = false;