Ah apparently this silly book skipped that step.  So when I do databases I
get "mysql" and "nuke".  And figuring out how to make a new one wasnt very
hard heh.  Thanks, plenty more noob questions to come im sure :)
----- Original Message -----
From: "Parker Morse" <[EMAIL PROTECTED]>
To: "Charlie Brewer" <[EMAIL PROTECTED]>
Sent: Thursday, September 25, 2003 3:09 PM
Subject: Re: Noob Question: Error 1046


> On Thursday, Sep 25, 2003, at 15:12 US/Eastern, Charlie Brewer wrote:
> > and basic commands.  Anyways, they gave an example, and I typed it in
> > as shown in the book, but I get an error.  I took a screenshot (I
> > thought that would be easier) and posted it here:
> >
> > http://hostultra.org/brewer/mysql.jpg
>
> [The image shows "Welcome to MySQL Monitor" etc., the first command is
> a valid "CREATE TABLE" instruction, followed by "ERROR 1046: No
> database selected"]
>
> In order to create a table, MySQL needs to know which database to put
> it in. Since we can't see the command line you put in to execute, it's
> tough to know if you've actually got databases available, but assuming
> you do and you know which they are, you'd give the command
>
> mysql> use [database];
>
> before your CREATE, so you're "in" the relevant database.
>
> If you don't know which databases you have available, try
>
> mysql> show databases;
>
> and see what happens.
>
> Like this (munged, obviously):
>
> [root bluebird]# mysql -h raven.example.com -u root -p
> Enter password:
> Welcome to the MySQL monitor.  Commands end with ; or \g.
> Your MySQL connection id is 39944 to server version: 4.0.14-standard-log
>
> Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
>
> mysql> show databases;
> +-------------------+
> | Database          |
> +-------------------+
> | mysql             |
> | test              |
> +-------------------+
> 7 rows in set (0.04 sec)
>
> mysql> use test;
> Database changed
>
> pjm



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to