Posted By

surentharp on 06/21/18


Tagged

mysql


Versions (?)

mysql make access global


 / Published in: MySQL
 

This commands are useful in creating a username in mysql and it can be used to access the mysql globally with this username.

  1. mysql> CREATE USER 'monty'@'localhost' IDENTIFIED BY 'some_pass';
  2. mysql> GRANT ALL PRIVILEGES ON *.* TO 'monty'@'localhost'
  3. -> WITH GRANT OPTION;
  4. mysql> CREATE USER 'monty'@'%' IDENTIFIED BY 'some_pass';
  5. mysql> GRANT ALL PRIVILEGES ON *.* TO 'monty'@'%'
  6. -> WITH GRANT OPTION;

Report this snippet  

You need to login to post a comment.