正在安装 xampp 但 phpmyadmin 未连接
Installing xampp but phpmyadmin doesn't connect
所以我在我的 Linux 机器上安装了 xampp 运行 Ubuntu 14.04LTS。现在突然间,当我尝试连接到 phpmyadmin 时,它拒绝连接。我也已经单独安装了 mysql 但它似乎不起作用。有什么解决方法吗?
我得到的错误是:
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.
发生这种情况的原因和解决方法?
转到http://localhost/security/ and then click on the link http://localhost/security/xamppsecurity.php。
之后将超级用户的密码更改为 'root'。
根据 RiggsFolly 的评论,我 运行 有两个 MySQL
因此,两个 mysql 服务器最终都会与 phpmyadmin 混淆,这就是您在使用 xampp 的内置 mysql 服务器时关闭外部 mysql 服务器的方式使用 phpmyadmin 成功连接:
使用whichmysql
找到实用程序运行
导航到外部MySQL服务所在的目录运行:
$ cd /usr/bin
$ mysqladmin shutdown
这将关闭 MySQL 服务 运行 如果它是 运行。
$ sudo service mysql stop
如果服务已经关闭,它会告诉您服务的状态,这也很有帮助。
现在我们需要停止 Xampp mysql 服务器,所以我们导航到 /lampp/bin
并再次执行相同的命令来关闭 mysql 服务器下来。
$ cd /opt/lampp/bin
$ mysqladmin shutdown
只需重新启动 xampp 就可以了。
$ sudo /opt/lampp/lampp restart
所以我在我的 Linux 机器上安装了 xampp 运行 Ubuntu 14.04LTS。现在突然间,当我尝试连接到 phpmyadmin 时,它拒绝连接。我也已经单独安装了 mysql 但它似乎不起作用。有什么解决方法吗?
我得到的错误是:
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.
发生这种情况的原因和解决方法?
转到http://localhost/security/ and then click on the link http://localhost/security/xamppsecurity.php。
之后将超级用户的密码更改为 'root'。
根据 RiggsFolly 的评论,我 运行 有两个 MySQL
因此,两个 mysql 服务器最终都会与 phpmyadmin 混淆,这就是您在使用 xampp 的内置 mysql 服务器时关闭外部 mysql 服务器的方式使用 phpmyadmin 成功连接:
使用
whichmysql
找到实用程序运行导航到外部MySQL服务所在的目录运行:
$ cd /usr/bin
$ mysqladmin shutdown
这将关闭 MySQL 服务 运行 如果它是 运行。
$ sudo service mysql stop
如果服务已经关闭,它会告诉您服务的状态,这也很有帮助。
现在我们需要停止 Xampp mysql 服务器,所以我们导航到
/lampp/bin
并再次执行相同的命令来关闭 mysql 服务器下来。$ cd /opt/lampp/bin
$ mysqladmin shutdown
只需重新启动 xampp 就可以了。
$ sudo /opt/lampp/lampp restart