Jump to content

Archived

This topic is now archived and is closed to further replies.

Random

Using PuTTY to access mysql...

Recommended Posts

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.