Greenguy's Board


Go Back   Greenguy's Board > Programming & Scripting
Register FAQ Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rating: Thread Rating: 1 votes, 5.00 average. Display Modes
Old 2003-08-29, 10:56 AM   #1
EclectiXXX
Well you know boys, a nuclear reactor is a lot like women. You just have to read the manual and press the right button
 
EclectiXXX's Avatar
 
Join Date: Apr 2003
Location: Md USA
Posts: 159
Send a message via ICQ to EclectiXXX Send a message via AIM to EclectiXXX Send a message via Yahoo to EclectiXXX
Question Commands to Create a MySQL DB?

Oh Cleo.... and anyone else....

One of the threads we lost was the one discussing how to create a MySQL DB from the UNIX prompt.....
EclectiXXX is offline   Reply With Quote
Old 2003-08-29, 11:24 AM   #2
Dr Bizzaro
I'm not interested in the facts, I'm interested in my opinion.
 
Dr Bizzaro's Avatar
 
Join Date: Apr 2003
Location: Chicago
Posts: 1,620
Send a message via ICQ to Dr Bizzaro
This one worked for Moses:

"I COMMAND THEE TO BE A MYSQL DATABASE AND THY MUST WORK PROPERLY AND BE TRUE"!.
Dr Bizzaro is offline   Reply With Quote
Old 2003-08-29, 11:43 AM   #3
EclectiXXX
Well you know boys, a nuclear reactor is a lot like women. You just have to read the manual and press the right button
 
EclectiXXX's Avatar
 
Join Date: Apr 2003
Location: Md USA
Posts: 159
Send a message via ICQ to EclectiXXX Send a message via AIM to EclectiXXX Send a message via Yahoo to EclectiXXX
LOL but then the damn thing went and spawned a bunch of golden tables profaning the name of it's Root creator and was almost deleted!!!
EclectiXXX is offline   Reply With Quote
Old 2003-08-29, 12:04 PM   #4
Dr Bizzaro
I'm not interested in the facts, I'm interested in my opinion.
 
Dr Bizzaro's Avatar
 
Join Date: Apr 2003
Location: Chicago
Posts: 1,620
Send a message via ICQ to Dr Bizzaro
Quote:
Originally posted by EclectiXXX
LOL but then the damn thing went and spawned a bunch of golden tables profaning the name of it's Root creator and was almost deleted!!!

"ABORT! ABORT!"
Dr Bizzaro is offline   Reply With Quote
Old 2003-08-29, 02:25 PM   #5
Cleo
Subversive filth of the hedonistic decadent West
 
Cleo's Avatar
 
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
Re: Commands to Create a MySQL DB?

Quote:
Originally posted by EclectiXXX
One of the threads we lost was the one discussing how to create a MySQL DB from the UNIX prompt.....
Damn if I know, all the hosts that I have ever had it was done through the control panel so I never had to learn how to do it from a shell.

man mysql

That should point you in the right direction.

Also I did a fast search on Google and found this
http://perl.about.com/library/weekly/aa020601a.htm
__________________
Free Rides on Uber and Lyft
Uber Car: uberTzTerri
Lyft Car: TZ896289
Cleo is offline   Reply With Quote
Old 2003-08-31, 04:17 PM   #6
nickk
Internet! Is that thing still around?
 
Join Date: Aug 2003
Posts: 2
doh, thought you said how to create a table,
to create a db just type 'CREATE DATABASE [dbname]' once you logged into mysql.

to create a table:

you have to login to mysql first:
mysql -u [username] -p
it'll ask your for your pass
then, type: use [databasename];

then something of this sort to create the database:
CREATE TABLE [table name]
(
ID INT AUTO_INCREMENT,
name VARCHAR(35) NOT NULL,
name2 int,
name3 date,
name4 text,

PRIMARY KEY (ID)
);

where name,name2... are variables of your choice, and int,date,varchar,text are variable types.

Last edited by nickk; 2003-08-31 at 04:35 PM..
nickk is offline   Reply With Quote
Old 2003-09-07, 07:54 AM   #7
venturi
No offence Apu, but when they were handing out religions you must have been out taking a whizz
 
Join Date: Apr 2003
Location: An Oasis atop a High Desert Mesa
Posts: 282
Send a message via ICQ to venturi
Almost right there Nickk.

first log into mySQL as Nickk said. But do not do the "use" command yet.

type: create database <databasename> \g
type: use <databasename> \g
type: grant all on <databasename> for <youruser> \g

Then you can add tables, etc.
You may have to have root access in order to do the above, depending upon your account settings with your host.
venturi is offline   Reply With Quote
Reply


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

Forum Jump


All times are GMT -4. The time now is 05:24 PM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc