3 messages in com.mysql.lists.win32Re: Creating a database and mysql-nt ...
FromSent OnAttachments
Robert Courtney27 Oct 2004 10:21 
Friedhelm Betz27 Oct 2004 12:13 
Friedhelm Betz28 Oct 2004 00:38 
Subject:Re: Creating a database and mysql-nt aborting
From:Friedhelm Betz (holl@gmx.net)
Date:10/28/2004 12:38:05 AM
List:com.mysql.lists.win32

Robert Courtney wrote:

[...]

I just looked in the archives for this problem and I didn't get anything back. Perhaps someone can direct me to the answer.

I have just installed apache2 server, php 5, and mysql 4.1, and the Mysql administartor.

I am running a php file that creates a database and then creates the table. When I run the php file it looks like the host is hanging (msg: waiting on localhost). If wait for it to time out, I get the windows message "mysqld-nt.exe has encountered a problem and needs to close." When I close the browser window and use the Mysql administrator I see the database was created, but there is no table created.

Everything seems to have been installed correctly and intializes. Apache2 works, php 5 works, and I can query mysql. Any help would be appreciated.

First of all, which versions do you use? mysql? 4.1.7?

I'm using apache2 2.0.52 mysql 4.1.6

PHP 5.0.2?

Yes, php 5.0.2

You are ussing mysqli-functions from PHP to connect to mysql 4.1.x?

I'm using

$connect = mysql_connect("localhost", "root", "bobby") or die ("Hey loser, check your server connection.");

to connect to the host. I changed the root password and I am using the local host. If I test apache2 to make sure it is up and running, it works. If I pass apache a php file to parse, it come back ok so I know that apache and php are talking ok. I may have an option not set right or I may need a path set or something along those lines. I think.

Does your SQL work from the commandline client /bin/mysql.exe (aka mysql monitor)?

Yes, I can query the database from a command line and also the administrator program from mysql. So, it comes up ok and basically works. I just cannot connect to the database using php 5(or php 4, I just upgraded because I was having problems with it also). I'm not sure where the problem exactly is at.

AFAICT the problem seems to be a PHP problem, as MySQL seems to work corrcect. Robert, please read http://www.php.net/manual/en/ref.mysql.php and http://www.php.net/manual/en/ref.mysqli.php how to connect to MySQL 4.1.x using PHP.

Try the mysqli funvtions along with PHP 5. You can not use PHP 4 to connect to MySQL 4.1.x.

For further PHP questions you should get more help using one of the PHP mailinglists: http://www.php.net/mailing-lists.php

Regards Friedhelm