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
isql(1) 						       UnixODBC manual pages							   isql(1)

NAME
isql, iusql - unixODBC command-line interactive SQL tool SYNOPSIS
isql DSN [USER [PASSWORD]] [options] DESCRIPTION
isql is a command line tool which allows the user to execute SQL in batch or interactively. It has some interesting options such as an option to generate output wrapped in an HTML table. iusql is the same tool with built-in Unicode support. ARGUMENTS
DSN The Data Source Name, which should be used to make connection to the database. The data source is looked for in the /etc/odbc.ini and $HOME/.odbc.ini files in that order, with the latter overwriting the former. USER Specifies the database user/role under which the connection should be made. PASSWORD Password for the specified USER. OPTIONS
-b Run isql in non-interactive batch mode. In this mode, the isql processes its standard input, expecting one SQL command per line. -dDELIMITER Delimits columns with delimiter. -xHEX Delimits columns with HEX, which is a hexadecimal code of the delimiting character in the format 0xNN - i.e. 0x09 for the TAB char- acter. -w Format the result as HTML table. -c Output the names of the columns on the first row. Has any effect only with the -d or -x options. -mNUM Limit the column display width to NUM characters. -lLOCALE Sets locale to LOCALE. -q Wrap the character fields in double quotes. -3 Use the ODBC 3 calls. -n Use the newline processing. -e Use the SQLExecDirect instead of Prepare. -k Use SQLDriverConnect. -v Turn on the verbose mode, where the errors are fully described. Useful for debugging. --version Prints the program version and exits. COMMANDS
This section briefly describes some isql runtime commands. help List all tables in the database. help table List all columns in the table. help help List all help options. EXAMPLES
$ isql WebDB MyID MyPWD -w -b < My.sql Connects to the WebDB as user MyID with password MyPWD, then execute the commands in the My.sql file and returns the results wrapped in HTML table. Each line in My.sql must contain exactly 1 SQL command, except for the last line, which must be blank (unless the -n option is specified). FILES
/etc/odbc.ini System-wide DSN definitions. See odbc.ini(5) for details. $HOME/.odbc.ini User-specific DSN definitions. See odbc.ini(5) for details. SEE ALSO
odbcinst(1), odbc.ini(5) AUTHORS
The authors of unixODBC are Peter Harvey <pharvey@codebydesign.com> and Nick Gorham <nick@easysoft.com>. For the full list of contributors see the AUTHORS file. COPYRIGHT
unixODBC is licensed under the GNU Lesser General Public License. For details about the license, see the COPYING file. version 2.3.1 Tue 25 Jun 2013 isql(1)
All times are GMT -4. The time now is 01:46 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy