How can I solve the problem of installing phpmyadmin on ubuntu?

Source: Internet
Author: User
Tags phpmyadmin

Today, we started using ubuntu kylin, which is also the Kirin linux. In fact, all the versions are the same. Let's first talk about the many online problems related to phpmyadmin which cannot be used in ubuntu, right, I will only add the new version.
Note that you 'd better configure phpmyadmin after installing php5 apache2 and mysql,
Here is a brief introduction to the specific installation.


Use apt-get to execute the installation command when the network is connected. (if you do not have sudo permission and need to enter a password, we recommend that you switch to the root user first, if you do not want to perform step-by-step operations, some files do not have permissions)

1 install apache: sudo apt-get install apache2

Test whether the installation is successful: enter localhost in the browser
If the installation is successful, an it works
The new version may not be the same, but it works may also be noted.

2 install php5: sudo apt-get install php5 libapache2-mod-php5
Test whether the sudo gedit/var/www/html/testphp. php command is successfully used.

In testphp. Write a line of code in php: <? Php phpinfo ();?>
Enter the URL: http: // localhost/html/testphp. php
If the php version information page appears, it means it is an attack.
Here we can see that this is why I want to write this article. Pay attention to the link. The root directory has been changed to www/html.
Everything follows as usual

3 install mysql: sudo apt-get install mysql-server
You may need to enter the account password during installation.

To test whether mysql can be used, you don't need to talk about it.
Mysql-u root-p
Then make some queries and so on.
Of
Important

Install phpmyadmin: sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin
After the installation is complete, you will find that this is not commonly used here. Enter http: // localhost/phpmyadmin/to indicate that the directory does not exist.
Or input in the terminal:

Sudo ln-s/usr/share/phpmyadmin/var/www/html/phpmyadmin
The installation path of phpmyadmin is/usr/share/phpmyadmin.
The link here is to make phpmyadmin accessible in the apache file directory:/var/www/html/phpmyadmin
Restart apache: sudo/etc/init. d/apache2 restart
This is a perfect access to see if it can run normally. Well, next we will do it normally for your php project.


If Access forbidden appears! For more information about the problem, see the following section.
 
New XAMPP security concept:
 
Access to the requested directory is only available from the local network.
 
This setting can be configured in the file "httpd-xampp.conf ".
 
Solution:
 
Go to the command line mode and switch the account to the root account first.
$ Sudo-s
 
Vi open the httpd-xampp.conf file to be edited
# Vi/opt/lampp/etc/extra/httpd-xampp.conf
 
(How to operate vi)
 
Find this code:
# Since XAMPP 1.4.3
<Directory "/opt/lampp/phpmyadmin">
AllowOverride AuthConfig Limit
Order allow, deny
Allow from all
</Directory>
 
Add a line of Require all granted to it, as shown below:
# Since XAMPP 1.4.3
<Directory "/opt/lampp/phpmyadmin">
AllowOverride AuthConfig Limit
Order allow, deny
Allow from all
Require all granted
</Directory>
 
Save and exit. Restart XAMPP.
 
The operation is complete.


Ubuntu cannot be started after phpMyAdmin is installed through apt-get.


First, use the following command to link the directory:
Sudo ln-s/usr/share/phpmyadmin // var/www/
Note that the L above is not IN but lowercase
Enter
127.0.0.1/phpmyadmin
If it is correct, you can use it, but sometimes there will be any difference in mysqlli, and then continue with the following
Sudo gedit/etc/php5/apache2/php. ini
Find extension_dir. The correct directory is '/usr/lib/php5/ext ',
Set the directory of extendion_dir to/usr/lib/php5/ext.
Run the following command.
Sudo mkdir/usr/lib/php5/ext
Sudo cp/usr/lib/php5/20090626/*. */usr/lib/php5/ext/
Sudo/etc/init. d/apache2 restart
Access 127.0.0.1/phpmyadmin again.
Note: For the above 20090626, you can check what your own directory is. Just change it.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.