HP OSMS Blueprint: Database Server on HP Server Platforms with MySQL and RHEL5
Restoring Data
Restore the data file and binary log files to both the master server and slave server. All database
data is recreated using the extracted data file and the binary log files.
1. Stop the replication between master server and slave servers. See “Configuring MySQL
Server Replication” (page 16) for instructions.
2. Restore the latest database data file and binary log files to both master server and slave
server using Data Protector.
Figure 10 Restore Files
3. Using the backup data file, reconstruct all database data on the master server and slave
server to the point in time when the binary log flush occurred by entering the following
command:
# mysql -uosmusr -posmpass osmsdb < /tmp/customer.sql
4. Replay the binary log files on the master server and slave server by entering the following
command:
# mysqlbinlog mysql-bin.000002|mysql -uosmusr -posmpass
5. On the slave server, restore the files master.info and relay-log.info so they are
consistent with the binary log files that have been restored on the master server.
6. Restart the replication.
Connecting External Systems to the MySQL Database
Connectors are small-footprint software drivers that are integrated into a developer's application
and allow that application to connect to a MySQL database using the appropriate Application
Programming Interface (API) conventions. These connectors are not standalone applications
themselves. They are native language libraries for the desired programming language.
Connectors Included and Excluded from the Stack
MySQL provides a native C API library, called libmysqlclient, with each version of MySQL.
This library is the basis for most higher-level APIs, except for the JDBC and .NET connectors.
32