Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > MySQL
MySQL General discussion about the MySQL database.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the MySQL section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old April 27th, 2007, 04:19 AM
Authorized User
Join Date: Jan 2007
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default unable to connect PHP with Mysql

I am new to PHP. I am trying to connect mysql with PHP with
mysql_connect but i m getting
"A link to the server could not be established"
I have used ODBC 3.51 driver for odbc and made connections with odbc with odbc_connect
but i don't know how to connect it with mysql_connect and fire mysql_-----queries.
Is there any specific driver for tht?

Old June 5th, 2007, 07:52 PM
Friend of Wrox
Join Date: Jul 2003
Posts: 128
Thanks: 0
Thanked 1 Time in 1 Post

Know first the version of mysql you are connecting.
Also, you need to download from MySql the connector MyODBC
(it believe it is version 3.51).
If you are using current version 5.0 of MySQL
syntax/ mysql database functions is different from
prior version 4.1. ver. 5 uses mysqli (This is mysql improved).
And it works with PHP version 5.0 as well.
Hope this helps,

Similar Threads
Thread Thread Starter Forum Replies Last Post
php connect to mySql parrot face PHP Databases 3 March 20th, 2007 03:42 AM
Connect php to mysql Nicholsen MySQL 1 December 3rd, 2006 02:34 AM
php connect to mysql p2ptolu Beginning PHP 2 February 24th, 2005 10:43 AM
PhP - MySql Connect From Another Domain mani_he Pro PHP 13 December 21st, 2004 01:03 PM
Unable connect to MySQL using JSTL tag PatrickWalsh JSP Basics 12 December 15th, 2004 01:41 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.