[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1931
  • Last Modified:

Windows XP and MySQL install nightmare

Hello,

I am trying to install MySQL on a Windows XP Home Machine SP2 and it is not working at all I am getting various error messages....

I also have the latest versions of PHP 5 and Apache installed, they are both working together fine.

I was trying to install MySQL... I can get it installed but I get various error messages

10006 or a 10016 cannot connect to database  

a security error number 1045 security settings could not be applied access denied for user 'root'@localhost' (using password:NO)

this makes no sense to me

everytime I try to get this script to work it says cannot connect to MySQL

<html>
<head> <title>MySQL Connection Test</title> </head>
<body>
<h2>

<?php
$connection=mysql_connect( "localhost", "root", "" )
or die( "Sorry - unable to connect to MySQL" );
echo( "Congratulations - you connected to MySQL" );
?>
</h2>
</body> </html>

the book I have tells me to install the my.cnf file which you cannot do it identifies it as a speed dial or something to that affect. when you use the auto configuration it generates an ini file called my.ini according to other websites other then mysql's it should be my.ini not my.cnf as they tell you on the mysql site....

I am completely lost and confused at this point can anyone help I need to get this working

0
briancassin
Asked:
briancassin
  • 6
  • 2
  • 2
  • +2
1 Solution
 
UmeshMySQL Principle Technical Support EngineerCommented:
Hi,


[taken from NET]

This simply means that your username or password are incorrect. If you have not changed the username, try using 'root' as the username and no password. If that works, then you are ok. Otherwise, you need to find the correct username / password combination OR set the proper permissions for that particular user to that database.

Check here for more..
http://www.mysqlfreaks.com/errors/55.php



I just installed Apache/PHP5/MySQL on my Windows PC with XP Home OS. I followed the Tut Installing PHP under Windows by Matthew Phillips Referred to in the Post: Easy to understand Apache/PHP/MySQL install on XP box

This worked OK aside from a couple obvious differences. I had the most troube getting MySQL configured with PHP and had to do some searching to find the answer. Here is what I had to do to get it working.

In the Apache httpd.conf File at 'C:\Program Files\Apache Group\Apache2\conf\httpd.conf' You have to add these lines for PHP5

LoadModule php5_module php5apache2.dll
AddType application/x-httpd-php .php

In addition to installing MySQL etc. I had to do this to get MySQL to work:

1. Make sure that you have a valid php.ini in your windows directory.
OR (Per the tut the 'php.ini' can be installed in the 'C:\Program Files\Apache Group\Apache2' folder. This works fine.)
2. copy libmysql.dll to the system32 directory (php_mysql.dll would not load without doing this)
3. set the extension_dir in php.ini to the ext directory of your PHP installation directory (like e.g. extension_dir=C:\php5\ext)
4. enable the MySQL extension in php.ini by uncommenting the line extension=php_mysql.dll
5. Restart Apache Server

For complete how to check this..

http://www.devarticles.com/c/a/Apache/Installing-PHP-under-Windows/
0
 
IanThCommented:
SP2 breaks winodows networking maybe thats also causes your grief

If you can try it on a windows sp1 pc  
0
 
briancassinAuthor Commented:
Ok I tried what you said and now when I start Apache I get
Warning:
PHP startup: Unable to load dynamic library 'C:\php\ext\php_mysql.dll' - the specified procedure could not be found.

However apache still starts successfully... and I can see the php info however now if I try the mysql test I get nothing it is like nobody is home nothing happens no error no nothing....
0
[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

 
briancassinAuthor Commented:
I did this "copy libmysql.dll to the system32 directory" and this is when I got the message above    
0
 
briancassinAuthor Commented:
error 2003 <HY000> can't connect to MySQL Server on localhost if I try to run the MySQL administration from the command prompt
0
 
briancassinAuthor Commented:
This is a mess...... MySQL's documentation on their site is awful and cryptic, PHP's info is scattered and Apache is about the only one that has some information and direction.
0
 
IanThCommented:
try removing apache and reinstall it with php at the same time that should fix php imho
0
 
psadacCommented:
with php 5.0.2 and mysql 4.1.7 there are some problems using php_mysql extension. you should use the php_mysqli extension.
see the sample code at : http://www.php.net/manual/en/function.mysqli-query.php
you can also use the php_mysqli extension with the latest versions of phpmyadmin
0
 
briancassinAuthor Commented:
psadac I do not know enough about mySQL to have much of an idea of what you are talking about.... I guess I have 3 options as I see it as this point


I have already uninstalled and reinstalled everything however MYSQL Admin is working but the rest of MYSQL seems out to lunch no matter how many different scripts I try with examples none of them seem to work yet MYSQL admin interface says everything is FINE..... PHP and Apache seem to be working the script to run the phpinfo keeps comming up with the information on PHP like it should so I would say Apache and PHP are fine. MySQL I heard lots of good things about but I must say at this point I am not the least bit impressed they have no FAQ's troubleshooting information etc... how do they expect someone to figure out how to make their software work if that person has never worked with it before ???

Unless anyone has any other ideas these are my options I see

1. Give Up on installing this configuration on Windows until someone comes out with some uniform documentation but I don't forsee that happening because this kind of a setup is seen much more on a linux box.

2. Install it on Linux and run it from Linux

3. Find the following versions of PHP MYSQL and APACHE and hope they all work together since it seems the book I bought is based on slightly older versions then the current ones available.... which this book so far has been a waste of my time and money.... they even have the wrong info. in the book stating that the my.ini is my.cnf - not in windows it will not work as a cnf file.   at any rate here are the versions

Apache 1.3.31
MYSQL 4.0.18
PHP     5.0.0 - final release version

the book I have can be found here www.ineasysteps.com - PHP 5

the versions I have been trying to use are:

Apache 1.3.33
MySQL  4.1
PHP    5.0.2
0
 
psadacCommented:
ok, i say that if you use mysql 4.1.X you will have some problem with php_mysql.dll extension and you should use php_mysqli.dll instead. in your php.ini you should see :

extension_dir = "c:\php\ext"
extension = php_mysqli.dll

and in your phpinfo() you should see a mysqli extension. the problem with the mysqli extension is that you have to rewrite your code, the syntax is very close to mysql but there are some differences in the connection process (see the link i posted above)
if you have many applications that use the php_mysql extension you should stay with mysql 4.0.22, update your code to work with php_mysqli, and finnally update to mysql 4.1.7.
0
 
briancassinAuthor Commented:
I tried this on an XP Pro Machine (clean install) and it worked fine apparently either my firewall, anti virus or the fact that it is home and cannot assign certain permissions to the folders, and files in MYSQL seems to have caused the problem. At any rate it was isolated to being the O.S. and specific machine it was on.
0
 
LunchyCommented:
Closed, 500 points refunded.
Lunchy
Friendly Neighbourhood Community Support Admin
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 6
  • 2
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now