Jump to content


Photo

Using PuTTY to access mysql...


  • Please log in to reply
2 replies to this topic

#1 Random

Random
  • Members
  • PipPipPip
  • Advanced Member
  • 30 posts
  • LocationIndiana

Posted 05 April 2003 - 11:09 PM

I am using PuTTY to access my mysql database. I want to add a table named users into it with rows named username and password. How would I write this up? I have this but there is a syntax error:

mysql> CREATE TABLE users ( username VARCHAR(20), password VARCHAR(20));

thanks

#2 Avalanche

Avalanche
  • Members
  • PipPipPip
  • Advanced Member
  • 73 posts

Posted 06 April 2003 - 12:10 AM

I think
mysql> CREATE TABLE users ( id tinyint(4) DEFAULT \'0\' NOT NULL AUTO_INCREMENT,  username varchar(20),  password varchar(20));
should work.
Of course you can get rid of the auto_increment if you want.

Tell me how it works out.
DEFINE("YOU","Spending Too Much Time On The Computer");

#3 Random

Random
  • Members
  • PipPipPip
  • Advanced Member
  • 30 posts
  • LocationIndiana

Posted 06 April 2003 - 01:15 AM

ok, i was forgetting the int line. eehhe. :D




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users