Mysql Grant Permission for Remote Access

Feb 24, 2021

Grant access to

  • all privileges
  • all tables
  • user from any ip
GRANT ALL PRIVILEGES ON *.* TO 'user'@'%' IDENTIFIED BY 'password';

NOTE: Becareful as this is a huge security risk

Grant access to

  • all privileges
  • particular table
  • user from particular ip
GRANT ALL PRIVILEGES ON table.* TO 'user'@'8.8.8.8' IDENTIFIED BY 'password';

Grant access to

  • certain privileges
  • particular table
  • user from particular ip
GRANT SELECT,INSERT,UPDATE,DELETE ON table.* TO 'user'@'8.8.8.8' IDENTIFIED BY 'password';

❤️ Is this article helpful?

Buy me a coffee ☕ or support my work via PayPal to keep this space 🖖 and ad-free.

Do send some 💖 to @d_luaz or share this article.

✨ By Desmond Lua

A dream boy who enjoys making apps, travelling and making youtube videos. Follow me on @d_luaz

👶 Apps I built

Travelopy - discover travel places in Malaysia, Singapore, Taiwan, Japan.