I get this error when trying to start MySQL: The partition with /var/lib/mysql is too full!

Here is the output of df -h:

Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       455G   77G  356G  18% /
none            4,0K     0  4,0K   0% /sys/fs/cgroup
udev            1,9G  4,0K  1,9G   1% /dev
tmpfs           387M  1,3M  386M   1% /run
none            5,0M     0  5,0M   0% /run/lock
none            1,9G  1,2M  1,9G   1% /run/shm
none            100M   28K  100M   1% /run/user

This shows that the partition is nowhere near full.

  • what is the size of the binairy log in /var/lib/mysql/? – Rinzwind Jun 13 '14 at 19:19
  • I'm sorry if this is a dumb question, but which one is the correct log: ib_logfile0 or ib_logfile1? – rocketgear Jun 13 '14 at 19:21
  • hmm I would think "server-bin.*" or "mysql-bin.*". – Rinzwind Jun 13 '14 at 19:24
  • There seem to be no such files in /var/lib/mysql. I've even reinstalled mysql-server, but nothing changed. – rocketgear Jun 13 '14 at 19:36
  • whcih version are u you using please describe that – Chinmaya B Jun 14 '14 at 9:55

I finally fixed it by running sudo /etc/init.d/mysql start. I just had to insert sudo in front of the command.

  • 1
    How can this fix the issue? The OP got this error when trying to start MySQL, and this command do nothing to help. – Paul Lo Feb 5 '15 at 6:30
  • @PaulLo it really helps. I forgot to add sudo. – shukshin.ivan Jan 14 '16 at 14:54
  • 3
    I don't understand how this got 8 upvotes. – Parth Thakkar Jun 12 '16 at 12:56
  • This fixed it for me. I don't know why this works but it does. I was getting the error saying the partition is full when trying to start mysql. I ran the command using sudo and mysql started just fine. – Gavin Aug 12 '16 at 19:23
  • Wow, sudo service mysql restart was saying everything was good, but running this command actually fixed the problem. I don't get the difference ... – George Dimitriadis Sep 23 '17 at 15:16

try this:

sudo service mysql stop
sudo service mysql start
  • 1
    i had the same problem 'The partition with /var/lib/mysql is too full!' and i fixed it this way! – Steve Dörre Sep 17 '14 at 9:23
  • @KasiyA yes it is an answer to the question (but it is the same as the answer given by rocketgear himself) (stop/start will fix this notice) – Rinzwind Sep 17 '14 at 9:45
  • @Rinzwind uhh. sorry – αғsнιη Sep 17 '14 at 11:13
  • in my case sudo /etc/init.d/mysql start doesn't work.... – Steve Dörre Sep 17 '14 at 17:34

In my case the error resulted of changing the ip address on the server.

cat /var/log/mysql/error.log

150427 23:01:08 InnoDB: 5.5.43 started; log sequence number 11731761
150427 23:01:08 [Note] Server hostname (bind-address): '192.168.1.234'; port: 3306
150427 23:01:08 [Note]   - '192.168.1.234' resolves to '192.168.1.234';
150427 23:01:08 [Note] Server socket created on IP: '192.168.1.234'.
150427 23:01:08 [ERROR] Can't start server: Bind on TCP/IP port: Cannot assign requested address
150427 23:01:08 [ERROR] Do you already have another mysqld server running on port: 3306 ?
150427 23:01:08 [ERROR] Aborting

changing the

 bind-address       

in

 /etc/mysql/my.cnf

to the current ip and restarting the server

sudo /etc/init.d/mysql start

solved the problem

  • Fixed my problem. Thanks. – jhovgaard May 29 '15 at 11:08

I have faced same issue, in my case there is another mysql service was running

$ ps -aux | grep mysql
mysql     7241  0.0  5.1 562600 52812 ?        Ssl  13:36   0:02 /usr/sbin/mysql
ubuntu   13580  0.0  0.0  10468   916 pts/0    S+   15:50   0:00 grep --color=au

$ sudo kill  7241

Then I started mysql.

$ sudo /etc/init.d/mysql start
* Starting MySQL database server mysqld                                 [ OK ]

There are two possible problems with Mysql package:

  1. Really a space problem:

    Many distributions have their /var directory in the original root partition which is not made big enough by default to hold real-life data. They usually create separate partition for /usr with tons of space

    Check this and you will get full details and your answer

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

  2. It is a bug which might not have been fixed and to fix it follow this article:

    https://bugs.launchpad.net/ubuntu/+source/mysql-dfsg-5.0/+bug/118523

In the partition /var there are several directories that accumulate many files which can fill up the partition.

In my case logs are saved in /var/logs filling up /var prevented me from starting mysql.

I deleted some of those old logs and that solved my problem. If you do not have log rotation it is better that you try acerlo since if you do not have this process the logs can add up to many GB in a single file.

Run the command sudo apt-get --reinstall install mysql-server to re-install MySQL. It will re-create the missing directories and allow you to start the server again.

  • This is what I got: dpkg: dependency problems prevent configuration of mysql-server: mysql-server depends on mysql-server-5.5; however: Package mysql-server-5.5 is not configured yet. How do I use --configure? – rocketgear Jun 13 '14 at 19:51

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.