ubuntu - 在 Ubuntu 18.04 中启动 Xampp 时遇到 MySQL 错误
问题描述
我在 ubuntu 中的 xampp 工作得很好,直到它突然停止工作,当我重新安装它并通过命令行启动它时,它向我显示了这个错误“opt/lampp/bin/mysql.server: 260: kill: No such process “开始后。
我在我的 localhost/phpmyadmin 上也遇到了这个错误
MySQL said: Documentation
Cannot connect: invalid settings.
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
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.
解决方案
该错误很可能是权限问题,没有来自mysql的错误日志,即使sudo chmod -R /opt/lampp
工作但我认为制作/opt/lampp/
777不是一个好主意,所以我对原始答案进行了一些改进:
sudo chmod 777 /opt/lampp/var/
sudo chown -R mysql:mysql /opt/lampp/var/mysql/
sudo lampp restart
推荐阅读
- sql - 在sql server中按最新日期和更新值分组
- c++ - 我可以在另一个类中实例化一个对象吗?
- shell - 如何在 shell 脚本中剪切我的 grep 输出的所需部分
- html - 为什么textarea的宽度和高度比iframe大?
- powershell - Powershell 检查是否存在 XML 属性
- ios - IB_DESIGNABLE 不在情节提要中呈现
- docker - 绑定挂载不适用于 Docker Desktop 中的 postgresdb
- amazon-web-services - AWS Athena 读取外部 S3 存储桶
- django - Django - 两个用户的合作
- azure - ADF 中的行到列