Adding MySQL User

This one from MySQL Docs;


mysql --user=root mysql -p

Insert your MySQL root password, it will jump you to mysql database (keeping user account information);


mysql> GRANT ALL PRIVILEGES ON *.* TO 'username'@'localhost'
->     IDENTIFIED BY 'some_pass' WITH GRANT OPTION;
mysql> GRANT ALL PRIVILEGES ON *.* TO 'username'@'%'
->     IDENTIFIED BY 'some_pass' WITH GRANT OPTION;

This is when you want the spesific user to have all access to all database from anywhere (username@%)

This entry was posted in Web Database and tagged , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

  • Magnet Hosting, Hosting, VPS dan Server Indonesia
  • Categories

  • Archives