After executing the following command:
echo "drop database jess;" | /usr/local/mysql/bin/mysql -u rootI tried to do the next command:
/usr/local/mysql/bin/mysql -u root < /usr/local/mysql/db_backup/dump-jess.courses.sqlThe 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:
By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
shell> perror 28 Error code 28: No space left on deviceSo 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 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.