Ubuntu下如何配置phpmyadmin

Ubuntu下如何配置phpmyadmin

我已经安装,但是当我按照说明LAMP输入此行并尝试重新启动 apache 时,出现以下错误:apache.confInclude /etc/phpmyadmin/apache.conf

~$ sudo /etc/init.d/apache2 restart 
* Restarting web server apache2                                                                                                                      [fail] 
* The apache2 configtest failed.
Output of config test was:
apache2: Syntax error on line 222 of /etc/apache2/apache2.conf: Could not open   configuration file /etc/phpmyadmin/apache.conf: No such file or directory
Action 'configtest' failed.
The Apache error log may have more information.

我已经签到/etc/phpmyadmin,但我没有这样的文件/etc/phpmyadmin/apache.conf

Not Found

The requested URL /phpmyadmin/ was not found on this server.

我的问题是我需要从某个地方下载它还是必须创建一个并在其中放入一些内容?该文件不是随 LAMP 安装一起提供的吗?

更新有错误sudo apt-get install phpmyadmin

Creating config file /etc/php5/mods-available/mysql.ini with new version
cp: cannot create regular file ‘/etc/php5/mods-available/mysql.ini’: No such file or directory
dpkg: error processing package php5-mysql (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up javascript-common (11) ...
dpkg: error processing package javascript-common (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of phpmyadmin:
phpmyadmin depends on php5-mysql | php5-mysqli | php5-mysqlnd; however:
Package php5-mysql is not configured yet.
Package php5-mysqli is not installed.
Package php5-mysqlnd is not installed.

dpkg: error processing package phpmyadmin (--configure):
dependency problems - leaving unconfigured
Processing triggers for libapache2-mod-php5 (5.5.9+dfsg-1ubuntu4.5) ...
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                      Errors were encountered while processing:
php5-mysql
javascript-common
phpmyadmin
E: Sub-process /usr/bin/dpkg returned an error code (1)

答案1

您安装了 phpmyadmin 吗?

我觉得你好像错过了。它本身不是 LAMP 堆栈的一部分,而是一个用于配置 MySQL 的管理工具(用 php 编写)。

你需要sudo apt-get install phpmyadmin按照本指南完成此步骤后,您应该能够访问 phpMyAdmin。

希望这可以帮助 ;)

相关内容