mysql : my first table

D

dmonk

Guest
I'm self-learning (crash course style) about mysql and
it looks like I have mysql running:

//-------------------------------Terminal---------------------------------

[D-Ms-Computer:/usr/local/mysql] mysql1# sudo ./bin/mysqld_safe
Starting mysqld daemon with databases from /usr/local/mysql/data

//----------------------------end Terminal--------------------------------------

My goal now is to create my first table.
My goal is modest, I would be happy if I can just create a
one row- one heading table : ) for now.

The command I entered doesn't seem to be doing the job.
I closed my terminal window, went to take a break and then I tried this:

//-------------------------------Terminal---------------------------------

[D-Ms-Computer:/usr/local/mysql] mysql1# sudo ./bin/mysqld_safe
A mysqld process already exists

[D-Ms-Computer:/usr/local/mysql] mysql1# CREATE DATABASE accounting;
CREATE: Command not found.

//----------------------------end Terminal--------------------------------------

I'm REALLY new to the command line so, I'm a bit puzzled -- any ideas?

Thank you in advanced for your help.

dmonk
 
Joined
Oct 27, 2002
Messages
1,345
Reaction score
0
Points
36
Location
Vermont
Your Mac's Specs
17" iMac G4 800MHz 1GB RAM
That seems right to me. But you need to be in the MySQL client to work with it. You don't just enter those commands in the shell. Try running mysql, and then you should get a mysql> prompt. From there you can run your sql commands.
 
Joined
Oct 27, 2002
Messages
1,345
Reaction score
0
Points
36
Location
Vermont
Your Mac's Specs
17" iMac G4 800MHz 1GB RAM
To run mysql, just enter "mysql" into the shell prompt. Without the "'s of course. You might need to authenticate yourself before you can create databases though. From what I just looked at, it defaults to the user you created mysql with, I think. So you might be ok. But that is something you should look into.
 
OP
D

dmonk

Guest
Thank You

Thanks Emrys for the support.

It took me a couple of days but I got mysql client running and I created a quick table. Goal acomplished (for now) Now's time for a break! : )



Emrys said:
To run mysql, just enter "mysql" into the shell prompt. Without the "'s of course. You might need to authenticate yourself before you can create databases though. From what I just looked at, it defaults to the user you created mysql with, I think. So you might be ok. But that is something you should look into.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top