![]() |
Commands to Create a MySQL DB?
|waves| 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..... |
This one worked for Moses:
"I COMMAND THEE TO BE A MYSQL DATABASE AND THY MUST WORK PROPERLY AND BE TRUE"!. |
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!!!
|
Quote:
|buddy| "ABORT! ABORT!" |
Re: Commands to Create a MySQL DB?
Quote:
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 |
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. |
Almost right there Nickk. :D
first log into mySQL as Nickk said. But do not do the "use" command yet. type: create database type: use type: grant all on 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. |
All times are GMT -4. The time now is 01:59 PM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc