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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newb question, How to open a database in mysql

Status
Not open for further replies.

sazebac

Technical User
Apr 16, 2003
117
US
I'm running MySql in a Windows environment, I have a database called winestore.database and I put it in \mysql\bin

I can connect to mysql fine.
I can't seem to open the database, I've tried
use winestore.database
use winestore
mysql winestore.database
Plus a few others. Any suggestions?
 
I'm intrigued by your use of the phrase "I put it in \mysql\bin".

Did you not create the database from within MySQL by using the "CREATE DATABASE" statement? If not, you need to -- that's the only way you're going to get MySQL to recognise the database.


Want the best answers? Ask the best questions: TANSTAAFL!
 
What I mean is, the database is an example database that ties in to the book I'm reading. The database is on a web site. I downloaded it, and copied it into the c:\mysql\bin and then into c:\mysql\data. So no I did not create the database from within mysql.
 
Then MySQL is not going to use it.

What exactly did you download? A set of SQL statements?

If so, you need to run your preferred MySQL administration application, create the database, then import those SQL statemetns into MySQL.

Want the best answers? Ask the best questions: TANSTAAFL!
 
do a mysql>show databases command. If you don't see your database there then it's either a zipped file, scripts to create your database or something else.

Regards,

JG
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top