I have a MySQL database where the names of indexes are shared between tables. Which is fine in MySQL, because index names only have to be unique within a table, and not within a database. But I have to export this database to a system that requires index name be globally unique.
Is there some command or script I can run to assign unique names to the indexes? I don't care if they are randomly generated.
As of the latest version of MySQL, there is no way to rename indexes. Your only option would be to DROP
the index then CREATE
a new one or just CREATE
a new one.
There is no RENAME
or ALTER
index command on MySQL.
You need to either DROP
the index or CREATE
a new one.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With