I need to run a procedure that goes through all schemas tables in MySQL server
Selecting TABLE_NAME is not enough. You need CONCAT(TABLE_NAME, '.', TABLE_SCHEMA).
You cannot use a variable in a query as a place where tablename is stored. You must use dynamic SQL (prepared statement).


Prepared SQL Statement Syntax


  I need now to loop on each table how could I do that in prepared statement


Get each database.table which must be converted. Build proper altering query text in a variable. Prepare. Execute. Iterate next. Repeat until all tables processed. - akina