2

我在 Ubuntu 16.04 LTE Xampp (lampp) 上安装一切正常:

:~$ sudo /opt/lampp/lampp start
Starting XAMPP for Linux 5.6.20-0...
XAMPP: Starting Apache...already running.
XAMPP: Starting MySQL...ok.
XAMPP: Starting ProFTPD...already running.

:~$ sudo /opt/lampp/lampp status
Version: XAMPP for Linux 5.6.20-0
Apache is running.
MySQL is not running.
ProFTPD is running.

:~$ sudo service mysql start

:~$ sudo /opt/lampp/lampp status
Version: XAMPP for Linux 5.6.20-0
Apache is running.
MySQL is not running.
ProFTPD is running.

但是当我想进入TERMINAL的时候有mysql -u root:

错误 1698 (28000): 拒绝用户 'root'@'localhost' 的访问

如果我使用 sudo mysql -u root,一切正常,我可以通过终端使用 mysql。

但对于 Firefox http://127.0.01/phpmyadmin/

Welcome to phpMyAdmin

Error

MySQL said: Documentation
Cannot connect: invalid settings.
Connection for controluser as defined in your configuration failed.
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.
4

1 回答 1

0

我会检查 /var/lib 和 /var/run 下的权限 我有类似的情况并通过更改这些文件夹的权限然后运行 ​​$./etc/init.d/mysql start 来解决

于 2016-05-26T19:09:43.753 回答