[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: SQL state S1090: Almost connected to mysql via PHP/odbc
Hi,
> -----Original Message-----
> From: mweb [mailto:mweb@xxxxxxxxx]
> Sent: Sunday, December 02, 2001 2:03 PM
> To: mweb@xxxxxxxxx; php-general@xxxxxxxxxxxxx; mysql@xxxxxxxxxxxxxxx
> Subject: SQL state S1090: Almost connected to mysql via PHP/odbc
>
>
> Hello,
>
> thanks to the precious suggestions I had on this list some day ago, I have
> made some progresses, or at least have something new to report.
> I would like to ask now above the error mentioned in the subject, because I
> have not found it inside www.,mysql.com
>
> I have a database called m97. It *is* listed when I run "show databases" in
> themysql monitor. It *shows* when I run isql -v m97.
> I have modified /etc/odbc.ini and /etc/odbcinst.ini and /etc/odbc.ini as
> follows:
>
> /etc/odbc.ini
>
> [m97]
> Trace = On
> TraceFile= stderr
> Driver = /usr/lib/libmyodbc.so
> DSN = m97
> SERVER = localhost
> USER = test
> PASSWORD = gee
> PORT = 3306
> OPTIONS = 1
> DATABASE= m97
> SOCKET = /tmp/mysql.sock
> #############################################
>
> /etc/odbcinst.ini
>
> # From the MyODBC package
> [MySQL]
> Description = ODBC for MySQL
> Driver = /usr/lib/libmyodbc.so
> FileUsage = 1
>
> In the PHP file I have:
> putenv("LD_LIBRARY_PATH=/usr/lib/");
> putenv("ODBCINSTINI=/etc/odbcinst.ini");
> putenv("ODBCINI=/etc/odbc.ini");
> $DSN="m97";
> $cnx = odbc_connect( $DSN , 'test', 'gee' );
>
> The result in netscape is still:
>
> Warning: SQL error: [unixODBC][TCX][MyODBC]Invalid DSN specified, SQL state
> S1090 in SQLConnect in
> /home/mweb/public_html/test.php on line 360
>
The problem is that, unixODBC is not able to find your MyODBC
DSN entry. This is probably due to the fact that it is not picking
the right odbc.ini file.
Did you tried by using isql -v m97 to check whether it is
really picking the .ini or not.
For more information on howto setup MyODBC, unixODBC and
MySQL, refer to the following link:
http://lists.mysql.com/cgi-ez/ezmlm-cgi?5:mss:3657:200108:einnhiokafobjmjbmcbm
Regards, Venu
--
For technical support contracts, go to https://order.mysql.com
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Venu <venu@xxxxxxxxx>
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Developer
/_/ /_/\_, /___/\___\_\___/ California, USA
<___/ www.mysql.com
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <mysql-thread92869@xxxxxxxxxxxxxxx>
To unsubscribe, e-mail <mysql-unsubscribe-##L=##H@xxxxxxxxxxxxxxx>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
This mailing list archive is a service of Copilot Consulting.