Newest Downloads

Mar.18

  [zenoss@zenoss2 ~]$ python Zenoss_Template_Manager.py -husage: Examples: python Zenoss_Templa...

How to add users and their permissions in MySQL
Database HowTo's - MySQL HowTo's
Written by Allen Sanabria   
Sunday, 10 February 2008 00:11

Mysql user howto, All these commands were tested on MySQL5

  1. How to add a user.
    • I am using the user test as a example as well as the host localhost as an example...
      "CREATE USER 'test'@'localhost' IDENTIFIED BY 'passwd';"
  2. How to change a users password
    • "SET PASSWORD FOR 'test'@'localhost' = PASSWORD('passwd');"
  3. How to delete a user
    • "DROP USER 'test'@'localhost';"
  4. How to rename a users account
    • "RENAME USER 'test'@'localhost' TO 'test1'@'localhost';"
  5. How to grant different permissions to users
    • This statement give the SELECT(query) access to the user test on all databases on localhost...
      "GRANT SELECT on *.* TO 'test'@'localhost' IDENTIFIED BY 'passwd';"
    • This statement gives the test user super user privileges on all databases on localhost to user test....
      "GRANT ALL PRIVILEGES on *.* TO 'test'@'localhost' IDENTIFIED BY 'passwd';"


Add this page to your favorite Social Bookmarking websites
Reddit! Del.icio.us! Mixx! Free and Open Source Software News Google! Live! Facebook! StumbleUpon! Yahoo! Free Joomla PHP extensions, software, information and tutorials.
Comments
Search RSS
Only registered users can write comments!

3.22 Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved."

Last Updated on Wednesday, 14 May 2008 11:49