Q

Script can't create database after dumping it

After executing the following command:

echo "drop database jess;" | /usr/local/mysql/bin/mysql -u root
I tried to do the next command:
/usr/local/mysql/bin/mysql -u root < /usr/local/mysql/db_backup/dump-jess.courses.sql
The first commands in the SQL command are:
CREATE DATABASE /*!32312 IF NOT EXISTS*/ jess;
USE jess;
The database was dumped successfully, but when the next command was run, I got the following error:
ERROR 1006 at line 11: Can't create database 'jess'. (errno: 28)
The script that these commands are in is run by root. What happened to my privileges?


This is a good opportunity to introduce the perror utility. The perror utility allows you to get a text description of the error codes that you will sometimes encounter when using MySQL. Here is the output I received in regards to the error number you quoted:

shell> perror 28
Error code  28:  No space left on device
So in this situation, it would appear that MySQL did not find sufficient free space to create the database.

See the following URL for more information on perror: http://dev.mysql.com/doc/mysql/en/perror.html#comments


This was first published in October 2004

Dig deeper on Open source databases

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchDataCenter

SearchServerVirtualization

SearchCloudComputing

SearchEnterpriseDesktop

Close