Skip to content

Instantly share code, notes, and snippets.

@phamngsinh
Created July 13, 2016 03:30
Show Gist options
  • Select an option

  • Save phamngsinh/d2c5a88854ccea3eaaa3a2055d8f9752 to your computer and use it in GitHub Desktop.

Select an option

Save phamngsinh/d2c5a88854ccea3eaaa3a2055d8f9752 to your computer and use it in GitHub Desktop.
Rename database in mysql
CREATE DATABASE `new_database_name` COLLATE 'utf8_unicode_ci';
RENAME TABLE `old_table` TO `new_database_name`.`old_table`;
DROP DATABASE `old_database_name`;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment