Can I grant access from any host using '%'?

Question

Grade: Education Subject: Support
Can I grant access from any host using '%'?
Asked by:
43 Viewed 43 Answers

Answer (43)

Best Answer
(332)
Yes, you can grant access from any host using the '%' wildcard. However, this is generally discouraged for security reasons. Use `GRANT ALL PRIVILEGES ON database_name.* TO 'your_user'@'%' IDENTIFIED BY 'your_password';` followed by `FLUSH PRIVILEGES;`. It's much safer to specify the exact host(s) the user needs to connect from.