I’m using the below SQL command to add an index to a table. When I run the SQL command via to PHPmyadmin I get the yellow square loading and then it fades out. There is no refresh or anything it just stays on that page. I have millions of records in this table, would this effect adding a index, or is it adding the index and it just doesn’t tell me? If so, should I leave that browser tab open until it’s complete or can I close it?
ALTER TABLE table_name ADD INDEX table_index_name(col1, col2);
When I go to the processes section of PHPmyadmin I under the Alter Table process I get this message:Waiting for table metadata lock
This statement comes up when you’re doing another schema change statement.
Check to make sure no other statements are executing. I’ve had experiences where this has come up without two processes modifying the schema and I’ve had to kill the process and try again or restart your MySQL instance