Sponsored Content
Full Discussion: Adding DSN for MySql
Top Forums Shell Programming and Scripting Adding DSN for MySql Post 302753627 by Anupam_Halder on Wednesday 9th of January 2013 05:36:49 AM
Old 01-09-2013
Adding DSN for MySql

Hi ,

I am not sure where to post this. Moderators please move this to right section if needed.

I need to connect to mysql through odbc.

How to add DSN entry for the server in order to use iSQL from shell to connect to MySql DB?

Thanks ans regards,
Anupam
 

5 More Discussions You Might Find Interesting

1. UNIX and Linux Applications

MySQL Daemon failed to start - no mysql.sock file

After doing a yum install mysql mysql-server on Fedora 14 I wasn't able to fully install the packages correctly. It installed MySQL 5.1. I was getting the following error when running the: mysql ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)... (3 Replies)
Discussion started by: jastanle84
3 Replies

2. Shell Programming and Scripting

Shell script for adding a table in mysql with 10,000 lines ... pls help

Hi , I am new to shell scripting . I need to write a shell script in sql to add 10,000 lines of data in a table . Pls help guys :) ---------- Post updated at 07:08 PM ---------- Previous update was at 03:40 PM ---------- guys please help !!! (3 Replies)
Discussion started by: vinumahalingam
3 Replies

3. UNIX for Dummies Questions & Answers

Test new DSN connection to sql server

I installed an odbc driver and created a DSN to connect to a sql server database on AIX 6. I want to know how to test the DSN from the command line. What syntax or commands do I use? ---------- Post updated at 11:44 AM ---------- Previous update was at 08:26 AM ---------- OK I figured out how... (9 Replies)
Discussion started by: Jdbrown239
9 Replies

4. Shell Programming and Scripting

Copy UNIX File into a DSN with a specific Format

Hi All , I am new to programming and here is what i am trying to achieve , i am taking a list of mounted filesystems (based on the HLQ) , passing it on to a txt file and then copying the file to a DSN .The code i am using : df | grep WAST.*WASCFG.*ZFS | awk '{print $2}' | sort -o log.txt |... (5 Replies)
Discussion started by: AnjanM
5 Replies

5. AIX

I cannot find dsn and TNSNAMES.ora on UNIX

Where can I find dsn and TNSNAMES.ora on UNIX AIX Thanks for contribution (3 Replies)
Discussion started by: digioleg54
3 Replies
PDO_IBM-DSN(3)								 1							    PDO_IBM-DSN(3)

PDO_IBM DSN - Connecting to IBM databases

	The PDO_IBM Data Source Name (DSN) is based on the IBM CLI DSN. The major components of the PDO_IBM DSN are:

	      o DSN prefix
		- The DSN prefix is ibm:.

	      o DSN
		- The DSN can be any of the following:

		     o a) Data source setup using
		       db2cli.ini or odbc.ini

		     o b) Catalogued database name i.e. database alias in the DB2 client catalog

		     o c) Complete connection string in the following format: DRIVER={IBM DB2 ODBC DRIVER};DATABASE=
		       database;HOSTNAME=  hostname;PORT= port;PROTOCOL=TCPIP;UID= username;PWD= password; where the parameters represent the fol-
		       lowing values:

			    o $database
			      - The name of the database.

			    o $hostname
			      - The hostname or IP address of the database server.

			    o $port
			      - The TCP/IP port on which the database is listening for requests.

			    o $username
			      - The username with which you are connecting to the database.

			    o $password
			      - The password with which you are connecting to the database.

       Example #1

	      PDO_IBM DSN example using db2cli.ini

	       The following example shows a PDO_IBM DSN for connecting to an DB2 database cataloged as DB2_9 in db2cli.ini:

	      $db = new PDO("ibm:DSN=DB2_9", "", "");

	      [DB2_9]
	      Database=testdb
	      Protocol=tcpip
	      Hostname=11.22.33.444
	      Servicename=56789

       Example #2

	      PDO_IBM DSN example using a connection string

	       The following example shows a PDO_IBM DSN for connecting to an DB2 database named testdb using the DB2 CLI connection  string  syn-
	      tax.

	      $db = new PDO("ibm:DRIVER={IBM DB2 ODBC DRIVER};DATABASE=testdb;" .
		"HOSTNAME=11.22.33.444;PORT=56789;PROTOCOL=TCPIP;", "testuser", "tespass");

PHP Documentation Group 													    PDO_IBM-DSN(3)
All times are GMT -4. The time now is 10:07 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy