I want to backup all databases, users and etc on our mysql sever.
I have come across the command
mysqldump and believe I can use it like this? (Trying to backup a REMOTE server to our LOCAL machine)
mysqldump -h web-server.com -u root -p root --all-databases > "/backups/mysql/`date +%Y%m%d`.sql"
I'm scared to run this with little knowledge of whats happening (we have a lot of data on the mysql database and we can't afford to lose it!). So first question is: Will this do what I want? Log into the remote server (located at
web-server.comfor example) and backup all the mysql databases to the path
/backups/mysqlon the LOCAL machine?
I'm not convinced that this will also keep all the user information for each database in tact in the event of a mysql server failure. Is user information just stored as another database in the mysql databases? Or is it a function of the server itself? In this case is there a different way I can backup the database to include the user data too?