我正在运行 Raspbian 的 Raspberry Pi 上工作,我认为我的 apt-get 遇到了问题。
问题源于我正在运行的 MySQL 服务器。服务器似乎随机停止,我使用 确认了这一点sudo service mysql status
。然后,我尝试:
pi@Brian-RP ~ $ sudo service mysql start
[FAIL] Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!
我也尝试过:
pi@Brian-RP ~ $ sudo /etc/init.d/mysql start
[FAIL] Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!
以及尝试从 MySQL Workbench 启动我的服务器,但没有成功。因此,我认为如果服务器无法启动,我的 MySQL 安装可能有问题。我尝试重新安装以下软件包,从清除开始:
pi@Brian-RP ~ $ sudo apt-get purge mysql-server mysql-common mysql-client
Reading package lists... Done
pi@Brian-RP ~ $ ncy tree... 0%
奇怪的是,它又apt-get purge
出现在第二行的中间。我正在寻找解决方案,有人建议我应该apt-get update
和apt-get upgrade
。我成功运行了更新,但是当我尝试时sudo apt-get upgrade
,该过程以Segmentation fault
.我不太清楚这意味着什么,所以我的有问题吗apt
?我怎样才能让我的 MySQL 服务器再次运行?
编辑:这是我今天的 /var/log/syslog 文件:
571 Jun 28 18:43:52 Brian-RP /etc/init.d/mysql[3017]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
572 Jun 28 18:43:52 Brian-RP /etc/init.d/mysql[3017]: #007/usr/bin/mysqladmin: connect to server at 'localhost' failed
573 Jun 28 18:43:52 Brian-RP /etc/init.d/mysql[3017]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
574 Jun 28 18:43:52 Brian-RP /etc/init.d/mysql[3017]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
575 Jun 28 18:43:52 Brian-RP /etc/init.d/mysql[3017]:
576 Jun 28 18:43:53 Brian-RP kernel: [ 57.472792] uart-pl011 20201000.uart: no DMA platform data
577 Jun 28 18:44:45 Brian-RP wpa_supplicant[1773]: wlan0: WPA: Group rekeying completed with 38:2c:4a:69:c3:d0 [GTK=CCMP]
578 Jun 28 19:17:01 Brian-RP /USR/SBIN/CRON[3102]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
579 Jun 28 19:44:42 Brian-RP wpa_supplicant[1773]: wlan0: WPA: Group rekeying completed with 38:2c:4a:69:c3:d0 [GTK=CCMP]