newbie 2 MySQL

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
James M.
Forum Contributor
Posts: 119
Joined: Wed Mar 31, 2004 6:41 pm
Location: Tallahassee

newbie 2 MySQL

Post by James M. »

im a newbie 2 php in general and i finally got 2 mysql in databases, and im havin trouble with mysql_connect(), it wont connect and i dunno y. im usin php 4.3.5 so mysql is buildt-in, n im running my scripts on apache(localhost), can ne1 help?
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

Define 'im havin trouble'. What's happening? Any errors? Have you followed viewtopic.php?t=17096 ?
User avatar
James M.
Forum Contributor
Posts: 119
Joined: Wed Mar 31, 2004 6:41 pm
Location: Tallahassee

Post by James M. »

markl999 wrote:Define 'im havin trouble'. What's happening? Any errors? Have you followed viewtopic.php?t=17096 ?
i keep gettin the warning message

"Warning: mysql_connect(): Can't connect to MySQL server on 'localhost' (10061)"
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

Sounds like MySQL isn't running to me.
User avatar
James M.
Forum Contributor
Posts: 119
Joined: Wed Mar 31, 2004 6:41 pm
Location: Tallahassee

Post by James M. »

nethin i could do? o and as of lately wen i stop or restart apache it always closes off in an error and windows brings up the "end process now" window, if that helps.
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

It's not related to apache, it's MySQL, it's not running.
Goto c:\mysql\bin and double click winmysqladmin.exe (or wherever it is on your system if you've installed it to a different place).
User avatar
James M.
Forum Contributor
Posts: 119
Joined: Wed Mar 31, 2004 6:41 pm
Location: Tallahassee

Post by James M. »

im usin php's built-in MySQL, dont have it installed exactly
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

Hmm, PHP only bundles the client libraries, not the server, you still need to be running a mysql server to be able to connect to it.
Goto http://www.mysql.com and download and install it, it only takes a few clicks ;)
User avatar
James M.
Forum Contributor
Posts: 119
Joined: Wed Mar 31, 2004 6:41 pm
Location: Tallahassee

Post by James M. »

thanx for the help
Post Reply