[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 254
  • Last Modified:

Cone MysSQL Database for new site

Im using MySQL Server 4.1 and MySQL Administrator on windows and I want to copy a database and all its information and rename it so I can use it for another site. Can anyone tell me how to do this?

My file are locate in
C:\Program Files (x86)\MySQL\MySQL Server 4.1\data

on my local machine
0
overcolor
Asked:
overcolor
1 Solution
 
mankowitzCommented:
if you are using myisam files, just copy the data files from one place to another. if not, you can use mysqldump to export the whole DB and then feed the resulting sql file to the new server.

if you use the mysql workbench, this is fairly easy -- use the backup and restore icons. You can download workbench from the mysql site.
0
 
overcolorAuthor Commented:
I not real good with MySQL, how would I find out what i'm using?
0
 
overcolorAuthor Commented:
I think I'm using InnoDB
0
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 
Kevin CrossChief Technology OfficerCommented:
Please award points to mankowitz, just wanted to second that this is very easy using MySQL Workbench, but mysqldump is option for you on mysql 4.1 without it.  Here is a reference: http://dev.mysql.com/doc/refman/4.1/en/mysqldump.html
0
 
overcolorAuthor Commented:
Work bench didn't work with my version, is there a older work bench?
0
 
a1jCommented:
mysqldump it, then open dump file (it is sql) and search/replace whatever you need to rename (database or tables..) then load it somewhere else via mysql dbname < dump.sql
0
 
mankowitzCommented:
phpmyadmin also has a front end for mysqldump, if you have that.

you'll do something like this

C:\Program Files (x86)\MySQL\MySQL Server 4.1\bin> mysqldump -uroot -pPASS > backup.sql

then, in the new server

C:\Program Files (x86)\MySQL\MySQL Server 5.1\bin> mysql -uroot -pPASS < /path/to/backup.sql
0
 
mankowitzCommented:
you might also have luck with the old gui-tools, namely mysql administrator

http://dev.mysql.com/downloads/gui-tools/5.0.html
0
 
overcolorAuthor Commented:
Should I upgrade MySQL then try again?
0
 
Muhammad WasifCommented:
No need to upgrade just of dump. mysqldump can do the work as mankowitz described with example (on DOS prompt).

You can try any other MySQL GUI tools but I recommend HeidiSQL.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now