Bug #81182 [Opn->Nab]: Could not create a MySQLi connection
Edit report at https://bugs.php.net/bug.php?id=81182&edit=1
ID: 81182
Updated by: requinix@php.net
Reported by: list at understudy dot net
Summary: Could not create a MySQLi connection
-Status: Open
+Status: Not a bug
Type: Bug
Package: MySQLi related
Operating System: FreeBSD 12.2
PHP Version: 7.4.20
Block user comment: N
Private report: N
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions. Due to the volume
of reports we can not explain in detail here why your report is not
a bug. The support channels will be able to provide an explanation
for you.
Thank you for your interest in PHP.
If you installed PHP and MariaDB/"MySQL" through standard FreeBSD mechanisms (like pkg)
and did not install anything yourself manually (for example, by compiling locally) then you may need
to report this issue to FreeBSD and/or whoever maintains those packages.
But first, consider asking on StackOverflow or elsewhere to see if you made a mistake somewhere
during installation or configuration.
Previous Comments:
------------------------------------------------------------------------
[2021-06-20 22:03:31] list at understudy dot net
Description:
------------
Specs on system:
FBSD 12.2
PHP 7.4.20
MariaDB 10.5.10
Coppermine 1.6.10
phpmyadmin 4.9.7
Error from coppermine when trying to connect to database on install step 6
Could not create a MySQLi connection, please check the MySQLi details entered
Database error: No such file or directory
Through CLI DB is confirmed and working.
Tests on CLI and with port 3306 on localhost and 127.0.0.1 show ok.
Test also preformed with phpmyadmin which gave similar errors in their setup.
Issue: failure to connect to DB via mysqli through "localhost"
Possible solution implemented:
edit the following file:
/usr/local/etc/php/ext-20-mysqli.ini
add the following lines:
pdo_mysql.default_socket="/var/run/mysql/mysql.sock"
mysqli.default_socket="/var/run/mysql/mysql.sock"
This solution may only work for FBSD. It is uncertain if this solution will work with Linux or
Windows or if they are having this issue.
Test script:
---------------
NA
Expected result:
----------------
I would like to see if the ext-20-mysqli.ini needs to be modified in the ports/pkg for FBSD or if
this is an issue that may pertain to other OS systems out there.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=81182&edit=1
Thread (3 messages)