LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-29-2008, 03:06 PM   #1
myfoot
LQ Newbie
 
Registered: Nov 2007
Posts: 17

Rep: Reputation: 0
Rename database


Hello,

i need to rename mysql database in CLI mode, please guide me in this regard.


Thanks
 
Old 08-29-2008, 03:16 PM   #2
CRC123
Member
 
Registered: Aug 2008
Distribution: opensuse, RHEL
Posts: 374
Blog Entries: 1

Rep: Reputation: 32
myfoot, apparently you don't like to look up things yourself. I have looked at your previous posts and your questions are always very general with no details of what you're trying to do. Also, the questions you ask show that you don't use search engines or know how to use the manual pages in Linux. So instead of giving you the answer to your question, I am going to show you how YOU can find it yourself. At least show some initiative and people would be more happy to help you. Most posts answering your questions are links to web sites found on google or references to man pages.

To use google:
go to http://www.google.com
type a search phrase in the box. for this question, a good phrase might be 'mysql database rename'
Press the 'Google Search' button. Look through results to see if they solve your problem.
If they don't solve your problem, try different search phrases.
If that still doesn't solve your problem, post here and let us know what you've tried and any info/data that may help us find and answer

To use man pages:
on Linux command line, type 'man <program>' where <program> is the name of the program you need help with.

I don't mean to sound harsh, but it bothers me when people don't at least make an effort to do something themselves.

Good Luck
 
Old 08-30-2008, 05:43 AM   #3
myfoot
LQ Newbie
 
Registered: Nov 2007
Posts: 17

Original Poster
Rep: Reputation: 0
As per my knowledge its not possible in CLI mode.Thats why i asked this question from you gurus. but you really disappointed me.if my question is irritating you than dont reply me next time.


bydefault databae installed in /var/lib/mysql/data/yourdatabasename,

you can rename it.but it may corrupt your datbase.
 
Old 08-30-2008, 06:59 AM   #4
Fantasio
Member
 
Registered: Nov 2007
Location: Vinsobres - Drome - France
Distribution: SuSE Linux 11.3
Posts: 152

Rep: Reputation: 19
don't think so...
1. stop mysqld
2.make a backup of /var/lib/mysql
3. mv oldname newname
4. start mysqld
5. enter mysql as dba
6. use mysql
7. update tables containing a reference to your db
8. make a test
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How can i copt the MYSQL Database to a other server (Database) halvorls Linux - Server 3 07-27-2008 09:19 PM
(my)sql: drop database doesn't remove database kpachopoulos Programming 3 09-19-2007 01:32 PM
Database Programming (database to database transaction) johncsl82 Programming 7 02-02-2007 08:20 AM
LXer: A database solution is more than database software LXer Syndicated Linux News 0 09-25-2006 08:54 AM
Rename mysql database pk21 Linux - Newbie 4 06-11-2004 05:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration