错误:/ var / lib / mysql /中没有足够的空间

时间:2018-03-15 04:14:38

标签: mysql ubuntu mysql.sock

我正好在我的服务器上遇到以下问题的问题,当访问日志文件时,它显示为空,即没有信息。

MySQL Job failed to start

来自我服务器的数据:

ricardoramos@garapa:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 12.04.5 LTS
Release:    12.04
Codename:   precise

我只有ssh访问我的服务器。此外,我已经执行了@Rajesh建议的所有步骤,但是在使用以下命令重新安装mysql-server时:

sudo apt-get install mysql-server-5.5

我收到以下消息:

ERROR: There's not enough space in /var/lib/mysql/

E: Write error - write (28: There is no space available on the device)

ricardoramos@garapa:~$ sudo fdisk -l

Disco /dev/sda: 1000.2 GB, 1000202305536 bytes
255 cabeças, 63 setores/trilhas, 121601 cilindros, total de 1953520128 setores
Unidades = setores de 1 * 512 = 512 bytes
Tamanho do setor (lógico/físico): 512 bytes / 512 bytes
Tamanho da E/S (mínimo/ideal): 512 bytes / 512 bytes
Identificador do disco: 0x471b256c

Dispositivo Boot Início Fim Blocos Id Sistema
/dev/sda1   *         128  1603201151   801600512   83  Linux
/dev/sda2      1603201152  1953517951   175158400    5  Estendida
/dev/sda5      1603201280  1945706751   171252736   83  Linux
/dev/sda6      1945706880  1953517951     3905536   82  Linux swap / Solaris


ricardoramos@garapa:~$ df -h
Sist. Arq.      Tam. Usado Disp. Uso% Montado em
/dev/sda5       163G  155G     0 100% /
udev            1,5G  4,0K  1,5G   1% /dev
tmpfs           599M  724K  599M   1% /run
none            5,0M     0  5,0M   0% /run/lock
none            1,5G     0  1,5G   0% /run/shm
overflow        1,0M  1,0M     0 100% /tmp
/dev/sda1       759G  4,1G  717G   1% /home

ricardoramos@garapa:~$ dpkg -l | grep mysql
iU  libdbd-mysql-perl                      4.020-1ubuntu0.1                           Perl5 database interface to the MySQL database
ii  libmysql-java                          5.1.16-2                                   Java database (JDBC) driver for MySQL
iU  libmysqlclient18                       5.5.54-0ubuntu0.12.04.1                    MySQL database client library
iU  mysql-client-5.5                       5.5.54-0ubuntu0.12.04.1                    MySQL database client binaries
ii  mysql-client-core-5.5                  5.5.34-0ubuntu0.12.04.1                    MySQL database core client binaries
ii  mysql-common                           5.5.54-0ubuntu0.12.04.1                    MySQL database common files, e.g. /etc/mysql/my.cnf
ii  mysql-gui-tools-common                 5.0r14+openSUSE-2.2ubuntu2                 Architecture independent files for MySQL GUI Tools
iU  mysql-server                           5.5.54-0ubuntu0.12.04.1                    MySQL database server (metapackage depending on the latest version)
ii  mysql-server-core-5.5                  5.5.54-0ubuntu0.12.04.1                    MySQL database server binaries

另外,我已经在askubuntu中检查了以下问题,但我仍然没有解决方案。

https://askubuntu.com/questions/482923/mysql-error-the-partition-with-var-lib-mysql-is-too-full

如何安装MySQL服务器?

2 个答案:

答案 0 :(得分:1)

将100%使用的根目录更改为mysql的数据目录路径。 您的/ home目录中有空格(717G)

要更改路径,请按照以下步骤操作: How to change MySQL data directory

答案 1 :(得分:1)

可能是硬盘设备你的" var"分配的文件夹已满。您可以尝试创建指向用户目录的符号链接:

mkdir ~/mysql

然后创建一个符号链接:

cd /var/lib
sudo rm -rf mysql
sudo ln -s /home/$USER/mysql ./mysql

最后,尝试重新安装mysql-server-5.5。