I have many MySQL databases that have same tables with the same structure. I am looking for simple way how can I alter table structure in all of the databases at once ( in one query or using one tool).
you can see this solution like of alter many tables in the post :
select concat( 'alter table ', a.table_name, ' add index `fields` (`field`);' )
from information_schema.tables a
where a.table_name like 'table_prefix_%';
A QND way, but anyhow,
//regards
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.