Question & Answer
Question
How do I install the mysql client libraries?
Answer
If you need to transfer data between an IBM Netezza system and a MySQL database, you will need to install the MySQL client libraries on the IBM Netezza server. This document describes installation and configuration of the MySQL client libraries on an IBM Netezza 1000 (formerly TwinFin) system.
Note: IBM Netezza Support has done a limited amount of testing to prove that the configuration works. No performance degradations have been found. However, the configuration has not been subjected to the quality assurance testing cycle.
1. On the IBM Netezza server, install the client libraries:
rpm -ivh MySQL-client-community-5.1.51-1.rhel5.x86_64.rpm
2. On your MySQL server, allow access from the IBM Netezza server by editing the my.cnf file:
sudo vi /etc/mysql/my.cnf
3. Update the [mysqld] section to the server's IP address (as opposed to the 127.0.0.1 default address):
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure. bind-address = 172.16.1.1
4. Restart the MySQL server:
sudo /etc/init.d/mysql restart
5. Log into the MySQL console and grant permissions on a database:
mysql -u root -p mysql
update db set Host='172.16.1.1' where db='my_mysql_database';
update user set Host='172.16.1.1' where user='test_user';
6. Now we can show that the libraries can be used. Log in to your IBM Netezza appliance as the 'nz' user:
[nz@nps-ha1 ~]$ nzsql Welcome to nzsql, the Netezza SQL interactive terminal. Type: \h for help with SQL commands \? for help on internal slash commands \g or terminate with semicolon to execute query \q to quit SYSTEM(ADMIN)=> \q
]
7. You can quit out of the nzsql prompt because you know that it still works.
8. Let's see if we can connect to the remote mysql server following our changes:
[
[nz@nps-ha1 ~]$ /usr/bin/mysql -h 172.16.1.1 -u test_user-D my_mysql_database -p
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 65
Server version: 5.0.75-0ubuntu10.5 (Ubuntu)
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to modify and redistribute it under the GPL v2 license
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
The output shows that the MySQL client is loaded and can connect to the remote MySQL server. Using this as a starting point, you may want to modify permissions or other settings.
Historical Number
NZ453354
Was this topic helpful?
Document Information
More support for:
IBM PureData System
Software version:
1.0.0
Document number:
461293
Modified date:
17 October 2019
UID
swg21568899