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?
bhavna_816
0
Junior Poster
Recommended Answers
Jump to PostAre you sure the server is running? (check the obvious first :-)
Also check the order of the arguments to mysql_connect - it's server, user, password. (I somehow manage to forget that every single time I use mysql, and PHP yells at me for it a lot :-)
…
Jump to PostYou do know you need to copy the mysql dlls from the mysql directory to the PHP one and point the PHP config file at them?
This is probably as in PHP5 they removed MySQL support (was in by deafult before)
All 8 Replies
vssp
-5
Junior Poster
bhavna_816
0
Junior Poster
mmiikkee12
1
Posting Whiz in Training
jbennet
1,618
Most Valuable Poster
Team Colleague
Featured Poster
phper
9
Posting Whiz in Training
jbennet
1,618
Most Valuable Poster
Team Colleague
Featured Poster
w_3rabi
8
Junior Poster
jbennet
1,618
Most Valuable Poster
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.