Q
Problem solve Get help with specific problems with your technologies, process and projects.

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


Dig Deeper on Linux servers

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.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

SearchServerVirtualization

SearchCloudComputing

Close