[ic] setting up mySQL database

Hostmaster hostmaster at zipp.net
Tue Dec 30 10:01:50 EST 2003


Hello list members,
Just switching over from Excel to mySQL database for the first time, and
having some trouble setting up a new database.

Using Interchange 5.0, Redhat 9.0.

I was given instructions for this as follows:
1)  1. log into mysql as root on the command line:
  mysql -u root -p

2)  type the password (currently 'pass') when prompted. The prompt then
looks
like this:
         mysql> _

3)  create the new database:
mysql> create database dbname;

where dbname is the name you want to give the database. If you want to see
the list of existing db's, type

         mysql> show databases;

The semicolon is part of the actual command you will type. Mysql accepts
multi-line command, so the semicolon is needed to tell it to 'run' your
completed statement.

4)  Grant access to the new db for a specific user. The username and
password can be new or existing, but if using an existing user, make sure
you use the same password as before, otherwise this statement will change
their password! :

 mysql> grant all privileges on dbname.* to username at localhost
identified by 'password';

...substituting the desired values for dbname, username and password. The
single quotes around the password are part of the actual command.

That's it! You can log out of mysql:

         mysql> exit;
--------------
When I tried to setup a new database for a new catalog, I was stumped.
After logging in, I entered:
mysql> create database inventory


and got this returned:
mysql> create database inventory
    ->

The instructions didn't prepare me for the ->.  I'm not sure what to enter
after the -> at this point.  I might have expect this line to read something
like:
mysql> database inventory created
---------------
Can anyone clarify this for me?

Also, in my attempts to create the database, it seems the names have
actually been created.  When I do this:
mysql> show databases;

I see my failed attempts in the list.  What is the command to safely remove
these failures?

Most gratefully,
Michael G.






More information about the interchange-users mailing list