2015-11-06 72 views
0

所以我在运行Ubuntu 14.04LTS的Linux机器上安装了xampp。现在突然间,当我尝试连接到phpmyadmin时,它拒绝连接。我已经分别安装了mysql,但似乎没有工作。任何解决方法?安装xampp但phpmyadmin无法连接

,我得到的错误是:

MySQL said: 

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.

任何之所以出现这种情况和解决方案呢?

+0

你尝试使用mysql客户端命令行进行连接? 您是否[在phpmyadmin中配置主机,端口,登录名和密码](https://wiki.phpmyadmin.net/pma/Config/Servers#host)? –

+2

2 MYSQL服务器不会在相同的端口上运行(通常为3306),因此您很可能会连接到其他您的用户标识不存在或其他密码的MySQL服务器 – RiggsFolly

+0

为我工作@RiggsFolly –

回答

0

按照注释通过RiggsFolly我运行MySQL

的两个实例,所以两者的MySQL服务器也结束了与phpMyAdmin搞乱,这是你如何关闭外部mysql服务器,同时使用xampp的内置mysql服务器使用phpmyadmin成功连接:

  1. 使用whichmysql找到运行

  2. 导航到该目录的效用外MySQL服务运行的位置:

    $ cd /usr/bin

    $ mysqladmin shutdown

这将关闭MySQL服务运行,如果它正在运行。

$ sudo service mysql stop 

这也有帮助,如果有的话它会告诉你服务的状态,如果它已经关闭。

  • 现在,我们需要使我们浏览到/lampp/bin停止XAMPP MySQL服务器,并再次执行相同的命令来关闭MySQL服务器了。

    $ cd /opt/lampp/bin

    $ mysqladmin shutdown

  • 只需重新启动XAMPP,你应该是好去。

    $ sudo /opt/lampp/lampp restart