question

samsql avatar image
samsql asked

Baseball Database

I am trying to setup a database in MySQL. So far I have created the database...but i can not import the database download into the database. I am suppose to download the sql file from www.baseball-databank.org ...it comes as BDB-sql-2010-12-01.zip. Then I unzip it and it appears as BDB-sql-2010-12-01.sql. I then try to put it into the database by typing this in the command prompt: mysql -u (username) -p -s bbdatabank < BDB-sql-2010-12-01.sql Then it says that it the system cannot find the file. Can you please help me? (i know nothing about databases or code or anything so please be very specific on what to do)
mysqlimport-data
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Cyborg avatar image
Cyborg answered
You are in a wrong place this community is dedicated for SQL Server. Since you are a fresher in DB side i can help you this time. Check whether that Database "bbdatabank" exists in your server. if it is missing create a new one befor running the script.

mysql -u (username) -p -e "create database bbdatabank "
-- the above query will create new db on your mysql server, then execute the 
-- following query to run script from a file.
mysql -u (username) -p bbdatabank < 
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.