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;
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.
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!
Active Protection takes the fight to cryptojacking

While there were several headline-grabbing ransomware attacks during in 2017, another big threat started appearing at the same time that didn’t get the same coverage – illicit cryptomining.

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

David FavorLinux/LXD/WordPress/Hosting SavantCommented:

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.

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!
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.
Pawan KumarDatabase ExpertCommented:
welcome glad to help.
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

From novice to tech pro — start learning today.