Fulltext results:
- MySQL: Create User @info:mysql:user
- Create User ====== ==== Create User ==== <code sql> CREATE USER '{user}'@'%' IDENTIFIED BY '{passwd}... ==== * Usually, ''{user}'' == ''{db}'' <code sql> CREATE USER '{user}'@'%' IDENTIFIED BY '{passwd}... {user}'@'%'; </code> Simpler Alternative: <code sql> CREATE DATABASE IF NOT EXISTS `dbname` DEFAULT C... LL ON `dbname`.* TO 'dbuser'@'dbhost' IDENTIFIED BY 'dbpass'; </code> {{tag>admin database mysql sql}}
- MySQL: Remove User @info:mysql:user
- Remove User ====== ==== Remove User ==== <code sql> DROP USER '{user}'@'%'; </code> ==== Remove Use... Database ==== * Usually, {user} == {db} <code sql> DROP USER '{user}'@'%'; DROP DATABASE '{db}'; </code> {{tag>admin database mysql sql}}
- MySQL: Change Password @info:mysql:user
- lace ''{user}'' with the name of the user. <code sql> GRANT USAGE ON *.* TO '{user}'@'%' IDENTIFIED BY... r you can alternatively use the following: <code sql> UPDATE mysql.user SET Password=PASSWORD('{passwd}') WHERE User='{user}'; FLUSH PRIVILEGES; </code> {{tag>admin database mysql password sql}}
- MySQL: Create Database @info:mysql:database
- Database ====== ==== Create Database ==== <code sql> CREATE DATABASE IF NOT EXISTS `{db}`; </code> =... e Database and Grant Rights to a User ==== <code sql> CREATE DATABASE IF NOT EXISTS `{db}`; GRANT ALL PRIVILEGES ON `{db}` . * TO '{user}'@'%'; </code> {{tag>admin database mysql sql}}
- MySQL: Backup @info:mysql:database
- ble -u${USER} -p${PASS} ${DB} > ${DB}_${DATE_YMD}.sql & bzip2 ${DB}_${DATE_YMD}.sql & # sleep 10 # optional done wait # for child processes to end <
- MySQL: Revoke Permissions @info:mysql:permissions
- ssions ====== ==== Revoke Permissions ==== <code sql> REVOKE ALL PRIVILEGES ON `{db}` . * FROM '{user}'@'%'; </code> {{tag>admin database mysql sql}}
- MySQL: Grant Permissions @info:mysql:permissions
- issions ====== ==== Grant Permissions ==== <code sql> GRANT ALL PRIVILEGES ON `{db}` . * TO '{user}'@'%'; </code> {{tag>admin database mysql sql}}
- MySQL: View Permissions @info:mysql:permissions
- missions ====== ==== View Permissions ==== <code sql> SHOW PRIVILEGES; SHOW GRANTS FOR '{user}'@'%'; </code> {{tag>admin database mysql sql}}
- MySQL: Remove Database @info:mysql:database
- Database ====== ==== Remove Database ==== <code sql> DROP DATABASE IF EXISTS `{db}`; </code> {{tag>admin database mysql sql}}