Question about Sun MySQL

1 Answer

MySQL Auto Increase

Trying to build a table that has 3 fields - ID, User Name, Password.

I want The ID to be unique for each user, & i want it to increase by one each time.

First users ID is 1, the second is 2, etc....

How can this be done?


Posted by on

1 Answer

  • Level 1:

    An expert who has achieved level 1.

    MVP:

    An expert that gotĀ 5 achievements.

    Governor:

    An expert whose answer gotĀ voted for 20 times.

    Hot-Shot:

    An expert who has answered 20 questions.

  • Contributor
  • 30 Answers

Try this -


CREATE TABLE users (
id MEDIUMINT NOT NULL AUTO_INCREMENT,
login TEXT NOT NULL,
password TEXT NOT NULL,
PRIMARY KEY( id )
);

INSERT INTO users VALUES ( null, 'bob', 'mypassword' );
INSERT INTO users VALUES ( null, 'bill', 'pass' );
INSERT INTO users VALUES ( null, 'sean', '1234' );

Posted on Aug 10, 2008

1 Suggested Answer

6ya6ya
  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

Hi,
a 6ya expert can help you resolve that issue over the phone in a minute or two.
best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
the service is completely free and covers almost anything you can think of (from cars to computers, handyman, and even drones).
click here to download the app (for users in the US for now) and get all the help you need.
goodluck!

Posted on Jan 02, 2017

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

MySQL Error Number 1045 Access denied for user 'root'@'localhost' (using password: NO) If you want to check the network connection, please click the Ping button. That is the message i get when i...


Hi,

If a personal firewall is running on your machine, please make sure you have opened the TCP port 3306 for connections. Otherwise no client application can connect to the server. After you have opened the port please press [Retry] to apply the security settings.

If you are re-installing after you just uninstalled the MySQL server please note that the data directory was not removed automatically. Therefore the old password from your last installations is still needed to connect to the server. In this case please select skin now and re-run the Configuration Wizard from the start menu.


Please revert me, if you need more assistance, i would be very glad to assist you more.
If you were satisfied with the solution please rate this sollution.

Thanks For using FixYa!
Vinod Kumar J

Nov 28, 2010 | Sun MySQL

2 Answers

How to make a code for log in using database?


RIGHT CLICK ON MY COMPUTER AND SELECT THE MANAGE AND SELECT USER AND GROUPS CLICK YOUR USER ON WHICH YOU WANT CREATE PASSWORD RIGHT CLICK THE USER AND SET PASSWORD AND FILL THE PASSWORD AND ENTER NOW YOUR PASSWORD WILL SET ENJOY

Oct 21, 2009 | Microsoft Visual Basic 6.0 for PC

2 Answers

Php counter


You might want to note that this is not the most effective manner of creating a counter in PHP. On a few of my websites, I find it is much more effective to simply create a text file, eg. counter.txt and have PHP read that every time the page is loaded, instead of running a MySQL query. Then, have PHP also update the counter.txt file by adding 1 to the number already listed in the file and read to the user.

Mar 19, 2009 | The PHP Group PHP

2 Answers

MYSQL Access denied


Hi Buddy,

Try this option....

mysql -u root -p

mysql will then ask you for the password give the proper password.

For changing mysql root password

mysqladmin -u root -p password <<newpwd>>

then mysql ask you to give password this is the old password and now the new password for the root will be newankush.

Sep 10, 2008 | Sun MySQL

1 Answer

Steps and definition of ReOrganizing mysql Database


I can't really tell what you mean by "re-organizing" a database. Some things this could include are:

  • Creating new tables
  • Deleting unused tables
  • Changing the structure of the database's tables (adding fields, removing fields, moving fields between tables, etc.)

Aug 28, 2008 | Sun MySQL

4 Answers

Table Repair MySQL


MySQL offers Check Table syntax that checks a table or tables for errors. It works for several storage engines like MyISAM, InnoDB, & Archive. If you run this syntax then you can the cause of problem & reported tables.

If Check Table finds errors then you can repair reported tables by Repair MySQL Table syntax.

Aug 06, 2008 | Sun MySQL

1 Answer

Mysql change colum


Hi

To change the coulmn size, refer the below query:

alter table [table name] modify [column name] VARCHAR(3);

Aug 05, 2008 | Sun MySQL

4 Answers

MySQL Error Messeage


When you install MySQL for the first time, no password is set for root user.
Move to the installation directory of mysql (cd/usr/local/mysql) Set the password for user, using the following command -
./bin/mysqladmin -u <username> password

Enter your password. Then you can connect to the mysql client as
./bin/mysql -u <username> -p <password>

Jul 27, 2008 | Sun MySQL

Not finding what you are looking for?
Sun MySQL Logo

Related Topics:

1,965 people viewed this question

Ask a Question

Usually answered in minutes!

Top Sun Computers & Internet Experts

Brian Sullivan
Brian Sullivan

Level 3 Expert

27725 Answers

Ben Darden
Ben Darden

Level 3 Expert

984 Answers

Mike McWhinney

Level 3 Expert

537 Answers

Are you a Sun Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...