Fulltext results:
- MySQL: Backup @info:mysql:database
- ====== MySQL: Backup ====== ===== Export a Database ===== <code bash> # set or replace the variables $USER, $PASS and $DB mysqldump --add-drop-table -u${USER} -p${PASS} ${DB} </code> ===== Export all Databases individually ===== <code bash> # set or repl... es $USER and $PASS DATE_YMD=$(date "+%Y-%m-%d") DATABASES=$(mysql --batch -u${USER} -p${PASS} mysql --e
- MySQL: Create Database @info:mysql:database
- ====== MySQL: Create Database ====== ==== Create Database ==== <code sql> CREATE DATABASE IF NOT EXISTS `{db}`; </code> ==== Create Database and Grant Rights to a User ==== <code sql> CRE
- MySQL: Create User @info:mysql:user
- ED BY '{passwd}'; </code> ==== Create User and Database ==== * Usually, ''{user}'' == ''{db}'' <co... _PER_HOUR 0 MAX_USER_CONNECTIONS 0 ; CREATE DATABASE IF NOT EXISTS `{db}`; GRANT ALL PRIVILEGES ON... /code> Simpler Alternative: <code sql> CREATE DATABASE IF NOT EXISTS `dbname` DEFAULT CHARACTER SET =... LL ON `dbname`.* TO 'dbuser'@'dbhost' IDENTIFIED BY 'dbpass'; </code> {{tag>admin database mysql sql}}
- MySQL: Remove Database @info:mysql:database
- ====== MySQL: Remove Database ====== ==== Remove Database ==== <code sql> DROP DATABASE IF EXISTS `{db}`; </code> {{tag>admin database mysql sql}}
- MySQL: Remove User @info:mysql:user
- SER '{user}'@'%'; </code> ==== Remove User and Database ==== * Usually, {user} == {db} <code sql> DROP USER '{user}'@'%'; DROP DATABASE '{db}'; </code> {{tag>admin database mysql sql}}
- Database Administration @info:mysql:database
- ====== Database Administration ====== {{indexmenu>.}}
- MySQL: Revoke Permissions @info:mysql:permissions
- e sql> REVOKE ALL PRIVILEGES ON `{db}` . * FROM '{user}'@'%'; </code> {{tag>admin database mysql sql}}
- MySQL: Grant Permissions @info:mysql:permissions
- code sql> GRANT ALL PRIVILEGES ON `{db}` . * TO '{user}'@'%'; </code> {{tag>admin database mysql sql}}
- MySQL: View Permissions @info:mysql:permissions
- === <code sql> SHOW PRIVILEGES; SHOW GRANTS FOR '{user}'@'%'; </code> {{tag>admin database mysql sql}}
- MySQL: Change Password @info:mysql:user
- D('{passwd}') WHERE User='{user}'; FLUSH PRIVILEGES; </code> {{tag>admin database mysql password sql}}