Professional Documents
Culture Documents
MySQL is the only softw are in the main list (Apache, PHP, MySQL) that has a
64-bit W indow s version. I did not test the 64-bit version of MySQL, but if
you have a 64-bit W indow s version, you should be fine if you w ant to
dow nload/install it. Otherw ise use the 32-bit version (the 32-bit version w ill
w ork on either type of machine).
Restart Apache and see if you get any errors. If it complains about "php_mysql.dll"
either your PHP extension directory isn't correct or w indow s can't find libmysql.dll
4. Testing MySQL
Testing MySQL is not exactly easy. How ever, here are the common connection strings for
PHP. I recommend dow nloading phpMyAdmin and using it to create and manage your
databases, etc.
converted by Web2PDFConvert.com
// hostname or ip of server (for local testing, localhost should work)
$dbServer='localhost';
// name of database
$dbName='test';
// close connection
mysql_close($link);
?>
Comments
Bug: My PHP 5.3 didn't include January 2, 2011 - 5:20pm — Anonymous reply
libmysql.dll
My php 5.3.3 zip file didn't include a libmysql.dll file that you refer to in your instructions. Huh?
Answer: MySQL and PHP prior to January 4, 2011 - 12:37am — ricocheting reply
5.3
Apparently as of PHP v5.3.0 "libmysql.dll isn't needed anymore as mysqlnd was introduced as
client library."
How ever, if you still refer to their official installation instructions they still talk about
libmysql.dll as does the text files including in the zip. That's aw esome ...
I'm going to quote my original instructions here for anyone using PHP older than 5.3.0:
Unfortunately PHP5 removed built-in support for MySQL. To get it to work, the
easiest way is to copy the mysql library file by hand. Open the folder you
unzipped your PHP to. Copy the libmysql.dll file (should be located like
C:\php\libmysql.dll ) into your Window's System folder (usually
C:\Windows\System32\ although might be C:\WinNT\System\ or something).
People using new er versions of MySQL shouldn't have to w orry about it anymore (I did a
clean install of everything and it does appear libmysql.dll is not needed anymore).
I updated the tutorial to reflect all this, but it w ould be nice if someone can confirm all this
that it w orked for them w ithout messing w ith libmysql.dll
Bug: localhost not wanting to November 23, 2010 - 11:51pm — Anonymous reply
connect
If you are not able to connect try replacing "localhost" w ith "127.0.0.1" =)
Re: localhost not wanting to November 26, 2010 - 9:35pm — Anonymous reply
connect
After some digging, I think the problem has to do w ith W indow s 7 hosts file
C:\Windows\System32\drivers\etc\hosts and it not correctly mapping localhost to
127.0.0.1 by default.
Anyw ay, I used "127.0.0.1", and it w orked. Thank you very much! I w ould have never
converted by Web2PDFConvert.com
figured that out. :)
Fatal error: Call to undefined function July 13, 2010 - 11:53pm — Anonymous reply
mysql_connect()
I get this error - i did restart apache a few times to make sure
Fatal error: Call to undefined function mysql_connect() in
C:\webserver\Apache\htdocs\mysqltest.php on line 12
(64-bit Windows 7) Call to undefined July 22, 2010 - 5:09am — Psychosis reply
function mysql_connect()
If you are running a 64-bit version of W indow s 7 (such as I am), I noticed that I get the
same error if I put libmysql.dll in C:\W indow s\System32 as suggested. If libmysql.dll is
placed in C:\W indow s instead, PHP w ill see libmysql.
This solution worked for me August 24, 2010 - 4:02pm — mhasnain reply
This solution w orked for me perfectly. It took me several attempts, but it w orked.
W henever you make a change, reboot your computer.
Please help,
madan712
1) You need to make sure you are installing MySQL as Administrator. You can't do it from a
limited account.
2) Your "User Access Control" in Vista (W indow s 7 also has a similar setting) might be set to
high. The settings for that should be somew here under Control Panel > User Accounts (I'm
currently not at a machine w here I can check the exact location or w ording).
Could not start the service MySQL July 5, 2010 - 3:14am — Anonymous reply
service error:0
Hii..I tried to install MySQL as you suggested but w hen i try to execute at the last screen....its
show ing an error message like
Could not start the service.MySQL error:0.
Please Help me!!!Im banging my head against my keyboard to solve this problem from w eeks..
Could not start the service MySQL July 22, 2010 - 4:55am — Psychosis reply
service error:0
May I also suggest that you right-click on the MySQL installer, scroll dow n to properties and
look at the bottom of that w indow . Some versions of W indow s w ill block files that have been
dow nloaded from the net, until you explicitly go into the properties w indow for that file and
click the unblock button. If your installer w as blocked, I w ould suggest removing your MySQL
server instance, then uninstalling MySQL all together, physically go into your program files
folder and delete the MySQL folder that w ill still exist after you uninstall. Then go through
and reinstall MySQL as suggested.
converted by Web2PDFConvert.com
Answer - Further MySQL Debugging July 5, 2010 - 1:07pm — ricocheting reply
I've had several people tell me if they manually change the service name to something other
than default (like "dbmysql5") w hen installing the service it then w orks for them.
There should also be an error file in the mysql data directory named like
<my_hostname>.err that you can open in a text editor. It might provide you w ith more
details.
Also you can try to start mysql from command prompt like:
C:\Program Files\MySQL\MySQL Server 5.0\bin> mysqld-nt.exe --console
w hich should also give you more details.
converted by Web2PDFConvert.com