MySQL Setting in install.php

Started by GordonM, August 30, 2005, 01:06:50 PM

Previous topic - Next topic

GordonM

I have successfully installed SMF on one other occasion, so the installation process is not totally new to me.  However, I am now trying to make another installation on a different machine (Win2000) and can't complete the Installer process. 

This time, I am trying to make a completely off-line installation, which is just for a local demonstration and will not connect to the Internet.  The problem seems to be in the MySQL settings.  I am using MySQL server name as localhost, MySQL username as root, and MySQL password as the one I always use for testing.  The result, after clicking on "Proceed" is:

Cannot connect to the MySQL database server with the supplied data.
If you are not sure about what to type in, please contact your host


Can't connect to MySQL server on 'localhost' (10061)

Click here to try this step again.

Any help much appreciated.

Chris Cromer

You do have mysql installed and started right?
Chris Cromer

"I was here, here I was, was I here, sure I was" - The little voice in my head.

GordonM

Thank you .... MySQL is certainly running.  It is shown as "Started" under Windows Services and there is a process running called mysqld-nt.exe.  However, I don't yet know whether it is running correctly.  From what I have read, I may have to install the Cygwin environment to run the MySQL test suite.  I should probably do this.

Chris Cromer

Does windows 2000 use nt? I could have swarn it was still windows 9x based.

If my throughts are correct then mysqld-nt.exe shouldn't be running. It should be mysqld.exe instead. But I could be wrong and windows 2000 might be nt based.

That's the only thing I can think of right now, maybe someone else might know.

And as far as I am aware you don't need cygwin for the basic mysql server. I never had to install cygwin to get mysql running on my computer, even back when I used windows 98.
Chris Cromer

"I was here, here I was, was I here, sure I was" - The little voice in my head.

GordonM

Hi again.  Yes, I have seen many references to Win 2000 being a Win NT "type" of OS, so I think that the correct .exe is running.

I agree that one does not need Cygwin to run MySQL, but I think that it is needed to run the MySQL test suite as this seems to have been developed for the Unix environment (ref. http://dev.mysql.com/doc/mysql/en/mysql-test-suite.html [nofollow]).  It seems to make use of Unix shell-scripts.

JayBachatero

What's your PHP version.  In version 5.x you need to enable mysql it comes with SQLite as default.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Chris Cromer

LiL_J, it would be giving him mysql_connect() not found errors if mysql wasn't setup in php. So it is enabled. The problem lies somewhere with the mysql server.
Chris Cromer

"I was here, here I was, was I here, sure I was" - The little voice in my head.

JayBachatero

Oh ok.  Because i was having the same problem with my test server.  Even phpMyAdmin wasn't working.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

GordonM

Thank you all.  I am using PHP 4.4.0.  It tested out ok with a small .php file.

For MySQL, I initially tried mysql-essential-4.1.14-win32.  When that didn't work (similar problems), I went back to mysql-essential-4.1.12-win32, which I had used before.  I didn't expect this to solve the problems, and it didn't.

I am using smf_1-0-5_install.  I had previously (on a XP SP2 machine) used smf_1-1-beta3p_install.  Maybe, I should try that again, given that it worked for me before.

When I installed MySQL this time, I specifically set it up as only a local server.  This "greyed-out" one of the security-related checks.  Immediately before this, during an earlier installation attempt, I didn't place this restriction on the installation but I still had the same problems that I am now experiencing.

Perhaps someone could clarify something for me .... I believe that "root" is built-in as the default user, which I am trying to use.  I don't remember at what point I should have set up the password for the root account.  Maybe I should set up this password again ... I think there is a process to do this ... in case I can't login to MySQL because of a username/password problem.

Chris Cromer

Well normally the default mysql password is blank.

I don't know how the local server thing works in mysql install. But I just set it up regularly with the default options in windows xp. I don't really see a point in setting it to be restricted to local only since nobody will be able to access it anyway since they won't know your ip and won't know that you have mysql installed.

Could you try installing mysql with the default settings rather than restricting to local and see if that helps?
Chris Cromer

"I was here, here I was, was I here, sure I was" - The little voice in my head.

GordonM

Chris - This is what I started with.  However, I'll try it again.

GordonM

Chris - Following your suggestion, I re-installed MySQL and it seemed to go OK, though there was initially a password problem, which was fixed by running the wizard again, after the initial install.

Now when I run the SMF installer, I receive a message:

Cannot connect to the MySQL database server with the supplied data
If you are not sure what to type in, please contact your host.


Client does not support authentication protocol requested by the server;
consider upgrading MySQL client


Maybe I should try the later version of SMF.

GordonM

Chris Cromer

That's a problem with mysql 4.1 and php not playing nicely, not a problem with SMF. Trying a newer version of SMF will have the same result because it's mysql and php's fault.

Here is an article on the problem:
http://dev.mysql.com/doc/mysql/en/old-client.html

You have 3 choices.
1)Upgrade php to php5.
2)Downgrade mysql to 4.0.
3)Fix mysql 4.1.

To fix it use command line/dos. Go into the directory that you installed mysql into. The into it's bin directory. Run mysql.exe.

Now type this into the mysql command prompt:
SET PASSWORD FOR 'root'@'localhost' = OLD_PASSWORD('mypass');

Make sure to replace mypass with your password for the root account. This way the root account will use mysql 4.0 style passwords.

You might need to restart mysql after for this change to work though, not sure.
Chris Cromer

"I was here, here I was, was I here, sure I was" - The little voice in my head.

GordonM

Chris - You are correct, a later version of SMF didn't help.  I had found the article that you have referred to and this was my next step to try.  What puzzles me is that I had didn't have the problem when I installed on my XP2 machine.  Anyway, I'll give it a try.

Thank you
GordonM

Chris Cromer

Well on your XP2 machine you probably had either php5 installed or you had mysql 4.0 installed which is why this didn't rear it's head on that machine.
Chris Cromer

"I was here, here I was, was I here, sure I was" - The little voice in my head.

GordonM

Chris - I see there isn't a red face emoticon on this board ..... indeed you were correct.  I was convinced that I had installed the same version of PHP as for my earlier successful installation.  However, I had not.  I was using PHP4!  I have now replaced this with PHP 5.0.4 and all is well.

Thank you for your help ... it's often the simple things that are the problem!

GordonM

Chris Cromer

Glad you got it worked out, and glad to help. :)
Chris Cromer

"I was here, here I was, was I here, sure I was" - The little voice in my head.

Advertisement: