Solution to Activity 15.2
Perform the following steps to achieve the goal of this activity:
- Open the MySQL client and write the following command to ensure that you have a clean start position. This is not a required step, but it does make it easier to follow along:
RESET MASTER;
This removes all the existing binlog
files and starts from a freshly created binlog
.
- Open Command Prompt.
- Locate and execute the
mysqldump.exe
file. - Create a backup of the
world
schema by writing the following code in Command Prompt:mysqldump --master-data=2 -u root -p world > "C:\Users\bhaveshb\Desktop\backup_world_pitr.sql"
Here, you specified --master-data=2
to record the binlog
position of the backup.
- Switch back to the MySQL client and make some changes in the
city
table of theworld
database:USE world UPDATE city SET Population=123456789 WHERE name = 'Toulouse';
The value here is something you can easily recognize after restoring...