2017-04-14 86 views
0

我刚在我的manjaro(一个archlinux发行版)上安装了xampp,但我无法使用phpmyadmin,因为mysql似乎没有回应。
当我使用sudo xampp start输出如下:xampp cannont使用phpmyadmin(mysql错误)

XAMPP: Starting Apache...ok. 
XAMPP: Starting MySQL...ok. 
XAMPP: Starting ProFTPD...ok. 

但是,试图利用sudo xampp restart重新启动它时,它显示:

XAMPP: Stopping Apache...ok. 
XAMPP: Stopping MySQL...not running. 
XAMPP: Stopping ProFTPD...ok. 
XAMPP: Starting Apache...ok. 
XAMPP: Starting MySQL...ok. 
XAMPP: Starting ProFTPD...ok. 

当连接到http://localhost/phpmyadmin/一个值得欢迎的显示,但我做得到4错误显示顺序如下:

\#2002 - No such file or directory — The server is not responding (or the local server's socket is not correctly configured). 
mysqli_real_connect(): (HY000/2002): No such file or directory 
Connection for controluser as defined in your configuration failed. 
mysqli_real_connect(): (HY000/2002): No such file or directory 

经过研究,我注意到我错过了/opt/lampp/var/mysql/mysql.sock文件,但我不知道如何创建和配置它。

我也tryed使用mysqld在一些教程见过,但得到这些错误:

2017-04-14 12:41:29 140391574202432 [Note] mysqld (mysqld 10.1.22-MariaDB) starting as process 4483 ... 
2017-04-14 12:41:29 140391574202432 [ERROR] mysqld: File './mysql-bin.index' not found (Errcode: 13 "Permission denied") 
2017-04-14 12:41:29 140391574202432 [ERROR] Aborting 

回答

2

听起来像是你将需要检查您当地的插槽配置。这在/etc/mysql/my.cnf配置,应该如下所示:

[client] 
port   = 3306 
socket   = /var/run/mysqld/mysqld.sock 

打开phpMyAdmin的配置文件(config.inc.php)和改变套接字地址。也许你的phpMyAdmin没有本地套接字配置,或者它可能不同。这个文件应该包含这样一行(当然,适应的地址给你my.cnf发现了什么):

$cfg['Servers'][$i]['socket'] = '/var/run/mysqld/mysqld.sock';