Forum Moderators: mack

Message Too Old, No Replies

problems creating tables

any reccomended web tutorials?

         

fwordboy

11:06 am on Jan 26, 2004 (gmt 0)

10+ Year Member



just creating the database, now tyring to create a table with this

CREATE TABLE newsitem(
item_id TINYINT UNSIGNED NOT NULL AUTO_INCREMENT,
title VARCHAR(200) NOT NULL,
message TEXT NOT NULL,
posted TIMESTAMP,
PRIMARY KEY(item_id)
);

keep getting problems with it i've tried all kinds of iterations of this code but can't seem to get it to work. Does anyone hold an answer or know of really good mysql table creation tutorials.

p.s. in mysql how do i run a saved query?
i knows @filename.sql; but where do i store the sql file 'coz the mysql client can never find it.

fwordboy

11:08 am on Jan 26, 2004 (gmt 0)

10+ Year Member



just fixed it by executing the query in mysqlgui.
so why wouldn't it work in mysql client?

RonPK

6:41 pm on Jan 26, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If your server supports PHP try using phpmyadmin: a bunch of PHP scripts that make database management much easier.

fwordboy

11:00 am on Jan 27, 2004 (gmt 0)

10+ Year Member



thnakyou, i'll try it

but it still doesn't explain why it didn't work.

RonPK

1:38 pm on Jan 27, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Did you select the database? (with 'use mydatabase;')
Does the user have the CREATE privilege for that particular database?

fwordboy

2:25 pm on Jan 27, 2004 (gmt 0)

10+ Year Member



yes i selected that database. mysql is setup to run on my laptop with IIS, with me as the only user with all priviledges.