DeveloperSide.NET Forums
June 18, 2019, 08:46:53 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: PHP/apache/Mysql  (Read 22141 times)
0 Members and 1 Guest are viewing this topic.
bobh
Member
*
Posts: 7


View Profile
« on: September 27, 2003, 04:13:58 PM »

I can get PHP working with Apache server; but having trouble with MYSQL.

Would like to share experiences :?

bob-h
Logged
Anonymous
Guest
« Reply #1 on: September 27, 2003, 07:27:37 PM »

What are you talking about, need more info?
Logged
bobh
Member
*
Posts: 7


View Profile
« Reply #2 on: September 27, 2003, 09:47:04 PM »

It appears to be running but I cannot contect from PHP.  Earlier I had an older  version running and PHP could connect, but I had to re-install MySQL and now PHP cannot connect.

Here's the my.ini file and it is in c:\windows
[mysqld-nt]
basedir=C:/mysql

datadir=C:/mysql/data





[WinMySQLadmin]
Server=C:/mysql/bin/mysqld-nt.exe
user=bob . . .

bob-h
Logged
Anonymous
Guest
« Reply #3 on: September 27, 2003, 11:59:48 PM »

Do you know for a fact mysql is running?  When you go to 'services' is there a 'MySQL' service 'started'?

Does 'netstat -an' have port 3306?

And explain what you mean when you say php can not connect to mysql?  What php script are you using, what is the error message?

Just to point it out to everyone else, this person is not using the DeveloperSide package, just his own thing.

BTW, what is '[WinMySQLadmin]' doing in your my.ini?
Logged
bobh
Member
*
Posts: 7


View Profile
« Reply #4 on: September 28, 2003, 03:31:26 AM »

thanx, here are the answers to your question-
bob-h

Do you know for a fact mysql is running? When you go to 'services' is there a 'MySQL' service 'started'?  yes , mysql shows to be 'started'

Does 'netstat -an' have port 3306? YES

And explain what you mean when you say php can not connect to mysql? What php script are you using, what is the error message?
$server = 'localhost';
$user   = 'bob';
$lucy   = 'mysqlpw';  

$connect = mysql_connect($server, $user, $lucy);

if (!$connect ) {print ("cannot connect to $server" ); }
else { print (" connected to server...$server "); }

There is just the 'cannot connect to localhost' as a result.. . .


Just to point it out to everyone else, this person is not using the DeveloperSide package, just his own thing.  I used your instructions to get the whole thing started; but for some reason MySQL quit.

BTW, what is '[WinMySQLadmin]' doing in your my.ini?  Iit was in the binaries that way.

thanx,

bob-h
Logged
Anonymous
Guest
« Reply #5 on: September 28, 2003, 03:51:52 AM »

$db = mysql_connect('localhost', 'bob', 'mysqlpw') or die('Could not connect to MySQL: ' . mysql_error());

Do the above, that way you get an error message back.
Logged
Anonymous
Guest
« Reply #6 on: September 28, 2003, 03:53:02 AM »

If nothing is wrong, than your user/password is messed up.
Logged
bobh
Member
*
Posts: 7


View Profile
« Reply #7 on: September 28, 2003, 03:24:51 PM »

Well, now I get 1067 error when I try to restart MySQL; this is where I have to re-install.  I would like to use the package on devside but cannot find a .rar unzipper.

bob-h
Logged
Anonymous
Guest
« Reply #8 on: September 28, 2003, 04:51:16 PM »

Winzip will unpack .rar.

If you search for WinRAR on google, you'll get WinRAR.
Logged
Anonymous
Guest
« Reply #9 on: September 28, 2003, 04:59:15 PM »

Quote

I used your instructions to get the whole thing started; but for some reason MySQL quit.


Instead of just using our instructions to start it, why not just read the mysql instructions from the start and do the entire thing, its very simple.  Instead of using the installer.
Logged
bobh
Member
*
Posts: 7


View Profile
« Reply #10 on: September 28, 2003, 07:33:29 PM »

"
Instead of just using our instructions to start it, why not just read the mysql instructions from the start and do the entire thing, its very simple. Instead of using the installer. "

I've tried that and two books that had the MYSQL on a CD; still about the same problem.  The thing worked once; but never again no matter what I install.  I used the devside instructions for Apache & PHP and those ARE working.

When I changed to the error msg code I get bob@localhost access not allowed.

thanx for the help

bob-h
Logged
Anonymous
Guest
« Reply #11 on: September 28, 2003, 11:05:12 PM »

Quote

When I changed to the error msg code I get bob@localhost access not allowed


That means the password is bad.  Try just user 'root' and password ''.  Maybe there is no user 'bob' under MySQL.  If you did not add it...it is not going to be there.

Also, about that MySQL thing only working once.  Means one thing to me, the MySQL service is installed to be manual.  It starts the first time, but on the next reboot, its off.

Do in a dos shell, 'NET START MySQL'

Stop doing all that other crap, winadmin, etc....  and just read the instructions.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.9 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!