Why do I get this error: #1005 - Can't create table '#sql-233_18429' (errno: 1)?

I'm trying to delete a column from a table, and that error shows up.  Does anyone know why that would be?  Any help is appreciated.
Aimee KatherineAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Pawan KumarDatabase ExpertCommented:
How are you deleting that column. You need to use the below command.

ALTER TABLE yourtableName DROP COLUMN yourcolumnNamethatneedstoDropped;
1
Aimee KatherineAuthor Commented:
Hi, thanks for the response.  To delete the column: After I click on the Structure tab, I check the checkbox that is right next to the column and then click on 'Drop'. I get the same error when I click on "Drop" that is on the same row as the name of the column.

I should probably also say that I'm unable to drop, add, or change in the database.  I get an error.
0
Aimee KatherineAuthor Commented:
I still get the error when I use the command:#1005 - Can't create table '#sql-f68f_15b' (errno: 1) (Details…)

Any help is greatly appreciated.  Thank you!
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

arnoldCommented:
Does the column you are trying to delete/remove have an index, is being referenced as a foreign key....

Etc.
1
David FavorLinux/LXD/WordPress/Hosting SavantCommented:
Usually...

Tables named with a preceding "#" character are temporary tables created during SELECT operations which tend to either be complex or return more rows than a database subsystem can hold in memory, so these tables must spill over to /tmp or where ever temporary files are written on your system.

At least this is the way MariaDB + MySQL work. I'm guessing all SQL databases work like this.

So... your /tmp (or equivalent) may be to small or you may not have permission to write to the /tmp directory.

Work with your admin to answer these questions or you can simplify your SELECT, so all data stays in memory buffers + never hits a disk.
1

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Aimee KatherineAuthor Commented:
Hi, thanks for the response.  It was happening with every column.  I couldn't do anything in the database, so I copied all the tables into a new database, and I'm able to keep working now.  I'm just afraid that it will happen again.  Thank you Pawan, David, and Arnold for your kind responses. It's truly appreciated!
0
David FavorLinux/LXD/WordPress/Hosting SavantCommented:
You're welcome!

The likely fix is simple...

chmod 1777 /tmp

Open in new window


Or wherever your /tmp equivalent lives.
1
Pawan KumarDatabase ExpertCommented:
welcome glad to help.
1
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
SQL

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.