ubuntu 16.04 安裝PhpMyAdmin

來源:互聯網
上載者:User

標籤:apt   code   ext   hce   extension   沒有   root使用者   串連   ini   

首先,安裝MySQL

$ sudo apt-get install mysql-server$ sudo apt-get install mysql-client安裝時輸出root使用者的密碼

在安裝phpmyadmin

$ sudo apt-get install phpmyadmin$ sudo apt-get install php-mbstring$ sudo apt-get install php-gettext安裝時選擇自動設定資料庫,輸入資料庫root帳號的密碼如果不安裝以上兩個php軟體包,則會報錯或者白屏,提示找不到/usr/share/php/php-gettext/gettext.inc之類的錯誤

建立/var/www/html 下的軟串連

$ sudo ln -s /usr/share/phpmyadmin /var/www/html/phpmyadmin

修改PHP設定檔

$ sudo vim /etc/php/7.0/apache2/php.inidisplay_errors = On(顯示錯誤記錄檔,出現兩次,都要改,不然無效)extension=php_mbstring.dll (開啟mbstring)

重啟apache

$ sudo /etc/init.d/apache2 restart

訪問連接埠localhost/phpmyadmin,輸入帳號密碼即可

重點提要:因為預設安裝phpmyadmin時會安裝apahce和php等依賴包,由於是16.04系統,會預設安裝php7.0,php7.0又沒有預設內建php-mbstring,php-gettext這兩個包,所以會報錯。

ubuntu 16.04 安裝PhpMyAdmin

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.