Trying to connect MYSQL server from HP-UX

Hi everyone,
I have an urgent requirement to get some table data from Linux-MYSQL server from HP-UX with oracle database.Is there any way we can get
connected through Shell script from HP-UX and issue select on mysql to get some table data?
Please help me out.

How is the Oracle database relevant to the problem here ?

Yes, there is. If everything is configured correctly, then you'd connect to MySQL thusly:

mysql -h hostname -u username -ppassword

Note that there's no blank space between "-p" and password.

Alternatively, if you have Perl installed, you may want to use Perl DBI.

tyler_durden

I would appreciate if any one could elaborate on this.
I am trying to connect two heterogeneous databases which are on same network.What basic configurations I have to check for this.
mysql -h hostname -u username -ppassword works fine on same linux machine but I am trying to connect
Mysql (on linux) from Oracle(HP-UX).
1.connect mysql and get table data into flat file.
2.load this data into oracle table using sqlldr

I am just trying to write a shell script from HP-UX to achive this and would like to know how I can configure environment variables for MYSQL to get connected from HP-UX machine.

You probably are connecting not from Oracle, but from the shell of that HP-UX box. You will need the mysql client installed in that box.

tyler_durden

Yes I am trying to connect from HP-UX shell..

You must edit the permissions of your MySQL database on your Linux box to permit a query from your HP-UX box.

So first, before going any further, you must check your MySQL database and see what are the permissions granted.

I recommend you create a specific user on your MySQL database and only give that user permissions to access from the HP-UX IP address.

That is the first step. When you are sure you have a user with correct permissions from a remote IP address, then you can proceed with your query.

durden_tyler is right : you must have a mysql client installed on your HP-UX scripting machine. If not, you've got a problem. And nothing has to be configured on your linux (MySQL) box, except the point of Neo.

Thank you I will try to follow the points mentioned and come back if any issues.