r/mysql • u/Shaurya_711 • Jun 21 '26
question Getting stuck for some reason?
So i am just trying to create something related to my project and after i created the table i realised that i had written char(1) in one column and that i needed varchar(2), so i tried to modify that column obviously but when i entered the modifying the command, sql got stuck for some reason on the next line??? i tried typing something anything but nothing showed, it was like it hung/froze but when i did ctrl+c, it showed query aborted then showed what i had written. when i tried to drop both the table and the database same thing happened. what should i do because this is starting to get really annoying?
2
u/DonAmechesBonerToe Jun 21 '26
Something else (another thread) is using the table and your alter cannot get a metadata lock
1
u/roXplosion Jun 21 '26
INNODB or MyISM?
1
u/flyingron Jun 21 '26
How are you communicating with the server? The "mysql" command? phpmyadmin? Something else?
Sounds more like a network connection between you and the server.
Can you do any SHOW or SELECT operations that don't write to the DB?
Command should have looked something like ALTER TABLE `myTable` CHANGE `myColumn` `myColumn` VARCHAR(2);
1
u/ssnoyes Jun 22 '26
What did it show when "stuck"? Was it "->"? If so, you just needed a semicolon at the end of the line.
1
u/[deleted] Jun 24 '26
[removed] — view removed comment