Entry
I have php4 working, but mysql won't connect...any suggestions? this is win98, pws4.0, php4RC1
Jul 27th, 2000 22:50
Narendra Jain, Gary Ambrose, www.mysql.com, www.php.net, www.faqts.com and webmonkey
1. Ensure that MySQL is unzipped properly, say in c:\mysql.
2. Use Explorer to go to c:\mysql\bin directory. Double click on
winmysqladmin.exe. This will open up a window, rather 2.
3. The window at top asks for a dummy user id and password.
Enter the same, say, user - admin, password - admin.
The window will close and the main Admin window will open.
4. The window on right corner will show red light - for database
server not running.
5. The previous step would have created my.ini file.
This would show up in the 3rd tab for my.ini Setup.
6. Click on mysqld radio button and then click on
'Save Modification'.
7. This would make the light turn green. This ensures that database
is now running.
8. php4 has inbuilt support for mySQL, so nothing specific needs
to be done on php setup.
9. Write a small script as follows:
<HTML>
<HEAD>
<? .phpinfo() ?>
</HEAD>
</HTML>
Save it as phptest.php and from the browser run it as:
http://localhost/phptest.php
10.This should show up a php information page. Scroll down to
come up to information related to mySQL - Specifically -
'mySQL Enabled'.
11.Create a database, say testdb, and table, say employee,
under mySQL and create about 2 or 3 rows in this table.
12.Now write a small php script to confirm the connectivity
between php and mySQL.
13.Steps 10 thru 12 are long steps, so, I am not writing
exact details. In case some specific scripts are needed,
I can write again with details.
Hope this all helps.