New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

mysql : my first table


Post Reply New Thread Subscribe

 
Thread Tools
dmonk
Guest
 
Posts: n/a

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
QUOTE Thanks
Emrys

 
Emrys's Avatar
 
Member Since: Oct 27, 2002
Location: Vermont
Posts: 1,345
Emrys is on a distinguished road
Mac Specs: 17" iMac G4 800MHz 1GB RAM

Emrys is offline
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.

Emrys
Community Administrator / Moderator
MAC-FORUMS.COM - The Ultimate Source For Your Mac!
QUOTE Thanks
Emrys

 
Emrys's Avatar
 
Member Since: Oct 27, 2002
Location: Vermont
Posts: 1,345
Emrys is on a distinguished road
Mac Specs: 17" iMac G4 800MHz 1GB RAM

Emrys is offline
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.

Emrys
Community Administrator / Moderator
MAC-FORUMS.COM - The Ultimate Source For Your Mac!
QUOTE Thanks
dmonk
Guest
 
Posts: n/a

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! : )



Quote:
Originally Posted by Emrys
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.
QUOTE Thanks

Post Reply New Thread Subscribe


« mysql.sock -- what goes in the file? | Oracle ? on Mac OS 10.x »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Installing mySQl on Mac OS X sealey Web Design and Hosting 7 06-02-2005 10:45 PM
mysql "primary key" help funky Web Design and Hosting 4 05-16-2005 09:35 PM
Removing MySQL from Panther 3.6 vawolf OS X - Operating System 0 12-07-2004 09:25 PM
Any MySQL users (gurus) out there? mgm_03 OS X - Development and Darwin 5 05-03-2004 05:51 PM
MySQL password retardation mrtojamura OS X - Development and Darwin 0 02-19-2004 08:13 PM

All times are GMT -4. The time now is 02:36 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?