Difference between revisions of "MySQL"

Jump to navigation Jump to search
513 bytes added ,  13:05, 21 December 2010
→‎User Accounts: Added "Delete Users"
(Added "Migrate Databases")
(→‎User Accounts: Added "Delete Users")
Line 23: Line 23:
To give full privileges to a user coming from any location use;
To give full privileges 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;
<source lang="mysql"> GRANT USAGE on <database>.* to '<user>'@'<host>' identified by '<password>' with grant option; </source>
=== Delete Users ===
To remove an existing user use the following...
<source lang="mysql"> DROP USER '<user>'@'<host>'; </source>
* You need to specify the full <code>user@host</code> entry (or MySQL assumes the wild-card host <code>%</code>)
* Existing users sessions are not dropped, but will be unable to re-establish


=== Display Users ===
=== Display Users ===

Navigation menu