安装lampp(适用于linux的xampp)后,我得到了一些xampp新的安全异常。为此,我更改了http-xampp.conf文件,如下所示
<Directory "/opt/lampp/phpmyadmin">
AllowOverride AuthConfig Limit
Order allow,deny
Allow from all
Require all granted
</Directory>
在那之后,我得到了访问被拒绝的问题,这显示我如下,
Error
MySQL said: Documentation
#2002 - No such file or directory
The server is not responding (or the local server's socket is not correctly configured).
Connection for controluser as defined in your configuration failed.
我已经在ubuntu论坛上尝试了很多东西,但都无法解决。由于我是ubuntu的新手,我不知道这些东西是如何工作的。请帮忙。
所以我认为你应该这样做:
在/etc/apache2/conf.d/中创建一个文件phpmyadmin.conf
将此写入该文件:
`
# phpMyAdmin default Apache configuration
Alias /phpmyadmin /usr/share/phpmyadmin
<Directory /usr/share/phpmyadmin>
Options FollowSymLinks
DirectoryIndex index.php
<IfModule mod_php5.c>
AddType application/x-httpd-php .php
php_flag magic_quotes_gpc Off
php_flag track_vars On
php_flag register_globals Off
php_admin_flag allow_url_fopen Off
php_value include_path .
php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext
</IfModule>
</Directory>
# Authorize for setup
<Directory /usr/share/phpmyadmin/setup>
<IfModule mod_authn_file.c>
AuthType Basic
AuthName "phpMyAdmin Setup"
AuthUserFile /etc/phpmyadmin/htpasswd.setup
</IfModule>
Require valid-user
</Directory>
# Disallow web access to directories that don't need it
<Directory /usr/share/phpmyadmin/libraries>
Order Deny,Allow
Deny from All
</Directory>
<Directory /usr/share/phpmyadmin/setup/lib>
Order Deny,Allow
Deny from All
</Directory>
`
更改mysql的端口号。我的默认值是3306,该端口可能正在使用中,所以将端口号更改为3307或其他一些数字