SQL ERROR [ mysqli ] - Connection timed out [2002]

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
Knubbi
Registered User
Posts: 77
Joined: Mon Jul 07, 2003 11:55 am

SQL ERROR [ mysqli ] - Connection timed out [2002]

Post by Knubbi » Thu May 24, 2018 7:04 pm

Without changing anything myself, the forum v3.2.2 starts throwing error "SQL ERROR [ mysqli ] - Connection timed out [2002]".

Neither changing "config.php" to:

$dbms = 'mysql';
$dbms = 'mysqli';
$dbms = 'phpbb\\db\\driver\\mysqli';

solves the issue.

MySQL 5.5 database phpMyAdmin info:

Database Server:

Server: infongd-euXXXX via TCP/IP
Server-Typ: MySQL
Server Version: 5.5.60-0+deb7u1 - (Debian)
Protokoll-Version: 10
User : XX
Server char set: UTF-8 Unicode (utf8)

Webserver:

Apache/2.2.22
Database-Client Version: libmysql - mysqlnd 5.0.10 - 20111026 - $Id: XX
PHP-Extension: mysqli

Contents of "/phpbb/db/driver":
db.png

I am out of luck. Any clue how to fix it would be so much appreciated.

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

Re: SQL ERROR [ mysqli ] - Connection timed out [2002]

Post by Lumpy Burgertushie » Thu May 24, 2018 7:08 pm

if you truly did not make any changes then that leaves your host changing something. files do not change themselves so it wasnt' anything phpbb related.

first, put the config.php file back like it should be:

Code: Select all

$dbms = 'phpbb\\db\\driver\\mysqli';
then contact your host and ask what they changed lately. ask for level two support, the ones that answer phones and chats etc. don't really know much.


robert
I am available for custom work on a donation basis. Please send me a PM with your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

OK, so what's the speed of dark?

Knubbi
Registered User
Posts: 77
Joined: Mon Jul 07, 2003 11:55 am

Re: SQL ERROR [ mysqli ] - Connection timed out [2002]

Post by Knubbi » Thu May 24, 2018 7:13 pm

Thanks. Strangely, enough, when the forum worked earlier in the morning, it was set to:
$dbms = 'mysql';

I will check with the hoster. Life doesn't make any sense without the forum anymore - So, any additional hint would be appreciated.

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

Re: SQL ERROR [ mysqli ] - Connection timed out [2002]

Post by Lumpy Burgertushie » Thu May 24, 2018 7:51 pm

either one will work unless/until you get updated to php 7+ ( not phpbb, php ).


robert
I am available for custom work on a donation basis. Please send me a PM with your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

OK, so what's the speed of dark?

Knubbi
Registered User
Posts: 77
Joined: Mon Jul 07, 2003 11:55 am

Re: SQL ERROR [ mysqli ] - Connection timed out [2002]

Post by Knubbi » Fri May 25, 2018 8:27 am

Wow, this is interesting news. With a decent amount of surprise, I found, that our hosting seem to have been upgraded to PHP 7.1.

I am not experienced with this stuff. I am using the latest PHPBB version 3.2.2. Is it PHP 7.1 compatible?

What would be my next steps, please?

User avatar
Mick
Support Team Member
Support Team Member
Posts: 20095
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff

Re: SQL ERROR [ mysqli ] - Connection timed out [2002]

Post by Mick » Fri May 25, 2018 9:45 am

Knubbi wrote:
Fri May 25, 2018 8:27 am
Is it PHP 7.1 compatible?
phpBB 3.2.2 Release - Please Update wrote:PHP 7.2 is now supported by phpBB 3.2
"The more connected we get the more alone we become" - Kyle Broflovski

There are no ‘threads’ in phpBB, they are topics.

Knubbi
Registered User
Posts: 77
Joined: Mon Jul 07, 2003 11:55 am

Re: SQL ERROR [ mysqli ] - Connection timed out [2002]

Post by Knubbi » Fri May 25, 2018 8:55 pm

OK, I changed to PHP 5.6 and $dbms = 'mysql' and the forum works.

If I use $dbms = 'mysqli', the forum does'nt work with PHP 5.6.

Any clue how to troubleshoot this?

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

Re: SQL ERROR [ mysqli ] - Connection timed out [2002]

Post by Lumpy Burgertushie » Fri May 25, 2018 9:05 pm

If mysqli does not work with php 7 then you need to contact your host.

if mysql does not work with php7 that is normal because it has been deprecated in php7

remember, that the only way to know for sure what version of php your board is running is to run a phpinfo.php file from the board directory.

in the phpbb install folder is that file.
upload it and access it in the browser to find out for sure what version of php your board us running.


robert
I am available for custom work on a donation basis. Please send me a PM with your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

OK, so what's the speed of dark?

Knubbi
Registered User
Posts: 77
Joined: Mon Jul 07, 2003 11:55 am

Re: SQL ERROR [ mysqli ] - Connection timed out [2002]

Post by Knubbi » Sat May 26, 2018 2:38 pm

Like this?
mysql.png

User avatar
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 24715
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Re: SQL ERROR [ mysqli ] - Connection timed out [2002]

Post by Paul » Sat May 26, 2018 3:09 pm

Knubbi wrote:
Fri May 25, 2018 8:55 pm
OK, I changed to PHP 5.6 and $dbms = 'mysql' and the forum works.

If I use $dbms = 'mysqli', the forum does'nt work with PHP 5.6.

Any clue how to troubleshoot this?
Not providing a error makes it nearly impossible to troubleshoot. The error in the first post is not related to mysql or mysqli, but more a server issue.
Knock knock
Race condition
Who's there?

My BlogMy Photosmy phpBB Extensionscustom phpBB work & Development

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

Re: SQL ERROR [ mysqli ] - Connection timed out [2002]

Post by Lumpy Burgertushie » Sat May 26, 2018 4:47 pm

that is the correct file , however you have posted about mysql and the question is what version of php you are running. that would be at the very top of that page.

the problem is that quite often the version of php shown in your hosting control panel is not correct for the place where you are running your board.
therefore, you may think you are at php 5.6 but your board may actually be running on php7 .

it that were the case, then you would have to put mysqli in your config.php file for the board to work.

if that is the case and you still get errors about mysql/mysqli then that means that your host needs to fix the server setup .

robert
I am available for custom work on a donation basis. Please send me a PM with your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

OK, so what's the speed of dark?

Post Reply

Return to “[3.2.x] Support Forum”

Who is online

Users browsing this forum: Lumpy Burgertushie, Sillz, Yandex [Bot] and 32 guests