Wednesday, January 26, 2011

MySQL

How to rename a database:

1) Find the directory where MySQL stores the database information:
$ mysqladmin -u gbezerra -p variables | grep datadir

2) Change the directory name of the database
$ sudo mv <datadir>/<old_name> <datadir>/<new_name>

No comments:

Post a Comment