Toolpack migration Solaris10 Intel 2-3
m (Toolpack migration solaris10 intel 2-3 moved to Toolpack migration Solaris10 Intel 2-3: move to correct cases) |
(→Configure ODBC driver manager) |
||
(3 intermediate revisions by one user not shown) | |||
Line 8: | Line 8: | ||
Connect to MySQL and create a new user tbdb with all privilege. | 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 | + | mysql -u root -h '[HostName]' |
CREATE USER 'tbdb'@'%' IDENTIFIED BY '[DatabasePassword]'; | CREATE USER 'tbdb'@'%' IDENTIFIED BY '[DatabasePassword]'; | ||
GRANT ALL privileges ON *.* TO 'tbdb'@'%' IDENTIFIED BY '[DatabasePassword]'; | GRANT ALL privileges ON *.* TO 'tbdb'@'%' IDENTIFIED BY '[DatabasePassword]'; | ||
Line 15: | Line 16: | ||
Example | Example | ||
− | mysql -u root | + | mysql -u root -h sol10i32-01 |
CREATE USER 'tbdb'@'%' IDENTIFIED BY 'tbdbpw'; | CREATE USER 'tbdb'@'%' IDENTIFIED BY 'tbdbpw'; | ||
GRANT ALL privileges ON *.* TO 'tbdb'@'%' IDENTIFIED BY 'tbdbpw'; | GRANT ALL privileges ON *.* TO 'tbdb'@'%' IDENTIFIED BY 'tbdbpw'; | ||
Line 66: | Line 67: | ||
=== Configure ODBC driver manager === | === Configure ODBC driver manager === | ||
− | *Enable the MySQL driver is enable (remove the comments for the MySQL driver). | + | *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 /usr/lib/libmyodbc3_r.so | *Set the Driver to /usr/lib/libmyodbc3_r.so | ||
Line 75: | Line 76: | ||
# 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 = /usr/lib/libmyodbc3_r.so | Driver = /usr/lib/libmyodbc3_r.so | ||
Setup = /usr/lib/libodbcmyS.so | Setup = /usr/lib/libodbcmyS.so | ||
FileUsage = 1 | FileUsage = 1 | ||
− | |||
=== Enable MySQL database replication === | === Enable MySQL database replication === | ||
Line 140: | Line 140: | ||
server-id = 1 | server-id = 1 | ||
+ | |||
+ | === Restart MySQL service === | ||
+ | |||
+ | /etc/rc2.d/S98mysql stop | ||
+ | /etc/rc2.d/S98mysql start | ||
+ | |||
+ | |||
+ | === Disable Release 2-2 Service === | ||
+ | |||
+ | tbtoolpack disable 2.2 | ||
Latest revision as of 13:21, 21 June 2010
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. 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]';
Example
mysql -u root -h sol10i32-01 CREATE USER 'tbdb'@'%' IDENTIFIED BY 'tbdbpw'; GRANT ALL privileges ON *.* TO 'tbdb'@'%' IDENTIFIED BY 'tbdbpw';
Print the list of user
select * from mysql.user;
Remove all the 'empty' users:
In the following example you should remove the 4th and 5th user.
mysql> select * from mysql.user; +----------------+------+------------------+-------------+-------------+ | Host | User | Password | Select_priv | Insert_priv | +----------------+------+------------------+-------------+-------------+ | localhost | root | 68d4f47c49a579c9 | Y | Y | | tl-sol10i32-01 | root | | Y | Y | | 127.0.0.1 | root | | Y | Y | | localhost | | | N | N | | tl-sol10i32-01 | | | N | N | | % | tbdb | 68d4f47c49a579c9 | Y | Y | +----------------+------+------------------+-------------+-------------+ 6 rows in set (0.00 sec)
Delete command:
DELETE FROM mysql.user where user='tobedeleted'; exit
ex.
DELETE FROM mysql.user where user=''; 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). ***WARNING: There must be no space at the beginning of the line
- 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] <----- This line must NOT start with a '#'. Must also not start with a space. 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
Restart MySQL service
/etc/rc2.d/S98mysql stop /etc/rc2.d/S98mysql start
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.