0

I'm on a Debian host, and dropped a database from a Django project and then tried to re-create it. I've tried variations on a same basic theme from mysqladmin and mysql to create a database, and (after an initial success creating a first database before I dropped the database) I am trying things like:

[as root]

mysqladmin create foo -uroot -p

and always getting a response like:

ERROR 1006 (HY000): Can't create database 'foo' (errno: 28)

Searching a little has suggested that the error message can be a permissions / ownership issue. I've looked briefly, and my.cnf points to /var/lib/mysql. /var/lib/mysql is owned by mysql:mysql; all directories are mode 700 and there are files inside the root at 660 and 644.

What do I need to do so that the database I dropped, now nonexistant AFAICT, is replaced by a fresh new database at the same name?

(I tried to create databases with completely new names, and got the same error.)

I am running:

mysql Ver 14.14 Distrib 5.5.49, for debian-linux-gnu (x86_64) using readline 6.3

Linux www 4.5.0-x86_64-linode65 #2 SMP Mon Mar 14 18:01:58 EDT 2016 x86_64 GNU/Linux

1 Answer 1

3

errno 28 means ENOSPC, that is, "No space left on device".

There's several lookup commands available for such standardized errors, one is called simply errno:

% errno 28
ENOSPC 28 No space left on device

Another is called perror:

% perror 28
OS error code  28:  No space left on device
6
  • 1
    The command that comes included with mysql is perror. I'm unfamiliar with errno, but glad to see it does work with mysql error codes. On CentOS at least, errno is part of the 'moreutils' package from EPEL while perror is available in mysql/mariadb-server (which would already be installed if troubleshooting a mysql server).
    – user143703
    May 27, 2016 at 18:53
  • MySQL packaging has a habit of reinventing wheels apparently - IIRC they also ship a command called resolveip. These error numbers are a generic concept, see man 3 errno. May 27, 2016 at 18:57
  • I don't disagree with you, I'm simply saying the command errno is less likely to exist (be already installed) on a MySQL installation. errno might be commonly installed on the systems you use, but it's not even available in the base distribution of CentOS (it's in EPEL).
    – user143703
    May 27, 2016 at 19:02
  • 1
    That's fine. The core issue is that errno 28 is the gist of that error message, and this is something that should be looked up, be it through these command-line tools or via something else entirely. May 27, 2016 at 19:07
  • I had perror and not errno already installed. perror also explained the error code. May 27, 2016 at 20:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .