Home Tutorial Php Sql MySql Alter User

 
 

Share on Google+Share on Google+
MySql Alter User
Posted on: December 9, 2010 at 12:00 AM
Advertisement
This example illustrates how to alter user table.

MySql Alter User

This example illustrates how to alter user table.

In this example we alter user table in which add a column by query "ALTER TABLE user ADD COLUMN userid INT". In the first table we can see there is only three column but after the alteration in the next table we can see there is four column.

Query

CREATE USER 'user'@'localhost' IDENTIFIED BY '1234556978';
Query
GRANT SELECT,INSERT,UPDATE,DELETE ON *.* TO 'user'@'localhost';
Query
show grants for user@localhost;

Output

+---------------------------------------------------------------------------------------------------------------------
-----------------+
| Grants for user@localhost
                 |
+---------------------------------------------------------------------------------------------------------------------
-----------------+
| GRANT SELECT, INSERT, UPDATE, DELETE ON *.* TO 'user'@'localhost' IDENTIFIED BY PASSWORD '*C59B95112565D0CB68F9AAB8E
48ABA4790367F48' |
+---------------------------------------------------------------------------------------------------------------------
-----------------+
Advertisement

Related Tags for MySql Alter User:


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: December 9, 2010

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com