• GNU/Linux.ro
  • 1 year ago

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  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’;