Unix Technical Forum

Simple Database Creation Question

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 ...


Go Back   Unix Technical Forum > Database Server Software > MySQL

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-28-2008, 09:45 AM
DJENSE00@YAHOO.COM
 
Posts: n/a
Default Simple Database Creation Question

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.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-28-2008, 09:45 AM
Jerry Stuckle
 
Posts: n/a
Default Re: Simple Database Creation 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
==================
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-28-2008, 09:45 AM
Good Man
 
Posts: n/a
Default Re: Simple Database Creation Question

"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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:57 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com