Toolpack migration Windows XP 2-3

From TBwiki
(Difference between revisions)
Jump to: navigation, search

Revision as of 14:42, 19 May 2009

This page shows the Toolpack 2-3 migration guide for Windows XP.


Contents

Toolpack Migration Steps

Create new database user

Connect to MySQL and create a new user tbdb with all privilege.

 mysql -u root
 CREATE USER 'tbdb'@'%' IDENTIFIED BY '[DatabasePassword]';
 GRANT ALL privileges ON *.* TO 'tbdb'@'%' IDENTIFIED BY '[DatabasePassword]';
 exit

Example

 mysql -u root
 CREATE USER 'tbdb'@'%' IDENTIFIED BY 'tbdbpw';
 GRANT ALL privileges ON *.* TO 'tbdb'@'%' IDENTIFIED BY 'tbdbpw';
 exit


Install ODBC MySQL connector

Install MyODBC, it can be download from the following location: http://dev.mysql.com/downloads/connector/odbc/3.51.html


Enable MySQL database replication

Enable binlog

Binlog file is required for a master to log every statements done on databases and for slaves to be able to read it.

Manually

  • Go to your MySQL server directory
  • Edit the configuration file (usually my.ini)
  • Add the variable log-bin. If you want to specify a filename you have to add =filename. Otherwise it will create the file with the default name

Using MySQL Administrator tool

  • Open the MySQL Administrator tool and login
  • Go to Startup variables and Log files tab
  • Activate Binary Logfile name. If you don't specify a filename, it will create the file with the default name


Set server id

Each MySQL server must have unique server id to be able to communicate. If a slave server has the same server id of a master, replication won't work.

Manually

  • Go to your MySQL server directory
  • Edit the configuration file (usually my.ini)
  • Add the variable server-id= and specify a unique id for it (except 0)

Using MySQL Administrator tool

  • Open the MySQL Administrator tool and login
  • Go to Startup variables and Replication tab
  • Activate Server Id and specify a unique id for it (except 0)


Replicate specific databases

You can configure the replication of one or more specific databases instead of all by default. You can do it on master server side or slave server side.

Master server side

  • Go to your MySQL server directory
  • Edit the configuration file (usually my.ini)
  • If you want to specify databases to be logged
    • Add the variable --binlog-do-db=db_name. The value of db_name is the name of the database you want to be logged in the binlog. You can add as many databases as you want by adding the same variable with a different database name.
  • If you want to specify databases that won't be logged
    • Add the variable --binlog-ignore-db=db_name. The value of db_name is the name of the database you don't want to be logged in the binlog. You can add as many databases as you want by adding the same variable with a different database name.

Slave server side

  • Go to your MySQL server directory
  • Edit the configuration file (usually my.ini)
  • If you want to specify databases to replicate
    • Add the variable --replicate-do-db=db_name. The value of db_name is the name of the database you want to be replicated. You can add as many databases as you want by adding the same variable with a different database name.
  • If you want to specify databases that won't be replicated
    • Add the variable --replicate-ignore-db=db_name. The value of db_name is the name of the database you don't want to be replicated. You can add as many databases as you want by adding the same variable with a different database name.


Toolpack System installation

Now that the prerequisite are installed, we can go back to the migration guide Toolpack migration 2-3.

Personal tools