First link the directory, use the following command:
sudo ln -s /usr/share/phpmyadmin/ /var/www/
Note that the above one is not IN, but a lowercase L.
(Recommended learning: phpmyadmin tutorial)
Enter 127.0.0.1/phpmyadmin in the browser. If it is correct, it can be used, but sometimes , there will be some mysqlli prompts, continue:
sudo gedit /etc/php5/apache2/php.ini
Find extension_dir', the correct directory is '/usr/lib/php5/ext', set the directory of extension_dir to /usr/lib /php5/ext, and then 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
Now access 127.0.0.1/phpmyadmin and you can access it normally.
Note: Please check specifically what your own directory is for the 20090626 above, and just change it.
For more programming related content, please pay attention to the Programming Tutorial column on the php Chinese website!
The above is the detailed content of ubuntu cannot open phpmyadmin. For more information, please follow other related articles on the PHP Chinese website!