gpt4 book ai didi

PhpMyAdmin 访问被拒绝 #2002 Ubuntu、Lampp(Xampp For ubuntu)

转载 作者:太空宇宙 更新时间:2023-11-04 05:36:10 25 4
gpt4 key购买 nike

安装 lampp(xampp for linux)后,我得到了一些 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>

`

关于PhpMyAdmin 访问被拒绝 #2002 Ubuntu、Lampp(Xampp For ubuntu),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20209901/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com