Difference between revisions of "MySQL"

Jump to navigation Jump to search
27 bytes added ,  13:13, 19 April 2012
→‎Create Users: Corrected GRANT USAGE
m (→‎Migrate Databases: Minor update - note on running on Windows)
(→‎Create Users: Corrected GRANT USAGE)
Line 22: Line 22:
== User Accounts ==
== User Accounts ==
=== Create Users ===
=== Create Users ===
To give full privileges to a user coming from any location use;
To give full privileges (including the ability to alter user accounts) to a user coming from any location use;
<source lang="mysql"> GRANT ALL PRIVILEGES on <database>.* to '<user>'@'%' identified by '<password>' with grant option; </source>
<source lang="mysql"> GRANT ALL PRIVILEGES on <database>.* to '<user>'@'%' identified by '<password>' with grant option; </source>


To give user privileges to a user coming from a specific host;
To give no privileges to a user coming from a specific host;
<source lang="mysql"> GRANT USAGE on <database>.* to '<user>'@'<host>' identified by '<password>' with grant option; </source>
<source lang="mysql"> GRANT USAGE on <database>.* to '<user>'@'<host>' identified by '<password>'; </source>


To give a user read-only access;
To give a user read-only access;

Navigation menu