2,187
edits
(→Maintenance: Added "Shrink MyISAM Table") |
m (→Create Users and Grant/Revoke Privileges: Added FLUSH PRIVILEGES) |
||
Line 22: | Line 22: | ||
== User Accounts == | == User Accounts == | ||
=== Create Users and Grant/Revoke Privileges === | === Create Users and Grant/Revoke Privileges === | ||
After making any changes to user privilages, you need to flush them to ensure they're applied... | |||
<source lang="mysql"> FLUSH PRIVILEGES; </source> | |||
To give full privileges (including the ability to alter user accounts) to a new user coming from any location use; | To give full privileges (including the ability to alter user accounts) to a new user coming from any location use; | ||
<source lang="mysql"> GRANT ALL PRIVILEGES on <database>.* to '<user>'@'%' identified by '<password>' | <source lang="mysql"> GRANT ALL PRIVILEGES on <database>.* to '<user>'@'%' identified by '<password>' WITH GRANT OPTION; </source> | ||
To give no privileges to a new user coming from a specific host; | To give no privileges to a new user coming from a specific host; |