Connecting to strange IP address (so access denied) after update

Get help with installation and running phpBB 3.1.x here. Please do not post bug reports, feature requests, or extension related questions here.
Get Involved
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: phpBB 3.1.x is at its End of Life stage and support will NOT be provided after July 1st, 2018.
steve59
Registered User
Posts: 53
Joined: Mon Jun 01, 2015 9:32 am

Connecting to strange IP address (so access denied) after update

Post by steve59 » Fri Sep 11, 2015 3:56 pm

We try to upgrade from 3.0.14 to 3.1.5.

As decribed in the instructions for updating, we didn't change config.php in the root of our forum.

The problem occurs when we try to run install/database_update.php:

We get a connection error of the type:

Access denied for user ****@'10.***** (using password: YES)

Fact is, the database-address, 10.**** is unfamilair to us and to our hosting partner,
and it definitely isn't the address specified in our config.php

Where does this address come from, and how to fix this issue?

We kindly thank i advance anyone with tips.

Best regards,
Steve

User avatar
Oyabun1
Former Team Member
Posts: 23162
Joined: Sun May 17, 2009 1:05 pm
Location: Australia
Name: Bill

Re: Connecting to strange IP address (so access denied) after update

Post by Oyabun1 » Fri Sep 11, 2015 9:59 pm

Open the board’s /cache folder on the server and delete everything except index.htm and .htaccess. Then try the database update again.
                      Support Request Template
3.0.x: Knowledge Base Styles Support MOD Requests
3.1.x: Knowledge BaseStyles SupportExtension Requests

steve59
Registered User
Posts: 53
Joined: Mon Jun 01, 2015 9:32 am

Re: Connecting to strange IP address (so access denied) after update

Post by steve59 » Sat Sep 12, 2015 5:35 am

Dear Oyabun,

We already deleted /cache and that did not help.

In fact we deleted the complete old forum (3.0.14) files, as described in the tekst
"upgrading from 3.0 to 3.1", except for:
config.php file
images/
files/
store/

Then we uploaded a fresh install of version 3.1.5, except the files and directories mentioned above.

After this we tried to run install/database_update.php, with the errror as result

Steve

User avatar
Lumpy Burgertushie
Registered User
Posts: 66340
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Connecting to strange IP address (so access denied) after update

Post by Lumpy Burgertushie » Sat Sep 12, 2015 1:02 pm

show us what is in your config.php file except for the password.


robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

steve59
Registered User
Posts: 53
Joined: Mon Jun 01, 2015 9:32 am

Re: Connecting to strange IP address (so access denied) after update

Post by steve59 » Sun Sep 13, 2015 8:59 pm

Hello Robert,
below our config.php:

// phpBB 3.0.x auto-generated configuration file
// Do not change anything in this file!
$dbms = 'mysqli';
$dbhost = '10.0*****'; // connects wrongly to 10.3!****
$dbport = ''; // so empty
$dbname = '*******';
$dbuser = '******';
$dbpasswd = '******';
// change dbhost, dbname, dbuser, dbpasswd when upload to real site
$table_prefix = 'phpbb3_';
$acm_type = 'file';
$load_extensions = ''; // so empty
@define('PHPBB_INSTALLED', true);

We made some extra checks:
1. The directories that we kept from our phpbb3-version 3.0.14, before we tried to update to 3.1.5
images/, files/, store/
do not contain any strange files making redirects or something,
we only found htm-files (those are empty), jpg-files, gif-files and .htaccess files

2. In a dump from our database we could not find the IP adress (10.3*****) that we are wrongly connected to when we run /install/database_update.php

Steve

User avatar
Oyabun1
Former Team Member
Posts: 23162
Joined: Sun May 17, 2009 1:05 pm
Location: Australia
Name: Bill

Re: Connecting to strange IP address (so access denied) after update

Post by Oyabun1 » Sun Sep 13, 2015 10:03 pm

steve59 wrote:2. In a dump from our database we could not find the IP adress (10.3*****) that we are wrongly connected to when we run /install/database_update.php
For phpBB the address of the database server is never stored in the database. It is taken from the config.php file and temporarily cached.

If the dbhost value in the config.php file is correct, the /cache has been cleared, but the dbhost value is still changing, there must be something server side that is redirecting it.
                      Support Request Template
3.0.x: Knowledge Base Styles Support MOD Requests
3.1.x: Knowledge BaseStyles SupportExtension Requests


User avatar
Lumpy Burgertushie
Registered User
Posts: 66340
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Connecting to strange IP address (so access denied) after update

Post by Lumpy Burgertushie » Sun Sep 13, 2015 11:28 pm

does your host require you to put a IP address in the database server spot?

most of the time you either leave it blank or put "localhost" in it.
and even when they require a specific server name it is usually not just an IP address.

robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

steve59
Registered User
Posts: 53
Joined: Mon Jun 01, 2015 9:32 am

Re: Connecting to strange IP address (so access denied) after update

Post by steve59 » Mon Sep 14, 2015 10:32 am

Oyabun: If the dbhost value in the config.php file is correct, the /cache has been cleared, but the dbhost value is still changing, there must be something server side that is redirecting it.
Hi Oyabun,

What do you mean?

All the files in our phpbb folder are new (from a download of the 3.1.5. package at phpbb.com), except for the ones in /images (but as I posted earlier, we found nothing peculair in that folder).

We made a test script, in which we included /config.php of phpbb and used the parameters in it to make a database connection ourselves (with success)

We also tried, as Robert suggested, changing the IP-address for @dbhost in localhost and we tried what happened when we left it empty. In both cases, we got the following error:
SQL ERROR [ mysqli ]
Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'

Steve

User avatar
Mick
Support Team Member
Support Team Member
Posts: 21156
Joined: Fri Aug 29, 2008 9:49 am
Location: Watching cricket - definitely

Re: Connecting to strange IP address (so access denied) after update

Post by Mick » Mon Sep 14, 2015 11:24 am

Please fill out the Support Request Template and post it back here to enable us to assist you better.
"The more connected we get the more alone we become" - Kyle Broflovski

steve59
Registered User
Posts: 53
Joined: Mon Jun 01, 2015 9:32 am

Re: Connecting to strange IP address (so access denied) after update

Post by steve59 » Mon Sep 14, 2015 3:47 pm

Update: We changed the database port to 80 in config.php
(this field was empty, which used to work fine)

Now we get a different error when we run /install/database_update.php:

Can't connect to MySQL server on '10.0*****'

Now the IP adres of the database is ok, so it didn't change anymore to 10.3******,
maybe that helps someone in finding the cause of our problem?

Steve

User avatar
Lumpy Burgertushie
Registered User
Posts: 66340
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Connecting to strange IP address (so access denied) after update

Post by Lumpy Burgertushie » Mon Sep 14, 2015 5:20 pm

the database port should be left blank normally.
or, if using mysql it should normally be set to 3306

most of these problems are going to be at your hosting server setup and you really need to contact them.

ask for level two support as the ones that initially answer the phone/chat don't really know what is going on at the server level.

robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

steve59
Registered User
Posts: 53
Joined: Mon Jun 01, 2015 9:32 am

Problems with special sign database name?

Post by steve59 » Tue Sep 15, 2015 8:14 am

I think we did found the root cause:
the new php-software has problems reading the database-name.

In a separate testscript, and (seperately) in config.php file of phpbb, we deliberately changed
the database-name to a wrong name.

This generates exactly the same error as in our first post about this subject.
Access denied for user '*****'@'10.3****',
including the same 'wrong' IP database-address.

So, that is not really the problem, but the result you get when the database-name is
wrong or unreadable for the software

Could it be that the problem is that the newest phpbb-software has problems with
special signs in the database name (als previously reported for the database password)?

Steve

User avatar
KevC
Support Team Member
Support Team Member
Posts: 69117
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK
Contact:

Re: Connecting to strange IP address (so access denied) after update

Post by KevC » Tue Sep 15, 2015 8:48 am

steve59 wrote:In a separate testscript, and (seperately) in config.php file of phpbb, we deliberately changed
the database-name to a wrong name.
If the database name is wrong, you don't get that error. You get one saying unknown database, not access denied.

Note that you need to clear the cache for a config.php change to take effect.
steve59 wrote:Could it be that the problem is that the newest phpbb-software has problems with
special signs in the database name (als previously reported for the database password)?
I just changed my test database name to !@$%^&*? and it worked fine.
Certain characters will not work but you get a connection error not an access one.
-:|:- Support Request Template -:|:-
Image
Cheap UK Hosting
"In the land of the blind the little green bloke with no pupils is king - init!"

steve59
Registered User
Posts: 53
Joined: Mon Jun 01, 2015 9:32 am

Re: Connecting to strange IP address (so access denied) after update

Post by steve59 » Tue Sep 15, 2015 9:49 am

Hi Kevc,

Very kind of you that you help us and even perform tests to do this!
KevC: If the database name is wrong, you don't get that error. You get one saying unknown database, not access denied.
At least in our case you get the error I mentioned, because we wrote a separate script (outside phpbb) which tries to connect to the database with an incorrect database name (and everything else ok)
$link = mysql_connect ($server, $username, $password) is then ok as expected,
but
mysql_select_db($databasename, $link) throws the error
Access denied for user '******'@'10.3*****' to database 'wrong DB-name'

I agree with you that the error is strange, you would expect the error you mentioned: unknown database
We contacted our hosting provider about this.

You seem to have a script which tests phpbb-database names, would you be so kind to test a
name with an underscore _ sign in it?

Besides that we got the error when we were running an update (install/database_update.php). Might that give other results?
(because this file is not a part of an operational phpbb-forum)

The update version we use is 3.1.5. (I saw that 3.1.6. became available last weekend, please let us know if we should try that one to update our 3.0.14 forum)

Steve

Locked

Return to “[3.1.x] Support Forum”