Fulltext results:
- MySQL: Backup @info:mysql:database
- ====== MySQL: Backup ====== ===== Export a Database ===== <code bash> # set or replace the variables... ${USER} -p${PASS} ${DB} </code> ===== Export all Databases individually ===== <code bash> # set or replace the variables $USER and $PASS DATE_YMD=$(date "+%Y-%m-%d") DATABASES=$(mysql --batch -u${USER} -p${PASS} mysql --execute='show databas
- 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>
- MySQL: Create User @info:mysql:user
- FIED BY '{passwd}'; </code> ==== Create User and Database ==== * Usually, ''{user}'' == ''{db}'' ... ES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ; CREATE DATABASE IF NOT EXISTS `{db}`; GRANT ALL PRIVILEGES... </code> Simpler Alternative: <code sql> CREATE DATABASE IF NOT EXISTS `dbname` DEFAULT CHARACTER SE... L 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
- USER '{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
- sql> REVOKE ALL PRIVILEGES ON `{db}` . * FROM '{user}'@'%'; </code> {{tag>admin database mysql sql}}
- MySQL: Grant Permissions @info:mysql:permissions
- ode 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
- ('{passwd}') WHERE User='{user}'; FLUSH PRIVILEGES; </code> {{tag>admin database mysql password sql}}