簡體   English   中英

MySQL 未從 Ubuntu 18.04 LTS 開始

[英]MySQL not starting at Ubuntu 18.04 LTS

我正在使用 Ubuntu 18.04 LTS 和 XAMPP。 XAMPP 從昨天開始就運行良好,但是當我啟動 XAMPP 並嘗試訪問 phpMyAdmin 但收到類似屏幕截圖的錯誤並在此處檢查時...

 MySQL said: Documentation
Cannot connect: invalid settings.
mysqli_real_connect(): (HY000/2002): Connection refused
Connection for controluser as defined in your configuration failed.
mysqli_real_connect(): (HY000/2002): Connection refused
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.

我已經在 StackOverflow 上檢查了一個可能的解決方案,並找到了一些我們需要在 config.inc.php 中進行更改的解決方案,但該文件已經具有正確的信息(我認為是)在這里檢查一些代碼...

/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
/* Server parameters */
//$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = true;

我怎樣才能解決這個問題?

提前致謝。

您需要重新配置服務器:

$ sudo dpkg-reconfigure mysql-server-5.1
$ sudo service mysql restart

確保您沒有對my.cnf文件進行任何更改。

/etc/mysql/my.cnf

我通過刪除所有內容來解決它,並只保留my.cnf文件中的兩行。

!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mysql.conf.d/

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM