Sponsored Content
Full Discussion: Adding DSN for MySql
Top Forums Shell Programming and Scripting Adding DSN for MySql Post 302754661 by Yoda on Thursday 10th of January 2013 11:38:39 PM
Old 01-11-2013
Did you check MySQL Manual
This User Gave Thanks to Yoda For This Post:
 

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
odbcinst(1)							UnixODBC Reference						       odbcinst(1)

NAME
odbcinst - command line tool for batch ODBC configuration SYNOPSIS
odbcinst action object options action is one of -i install a driver or data source -u uninstall a driver or data source -q query a list of drivers or data sources present on the system --version shows the version number of the program object is one of -d an ODBC driver in /etc/odbcinst.ini -s an ODBC Data Source Name (DSN) in an odbc.ini file. options are zero or more of -f template file Used with -i, this option specifies a template file containing the driver or DSN to be installed. -r Read the template from standard input. -n Driver/Data Source Name Used with -u to specify a driver or DSN to remove. -v Contrary to standard practice, this turns off verbose output; there is no output, even for errors. -l The specified Data Source object is a System DSN, in /etc/odbc.ini. -h The specified Data Source object is a User DSN, in the current user's $HOME/.odbc.ini. This is the default with -s. DESCRIPTION
odbcinst updates the configuration files that control ODBC access to database servers on the current host. It also maintains in /etc/odbcinst.ini a count of the number of references to a particular driver, which can be used to determine whether it should be removed from the file (only when the reference count drops to 0). Installing Drivers and DSNs are installed using the -i option. If the object to be installed is a driver (-d), the specified driver is added to /etc/odbcinst.ini or its reference count is incremented if it is already there. If the object is a data source (-s), the data source is added either to /etc/odbc.ini (if -l is used) or to $HOME/.odbc.ini (the default, which can also be specified with -h). Uninstalling Uninstalling a driver is done with the command odbcinst -u -d -n driver name. Uninstalling a DSN is done with the command odbcinst -u -s -n data source name. Uninstalling causes the reference count on the object to be decremented. If nothing else has requested this driver or DSN (i.e., the reference count drops to zero), it is removed from the config file. The options -l and -h are used with -s to specify which odbc.ini file to configure. Queries The command odbcinst -q -d returns a list of all drivers present in /etc/odbcinst.ini. The command odbcinst -q -s returns a list of all system and user DSNs available. EXIT STATUS
0 Success non-zero Failure TEMPLATE FILES
A typical driver template looks like this: [MySQL] Description = MySQL driver Driver = /usr/lib/odbc/libmyodbc.so Setup = /usr/lib/odbc/libodbcmyS.so A DSN template looks like this: [Sample DSN] Description = Test MySQL connection Driver = MySQL Trace = Yes TraceFile = /tmp/odbc.log Database = junk Server = localhost Port = 3306 Socket = The Description and Driver fields should be present in all DSN configurations. Other options are driver-specific; consult your ODBC driver's documentation for a list of allowed options, or see ODBCConfig(1) for a graphical tool that can be used to interactively set up a DSN or driver the first time. FILES
/etc/odbcinst.ini, /etc/odbc.ini, $HOME/.odbc.ini AUTHOR
This manual page was written by Oliver Elphick <olly@lfix.co.uk> and Steve Langasek <vorlon@debian.org> for the Debian package of unixODBC. SEE ALSO
ODBCConfig(1), gODBCConfig(1) UnixODBC 2nd Mar 2002 odbcinst(1)
All times are GMT -4. The time now is 06:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy