Toolpack migration Solaris10 Intel 2-3

From TBwiki
Revision as of 14:59, 19 May 2009 by 10.0.0.157 (Talk)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This page shows the Toolpack 2-3 migration guide for Solaris 10.


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

 wget http://www.unixodbc.org/pub/unixODBC/binaries/unixODBC-2.2.14-i386.pkg.gz
 gunzip unixODBC-2.2.14-i386.pkg.gz
 sudo pkgadd -d unixODBC-2.2.14-i386.pkg
 wget http://dev.mysql.com/get/Downloads/Connector-ODBC/3.51/mysql-connector-odbc-3.51.27-solaris10-x86-32bit.tar.gz/from/http://mysql.serenitynet.com/
 gunzip -c mysql-connector-odbc-3.51.27-solaris10-x86-32bit.tar.gz | tar xvf -
 cp mysql-connector-odbc-3.51.27-solaris10-x86-32bit/lib/* /usr/lib
 crle -l /lib:/usr/lib:/usr/local/lib


Configure ODBC driver manager

  • Enable the MySQL driver is enable (remove the comments for the MySQL driver).
  • Set the Driver to /usr/lib/libmyodbc3_r.so
 vim /etc/odbcinst.ini 

Here is an example:

 # Driver from the MyODBC package
 # Setup from the unixODBC package
 [MySQL]
 Description     = ODBC for MySQL
 Driver          = /usr/lib/libmyodbc3_r.so
 Setup           = /usr/lib/libodbcmyS.so
 FileUsage       = 1


Enable MySQL database replication

Configure the MySQL configuration file

 vim /etc/my.cnf

If the file is empty, copy from default file

 cp /usr/local/mysql/share/mysql/my-medium.cnf /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:

 # The MySQL server
 [mysqld]
 port            = 3306
 socket          = /tmp/mysql.sock
 skip-locking
 key_buffer = 16M
 max_allowed_packet = 1M
 table_cache = 64
 sort_buffer_size = 512K
 net_buffer_length = 8K
 read_buffer_size = 256K
 read_rnd_buffer_size = 512K
 myisam_sort_buffer_size = 8M
 
 # Don't listen on a TCP/IP port at all. This can be a security enhancement,
 # if all processes that need to connect to mysqld run on the same host.
 # All interaction with mysqld must be made via Unix sockets or named pipes.
 # Note that using this option without enabling named pipes on Windows
 # (via the "enable-named-pipe" option) will render mysqld useless!
 #
 #skip-networking
 
 # Disable Federated by default
 skip-federated
 
 # Replication Master Server (default)
 # binary logging is required for replication
 log-bin=mysql-bin
 
 # required unique id between 1 and 2^32 - 1
 # defaults to 1 if master-host is not set
 # but will not function as a master if omitted
 server-id       = 1


Toolpack System installation

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

Personal tools