Jump to content


Photo

how do you change name of schema?


  • Please log in to reply
1 reply to this topic

#1 diskhub

diskhub
  • Members
  • PipPip
  • Member
  • 17 posts

Posted 27 December 2005 - 09:34 AM

how do you change name of mysql schema / database?

#2 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 27 December 2005 - 03:02 PM

There's no "official" way to do this -- that is, there's no RENAME DATABASE command. The simplest way to do this is to stop the MySQL server, go to the datadir, and simply rename the appropriate directory (i.e. the desired database). Be sure to update the GRANTs tables!
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users