Page 1 of 1

Can't connect to MySQL

Posted: Mon Oct 03, 2005 12:38 pm
by wientanz
I've setup two installations of CMSMS on two test-servers and it worked like a charm.

When I tried to install it on Powweb, a shared hoster, where CMSMS should replace our previous webpage, I ran into a problem: During the installation process I could not connect to the mysql-Server. I don't have root-rights on the DB, so i just created a DB named Bugo_cms with their OPS, something like a CPanel, which they developed themselves. Then I used their "Create user" function for creating a mySQL user named Stefan_cms with all available rights. These being:
Bugo_cms
Privileges: Select | Insert | Update | Delete | Create | Drop | Index | Alter | Create Tmp Table | Lock Tables
Y | Y | Y | Y | Y | Y | Y | Y | Y | Y


The mysql-server is mysql14.powweb.com
The mySQL-Server only allows logins from their HTTP-Clusters. HTTP and mySQL are on seperate machines. Their mySQL-version is 4.1.11-log.

So I entered the following details during CMSMS installation:

Database Type:  MySQL (4.1+)
Database host address  mysql14.powweb.com
Database host port  3306
Database name  Bugo_cms
Username  Stefan_cms
Password  *******
Table prefix       cms_
Create Tables (Warning: Deletes existing data)  x


Followed by "Connection failed". When i use phpmyadmin, I can connect with the above details, so please: help!
I posted a request for help in their forum.powweb.com, but got no useful answer.

I even tried to manually edit the config.php and copy and paste the mySQL-dump drom a testserver, but that did NOT work ;-) Should have known...

Thanks in advance for any help! I really need it!
Steve

Re: Can't connect to MySQL

Posted: Mon Oct 03, 2005 9:01 pm
by kishman155
hop this would help.
On there Homepage they say they have 4.1.7 running
try to change the myssql version to 3.0 4.0 on install

try to change mysql14.powweb.com to localhost

or

try to ping your host mysql14

Code: Select all

c:/>ping mysql14.powweb.com

and then replace mysql14.powweb.com with ipaddress.


kishman155

Re: Can't connect to MySQL

Posted: Thu Oct 06, 2005 2:40 pm
by wientanz
Hi!

Tried using DB-option mySQL 3.0, 4.0, tried using localhost (which I was sure would not work), tried mysql14.powweb.com and tried the corresponding IP adress. None of that works. Is there a way to let CMSMS install output the mysql-error instead of just saying "connection failed"?

Want to know wether it is a "User/password wrong" error or a "server not found"? I'm guessing that it has something to do with the mysql-user rights, though...
:-/

Re: Can't connect to MySQL

Posted: Thu Oct 06, 2005 9:45 pm
by sjg
Here's how to get the mysql error displayed if you're running into problems.

Edit the install/install.php file. Search for the showPageFour function. It should be somewhere around line 363, depending on which version of the CMS you're working with. You'll recognize the function by the declaration that looks like

Code: Select all

function showPageFour($sqlloaded = 0) {
A few lines below that, you'll see a line that looks like

Code: Select all

#$db->debug = true;
Delete the "#" character. Save the file.

Now you'll get all the ugly mysql errors in all their glory :)

Good Luck!
___Samuel___

Re: Can't connect to MySQL

Posted: Fri Oct 07, 2005 11:50 am
by wientanz
Hmmm.... Changed the install.php as suggested (THX by the way!)

Error message reads: "mysql14.powweb.com: Access denied for user 'Stefan_cms'@'66.152.98.71' (using password: YES)"

I am SURE I'm using the right username & password....

Any suggestions?

Re: Can't connect to MySQL

Posted: Fri Oct 07, 2005 11:55 am
by wientanz
Don't ask me why...

I just tried it for the 100th time and it just worked! Whatever it was, thanks to everyone involved!

Re: Can't connect to MySQL

Posted: Wed Jan 25, 2006 10:57 pm
by Joff
Just had this problem myself and managed to resolve it.

My host uses port 3336 for mySQL, not 3306.  So naturally, I specified this in the installation process.

On debugging the "showPageFour" function above, I noticed the port field wasn't being used!

So back on the installation setup form, I specified the hostname as "localhost:3336" where it had previously just been "localhost".

Lo and behold, the page then fills up with all of the debug code of a successful installation!  ;D