This is a discussion on Simple Database Creation Question within the MySQL forums, part of the Database Server Software category; --> I'm hoping someone can help me. I'm trying to follow along with the book Baseball Hacks (excellent book by ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I'm hoping someone can help me. I'm trying to follow along with the book Baseball Hacks (excellent book by the way) and trying to learn MySQL so that I can follow along. Really intrigued by MySQL and would like to become proficient. However, I am stuck on step one. Probably a very stupid question.... I have intalled the newest version of MySQL and everything is fine. I can run MySQL Command Line Client. I have created a database called baseballtemp and I can see it is there when I run SHOW DATABASES. It is there. I have downloaded the .sql file (called BDG-sql-2006-11-17) from the website and according to the directions in the book should be able to import the data into the baseballtemp database. I have placed the .sql file in the data folder in the MySQL Server 5.0 directory. So I try and run the MySQL command. I hit the start button (I'm running Windows XP by the way) and click on RUN. In the run box I insert the following line. mysql -u root -p -s baseballtemp < BDB-sql-2006-11-17.sql When I click on run the command shell opens up and quickly scrolls through a bunch of things so quickly I cannot read it. It takes a half a second at most. It's strange because it seems the -p switch should make me enter a password and it never does. Then I go into the MySQL command line client and type SHOW DATABASES. I can see the database there. But then I click on SHOW TABLES; as instructed in the book and I get a message there are no tables in this database. This doesn't make sense. I know there was about 38MB of data in this file. Can anyone give me some advice. I have been trying to get this to work all afternoon with absolutely no luck!!! Tearing my hair out. Thanks so much in advance. I sincerely apologize for being very naive about MySQL and asking a stupid question. |
| |||
| DJENSE00@YAHOO.COM wrote: > I'm hoping someone can help me. I'm trying to follow along with the > book Baseball Hacks (excellent book by the way) and trying to learn > MySQL so that I can follow along. Really intrigued by MySQL and would > like to become proficient. However, I am stuck on step one. Probably > a very stupid question.... > > I have intalled the newest version of MySQL and everything is fine. I > can run MySQL Command Line Client. I have created a database called > baseballtemp and I can see it is there when I run SHOW DATABASES. It > is there. I have downloaded the .sql file (called BDG-sql-2006-11-17) > from the website and according to the directions in the book should be > able to import the data into the baseballtemp database. I have placed > the .sql file in the data folder in the MySQL Server 5.0 directory. > So I try and run the MySQL command. I hit the start button (I'm > running Windows XP by the way) and click on RUN. In the run box I > insert the following line. > > mysql -u root -p -s baseballtemp < BDB-sql-2006-11-17.sql > > When I click on run the command shell opens up and quickly scrolls > through a bunch of things so quickly I cannot read it. It takes a > half a second at most. It's strange because it seems the -p switch > should make me enter a password and it never does. Then I go into the > MySQL command line client and type SHOW DATABASES. I can see the > database there. But then I click on SHOW TABLES; as instructed in the > book and I get a message there are no tables in this database. This > doesn't make sense. I know there was about 38MB of data in this > file. > > Can anyone give me some advice. I have been trying to get this to > work all afternoon with absolutely no luck!!! Tearing my hair out. > > Thanks so much in advance. I sincerely apologize for being very naive > about MySQL and asking a stupid question. > You need to get the errors being put out by MySQL. Try redirecting the output to a file, i.e. mysql -u root -p -s baseballtemp < BDB-sql-2006-11-17.sql > error.log 2>&1 Or just change the properties for your window to give you a larger buffer (and save more lines in the window). -- ================== Remove the "x" from my email address Jerry Stuckle JDS Computer Training Corp. jstucklex@attglobal.net ================== |
| ||||
| "DJENSE00@YAHOO.COM" <DJENSE00@YAHOO.COM> wrote in news:1178315259.794570.108460@e65g2000hsc.googlegr oups.com: > So I try and run the MySQL command. I hit the start button (I'm > running Windows XP by the way) and click on RUN. In the run box I > insert the following line. > > mysql -u root -p -s baseballtemp < BDB-sql-2006-11-17.sql at RUN, type 'cmd' This will open up a permanent command-line window that won't close until you tell it to. from that new window, type the mysql command > > When I click on run the command shell opens up and quickly scrolls > through a bunch of things so quickly I cannot read it. It takes a > half a second at most. It's strange because it seems the -p switch > should make me enter a password and it never does. Then I go into the > MySQL command line client and type SHOW DATABASES. I can see the > database there. But then I click on SHOW TABLES; as instructed in the > book and I get a message there are no tables in this database. You've shown the databases, but i don't know if you've USEd one yet. Type "USE mydatabase", then select the tables |