Basic MySql Tips

1. How to set password for root account in MySQL Server??
#mysqladmin -u root password your-new-password
#/etc/init.d/mysqld restart
2. How to add a new user account in MySQL Server??
From mysql frompt
CREATE USER <username> IDENTIFIED BY PASSWORD ‘password’;
3. How to add privilleges to newly created user??
//To grant specified privileges
GRANT SELECT,INSERT,UPDATE ON db_name.* TO ‘username’@'localhost’;
//To grant all privileges
GRANT ALL ON db_name.* TO ‘username’@'localhost’;

VN:F [1.9.17_1161]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.17_1161]
Rating: 0 (from 0 votes)

Related Posts

  • No Related Post
Related Posts with Thumbnails

About the Author

Sudheesh MP

has written 15 stories on this site.

Linux administrator(RHCE), Lynuxstuff.com(Founder)

Write a Comment

Copyright © 2012 CoreTimer.com|System Admin’s Reference. All rights reserved.

Switch to our mobile site