Granting Privileges to users

After creating user. Privileges are granter to user to access specific database or to access all databases in mysql
GRANT ALL will give all privileges to user
To Grant All privileges to user following query is used

To provide all privileges on specific database following query is used

To provide all privileges on specific tabel following query is used

Read More

  1. Setting innodb_lock_wait_timeout
  2. Set time zone in mysql
  3. Show engine innodb status
  4. Finding all column name of table

creating a new user in mysql

Here we are creating user with name manish and password for manish is password;

Creating a user and force user to change password at first login for that PASSWORD EXPIRE is used.

Creating a user and expiring the password after 180 days, PASSWORD EXPIRE INTERVAL 180 DAY is used

Creating a user and never expire the password, PASSWORD EXPIRE NEVER is used

Creating a user and expire the password as defined in system variable default_password_lifetime
to use this PASSWORD EXPIRE DEFAULT is used