how i can rename my database? There is any way in phpmyadmin? or what is the sql code?
I have already tried using RENAME DATABASE
thanks
If you're using MyISAM only, the quickest way is
/etc/init.d/mysql stop
cd /var/lib/mysql
mv <old db name> <new db name>
/etc/init.d/mysql start
It's not pretty, but it does work. You'll need root access.
This way might work if you're using InnoDB tables, but I have no experience there, so I won't vouch for it.
Here is an answer from SO: How do I quickly rename a MySQL database (change schema name)?
This seems to be your best bet. The RENAME DATABASE command, if it is even available to you, may wipe your data. Don't pursue that angle.
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