Difference between revisions of "MySQL"

Jump to navigation Jump to search
115 bytes added ,  21:39, 9 March 2010
→‎User Accounts: Added "Change User Password"
(→‎SELECT Rows: Added ORDER BY)
(→‎User Accounts: Added "Change User Password")
Line 27: Line 27:
To display all configured users;
To display all configured users;
<source lang="mysql">
<source lang="mysql">
SELECT CONCAT('SHOW GRANTS FOR \'', user ,'\'@\'', host, '\';') FROM mysql.user  
SELECT CONCAT('SHOW GRANTS FOR \'', user ,'\'@\'', host, '\';') FROM mysql.user;
</source>
</source>
Then use the displayed lines to see the detail of each user
Then use the displayed lines to see the detail of each user
=== Change User Password ===
<source lang="mysql">
SET PASSWORD FOR 'user'@'%' = PASSWORD('newpass');
</source>


== Data Types ==
== Data Types ==

Navigation menu