Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
mysql [2019/03/09 10:08] – [Get all attributes of a user] admin | mysql [2019/03/28 13:50] (current) – [Manually create a backup] dani | ||
---|---|---|---|
Line 8: | Line 8: | ||
- Get the user and password to access the MySQL database. This is usually the user '' | - Get the user and password to access the MySQL database. This is usually the user '' | ||
- | - Check for the database data directory: | + | - Check for the database data directory:<code bash>mysql -e "show variables;" |
- | - Check, if the binlog option is enabled: | + | - Check, if the binlog option is enabled:<code bash>ls $(mysql -e "show variables;" |
- | - Amount of data: '' | + | - Amount of data:<code bash>du -sh $(mysql -e "show variables;" |
- | - Socket: | + | - Socket:<code bash>mysql -e "show variables;" |
- | - Network port: '' | + | - Network port:<code bash>mysql -e "show variables;" |
==== Setup automysqlbackup configuration file ==== | ==== Setup automysqlbackup configuration file ==== | ||
Now, you are ready to edit the configuration file of automysqlbackup: | Now, you are ready to edit the configuration file of automysqlbackup: | ||
- | - Add user: '' | + | - Add user: '' |
- | - Add user’s password: '' | + | - Add user’s password: '' |
- | - Add the backup directory (usually a separate filesystem: '' | + | - Add the backup directory (usually a separate filesystem: '' |
- | - Add the pre backup script, if needed: '' | + | - Add the pre backup script, if needed: '' |
- | - Add the post backup script, if needed: '' | + | - Add the post backup script, if needed: '' |
The configuration file is expected here: ''/ | The configuration file is expected here: ''/ | ||
Line 42: | Line 42: | ||
gzip -cd daily_< | gzip -cd daily_< | ||
</ | </ | ||
+ | |||
+ | ===== Manually create a backup ===== | ||
+ | In case, you have to create a backup manually (without automysqlbackup script), you can do it like this: | ||
+ | |||
+ | * Using '' | ||
+ | mysqldump --all-databases -q | gzip -c > mysql-20100212.sql.gz | ||
+ | </ | ||
+ | * Using '' | ||
+ | mysqldump --all-databases -q | bzip2 -c > mysql-20100212.sql.bz2 | ||
+ | </ | ||
+ | |||
+ | |||
===== Update a user password ===== | ===== Update a user password ===== | ||
In this example, the password for the MySQL user root will be updated for following hosts: '':: | In this example, the password for the MySQL user root will be updated for following hosts: '':: | ||
Line 114: | Line 126: | ||
<WRAP center round tip 60%> | <WRAP center round tip 60%> | ||
- | If you want to get attributes for all hosts, just remove the '' | + | If you want to get attributes for all hosts, just remove the '' |
</ | </ | ||