Re: Connect to MySQL

From: Five Cats (cats_spam_at_[127.0.0.1)
Date: 02/05/04


Date: Thu, 5 Feb 2004 18:54:48 +0000

In message <Xns94869FDF1F5C2dygimailpocztafm@127.0.0.1>, Mr Dygi
<dygimailNo@SPAMpoczta.fm> writes
>Five Cats <cats_spam@[127.0.0.1]> wrote in
>news:SI0o8iBwPjIAFwpU@[127.0.0.1]:
>
>> Have you tested it by connecting & so on from a DOS box?
>
>I've installed it in DOS box and just learned some basics. Also tested it
>with:
>
> telnet localhost 3306
>
>It's great thing. I can now study basics operations on MySQL database
>without getting online.
>
>> It is connecting to the service through a TCP port, as specified in the
>> my.ini file. Of course it might depend on what PHP commands you are
>> using - I'm assuming you are using the specific MySQL ones (see
>> http://www.php.net/manual/en/ref.mysql.php). The entry for
>> mysql_connect makes it quite explicit it's connection via a TCP port
>> (the default is localhost:3306 but best see the manual page,
>> http://www.php.net/manual/en/function.mysql-connect.php), but if you are
>> using the ODBC functions then you would need an appropriate ODBC driver
>> installed. There is a big assumption on my part here, which is that you
>> *can* use ODBC to access a MySQL database - it's not mentioned in the
>> manual (http://www.php.net/manual/en/ref.odbc.php) but I know there is a
>> driver and I've managed to use it to get data into Excel before now.
>> This could well be an assumption too far.
>
>I don't understand. I connect to MySQL like you said with mysql_connect and
>using localhost:3306. I have also installed ODBC driver, because of the
>instructions.

I'm not sure which instructions those are, but I doubt you are using the
ODBC driver.

> I don't understand the part of the text about getting data
>into Excel.

Excel was an aside - just an example that it is possible to get data out
of MySQL with an ODBC driver. I'm really more interested in the
instructions which tell you to install ODBC, as I'm darned sure it's not
on my PC and that's working just fine, and I'm just as sure that the
installation instructions I got with MySQL didn't make any reference to
ODBC.

>
>> The manuals (MySQL & PHP) might be a useful download as well if you
>> don't already have them!
>
>Yes, there are. I've both on my HDD. Helps very much. Especially tutorial
>for newbies ;--D
>
>ps
>For what is the ODBC Driver if I can connect to the MySQL database over
>TCP/IP? For what is it genetally? For connecting to the MySQL database
>without installed TCP/IP?

There is stuff about ODBC at::

http://www.mysql.com/products/myodbc/

You might also want to explore the FAQs about it:

http://www.mysql.com/products/myodbc/faq_toc.html

But basically it's an API which many programs 'know' about which allows
them to communicate with databases. PHP, however, can communicate more
directly with MySQL via sockets.
>

-- 
Five Cats
Email to: cats_spam at uk2 dot net


Relevant Pages

  • Re: ODBC driver crashing my program
    ... The MySQL service starts fine. ... Next I wanted to install the ODBC drivers. ... Starting the ODBC control panel i can add a User DSN ... bug in the MySQL ODBC driver? ...
    (microsoft.public.vc.mfc)
  • Re: MS SQL 2005 Express and MySQL on Windows
    ... I'd rather not install Rails if possible - ... I installed the MySQL Essentials and am getting the following errors: ... Ruby to talk to a MySQL database on Windows. ... driver to connect." ...
    (comp.lang.ruby)
  • Problems with mySQL on FreeBSD
    ... I am trying to install phpBB ... First I needed to set up mySQL, ... I logged in as root into the mysql database ...
    (comp.unix.bsd.freebsd.misc)
  • Re: Mysql Server Problem, with a fresh install
    ... and i need to launch a mysql database in order to use a database ... > We i installed my fedora, i check the mysql box but now, when i look for the mysqld (with ... > I though that during the installation, the server will installed by itself, because of the ... If the server isn't installed you can install it with ...
    (Fedora)
  • RE: OLEDB connection to mysql via ASP
    ... You will need to install the ODBC driver for MySQL. ... > IS related to MS flavored technologies / platforms: ASP and Windows XP. ...
    (microsoft.public.inetserver.asp.db)