Toolpack migration CentOS5 2-3: Difference between revisions
| (7 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
This page shows the Toolpack 2-3 | This page shows the Toolpack 2-3 migration guide for CentOS 5. | ||
== Toolpack | == Toolpack Migration Steps == | ||
=== | === Create new database user === | ||
Connect to MySQL and create a new user tbdb with all privilege. | |||
If you are unable to connect, use an IP Address instead of the ''[HostName]''. | |||
mysql -u root -h '[HostName]' | |||
CREATE USER 'tbdb'@'%' IDENTIFIED BY '[DatabasePassword]'; | |||
GRANT ALL privileges ON *.* TO 'tbdb'@'%' IDENTIFIED BY '[DatabasePassword]'; | |||
CREATE USER ' | |||
GRANT ALL | |||
exit | exit | ||
Example | |||
mysql -u root -h centos64-02 | |||
mysql -u root - | |||
CREATE USER 'tbdb'@'%' IDENTIFIED BY 'tbdbpw'; | CREATE USER 'tbdb'@'%' IDENTIFIED BY 'tbdbpw'; | ||
GRANT ALL | GRANT ALL privileges ON *.* TO 'tbdb'@'%' IDENTIFIED BY 'tbdbpw'; | ||
exit | exit | ||
=== Install ODBC MySQL connector === | |||
yum install mysql-connector-odbc | yum install mysql-connector-odbc | ||
For 32 bits sytem: | |||
wget http://download.distribution.telcobridges.com/3rdparty/prerequisite/bin/linux/mysql-connector-odbc-3.51.27-linux-x86-32bit.tar.gz | wget http://download.distribution.telcobridges.com/3rdparty/prerequisite/bin/linux/mysql-connector-odbc-3.51.27-linux-x86-32bit.tar.gz | ||
| Line 82: | Line 33: | ||
cp mysql-connector-odbc-3.51.27-linux-x86-32bit/lib/libmyodbc3_r-3.51.27.so /lib/tb/toolpack/3rdparty/odbc-connector/ | cp mysql-connector-odbc-3.51.27-linux-x86-32bit/lib/libmyodbc3_r-3.51.27.so /lib/tb/toolpack/3rdparty/odbc-connector/ | ||
For 64 bits sytem: | |||
wget http://download.distribution.telcobridges.com/3rdparty/prerequisite/bin/linux/mysql-connector-odbc-3.51.27-linux-x86-64bit.tar.gz | wget http://download.distribution.telcobridges.com/3rdparty/prerequisite/bin/linux/mysql-connector-odbc-3.51.27-linux-x86-64bit.tar.gz | ||
| Line 90: | Line 41: | ||
=== Configure ODBC driver manager === | |||
*Enable the MySQL driver is enable (remove the comments for the MySQL driver). '''***WARNING: There must be no space at the beginning of the line''' | |||
*Set the Driver to /lib/tb/toolpack/3rdparty/odbc-connector/ | |||
vim /etc/odbcinst.ini | vim /etc/odbcinst.ini | ||
| Line 98: | Line 52: | ||
# Driver from the MyODBC package | # Driver from the MyODBC package | ||
# Setup from the unixODBC package | # Setup from the unixODBC package | ||
[MySQL] | [MySQL] <----- This line must NOT start with a '#'. Must also not start with a space. | ||
Description = ODBC for MySQL | Description = ODBC for MySQL | ||
Driver = /lib/tb/toolpack/3rdparty/odbc-connector/libmyodbc3_r-3.51.27.so | Driver = /lib/tb/toolpack/3rdparty/odbc-connector/libmyodbc3_r-3.51.27.so | ||
| Line 104: | Line 58: | ||
FileUsage = 1 | FileUsage = 1 | ||
=== Enable MySQL database replication === | |||
Configure the MySQL configuration file | |||
vim /etc/my.cnf | |||
Add 2 lines in the configuration file: | |||
*log-bin | |||
*server-id | |||
server-id value needs to be a non-zero value and unique on each host if database redundancy is used. | |||
Make sure it is under the [mysqld] section | |||
Make sure it is | |||
log-bin | log-bin | ||
server-id= | server-id=[UniqueId] | ||
| Line 141: | Line 94: | ||
=== Restart MySQL service === | |||
=== | |||
service mysqld restart | |||
=== | === Disable Release 2-2 Service === | ||
tbtoolpack disable 2.2 | |||
Latest revision as of 14:17, 21 June 2010
This page shows the Toolpack 2-3 migration guide for CentOS 5.
Toolpack Migration Steps
Create new database user
Connect to MySQL and create a new user tbdb with all privilege. If you are unable to connect, use an IP Address instead of the [HostName].
mysql -u root -h '[HostName]' CREATE USER 'tbdb'@'%' IDENTIFIED BY '[DatabasePassword]'; GRANT ALL privileges ON *.* TO 'tbdb'@'%' IDENTIFIED BY '[DatabasePassword]'; exit
Example
mysql -u root -h centos64-02 CREATE USER 'tbdb'@'%' IDENTIFIED BY 'tbdbpw'; GRANT ALL privileges ON *.* TO 'tbdb'@'%' IDENTIFIED BY 'tbdbpw'; exit
Install ODBC MySQL connector
yum install mysql-connector-odbc
For 32 bits sytem:
wget http://download.distribution.telcobridges.com/3rdparty/prerequisite/bin/linux/mysql-connector-odbc-3.51.27-linux-x86-32bit.tar.gz tar -zxf mysql-connector-odbc-3.51.27-linux-x86-32bit.tar.gz mkdir -p /lib/tb/toolpack/3rdparty/odbc-connector/ cp mysql-connector-odbc-3.51.27-linux-x86-32bit/lib/libmyodbc3_r-3.51.27.so /lib/tb/toolpack/3rdparty/odbc-connector/
For 64 bits sytem:
wget http://download.distribution.telcobridges.com/3rdparty/prerequisite/bin/linux/mysql-connector-odbc-3.51.27-linux-x86-64bit.tar.gz tar -zxf mysql-connector-odbc-3.51.27-linux-x86-64bit.tar.gz mkdir -p /lib/tb/toolpack/3rdparty/odbc-connector/ cp mysql-connector-odbc-3.51.27-linux-x86-64bit/lib/libmyodbc3_r-3.51.27.so /lib/tb/toolpack/3rdparty/odbc-connector/
Configure ODBC driver manager
- Enable the MySQL driver is enable (remove the comments for the MySQL driver). ***WARNING: There must be no space at the beginning of the line
- Set the Driver to /lib/tb/toolpack/3rdparty/odbc-connector/
vim /etc/odbcinst.ini
Here is an example:
# Driver from the MyODBC package # Setup from the unixODBC package [MySQL] <----- This line must NOT start with a '#'. Must also not start with a space. Description = ODBC for MySQL Driver = /lib/tb/toolpack/3rdparty/odbc-connector/libmyodbc3_r-3.51.27.so Setup = /usr/lib/libodbcmyS.so FileUsage = 1
Enable MySQL database replication
Configure the MySQL configuration file
vim /etc/my.cnf
Add 2 lines in the configuration file:
- log-bin
- server-id
server-id value needs to be a non-zero value and unique on each host if database redundancy is used.
Make sure it is under the [mysqld] section
log-bin server-id=[UniqueId]
Example:
[root@TL-CENTOS64-02 tblab]# cat /etc/my.cnf [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock user=mysql log-bin server-id=1 # Default to using old password format for compatibility with mysql 3.x # clients (those using the mysqlclient10 compatibility package). old_passwords=1 [mysqld_safe] log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid [root@TL-CENTOS64-02 tblab]#
Restart MySQL service
service mysqld restart
Disable Release 2-2 Service
tbtoolpack disable 2.2
Toolpack System installation
Now that the prerequisite are installed, we can go back to the migration guide Toolpack migration 2-3.