MySQL _ Import

I am using MySQL workbench 5.2.25 CE

I have backed up my Database in  a self contained file.

I want to import the database but do not want to restore it, How can I ensure that the database is created but under a different name. example db_development.

I want to leave the database that users are currently working on but need a copy of the database to test some sql statements.
BrogrimInformation Systems Development ManagerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Daniel WilsonCommented:
Check the first few lines of the .sql file you created, but I doubt it has the CREATE DATABASE instruction in it.  Assuming it does not, do a

Create Database db_development;
Use db_development;

Then restore that database from the file.
BrogrimInformation Systems Development ManagerAuthor Commented:
The SQL file is nearly 4 GB, I have tried to open it on workbench.

I am getting a message that it is unable to allocate that much memory to open the file.
Daniel WilsonCommented:
Do you have command-line access to mysql?  If so, using the

Open in new window

command should go well.
BrogrimInformation Systems Development ManagerAuthor Commented:
Sorry Daniel, I don't understand the question.

Are you referring to the Command Prompt?

If so I would not be proficient (No Idea) in using this to access MySQL
Daniel WilsonCommented:
At the command prompt:
>mysql -u MyUserName -p
mysql> create database db_development;
mysql> use db_development;
mysql> source MyBigBackupFile.sql;
mysql> exit;

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
MySQL Server

From novice to tech pro — start learning today.