how does one rename a schema in MySQL [duplicate]

Don’t use RENAME DATABASE!!!

Early 5.1 versions had this command but it’s been removed since it can corrupt data (reference).

The only way at present is

mysqladmin create new_db_name
mysqldump db_name | mysql new_db_name

as referred to here

Edit: Obviously this answer will become dated once this gets fixed.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)