Page 1 of 1
newbie 2 MySQL
Posted: Wed Mar 31, 2004 6:41 pm
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?
Posted: Wed Mar 31, 2004 6:45 pm
by markl999
Define 'im havin trouble'. What's happening? Any errors? Have you followed
viewtopic.php?t=17096 ?
Posted: Wed Mar 31, 2004 6:59 pm
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)"
Posted: Wed Mar 31, 2004 7:00 pm
by markl999
Sounds like MySQL isn't running to me.
Posted: Wed Mar 31, 2004 7:02 pm
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.
Posted: Wed Mar 31, 2004 7:04 pm
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).
Posted: Wed Mar 31, 2004 7:06 pm
by James M.
im usin php's built-in MySQL, dont have it installed exactly
Posted: Wed Mar 31, 2004 7:11 pm
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

Posted: Wed Mar 31, 2004 7:19 pm
by James M.
thanx for the help