Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rename database or tables

Status
Not open for further replies.

tempsup

MIS
Sep 10, 2003
26
GB
Hi,
how do i rename database or tables in mysql?

 
There are 2 things you can do.

1.
stop the mysql server
go to the data folder, usually /usr/local/mysql/data
find the DB and rename it (mv old new)
restart the mysql server

2.
dump the database
create a new one
insert the dump
delete the old database

hope this helps!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top