Ubuntu14.04_MySQL_phpMyAdmin_Install_setting

    1. MySQL

    i. MySQL install

sudo apt-get install mysql-server
sudo apt-get install mysql-client
  • Be careful: 

        a. Input the user "root" password;

        b. The user "root" and the UBUNTU system "root" user are not the same thing;

    ii. MySQL installed check

sudo service mysql restart

    Comfirm MySQL start/running, and loging in:

mysql -u root -p

    Input the password for the user "root" to log in.

    2. Apache

    i. Apache installation

sudo apt-get install apache2

    ii. Checking

    Using browser open http://localhost/‍‍  and get:‍

094024_OoQw_2363350.png

    iii. Restart the apache

sudo /etc/init.d/apache2 restart

    iv. Let apache support MySQL

sudo apt-get install libapache2-mod-auth-mysql

    3. Php

    The php is used to install phpMyAdmin which is the graphical user interface for MySQL.

    i. Php installation

sudo apt-get install php5
sudo apt-get install libapache2-mod-php5
sudo /etc/init.d/apache2 restart

    ii. Php support MySQL

sudo apt-get install php5-mysql
  • Be careful:

    In this version of PHP5, the webpage file is in the directory "html" rather than directory "WWW", so it has to creat the file in the directory "html":

sudo gedit /var/www/html/test.php

    And edit the "test.php":

<?php
phpinfo();
?>

    iii. Checking

    Browser --> http://localhost/test.php and if it is succeed, it will get:

100715_Qf6v_2363350.png

    iv. PHP & MySQL working together

    Edit the file "/etc/php5/apache2/php.ini", and change "; extension=msql.so" to "extension=msql.so" (cancel the NOTE).

    4. phpMyAdmin

    i. phpMyAdmin installation

sudo apt-get install phpmyadmin

    ii. Soft-connection

    Browser could not open "http://localhost/phpmyadmin" because the directory "phpmyadmin" is not in the directory "/var/www/html/", so it could make a soft-connection to resolve the problem:

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

    iii. Checking

    Browser --> "http://localhost/phpmyadmin" , and get:

102955_wWyn_2363350.png

    5. Problem

    i.

    After the login if it show the error: "Connection for controluser as defined in your configuration failed.". The solving method:

    Edit the file "/etc/phpmyadmin/config-db.php"

$dbuser='root';
$dbpass='***';

    Where '***' is your password for user "root" of MySQL.

    ii.

    The mcrypt extension is missing. Please check your PHP configuration.    

    Solving method:

sudo php5enmod mcrypt
sudo service apache2 restart 

 

    6. Thanks:

    http://www.bubuko.com/infodetail-329492.html

    http://jingyan.baidu.com/article/425e69e6bbc6c7be14fc1640.html

    http://stackoverflow.com/questions/24807195/connection-for-controluser-as-defined-in-your-configuration-failed

 

转载于:https://my.oschina.net/u/2363350/blog/668933

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值