Where and how do you specify the mysql.sock location Where and how do you specify the mysql.sock location
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Where and how do you specify the mysql.sock location

Started by tonyofpureevil, October 13, 2019, 08:34:31 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

tonyofpureevil

My installation is purely local on a laptop.
This means web server, mysql (mariadb), and php are all installed locally.
mysql is configured to not use networking, so socket communication is necessary.
the webserver is chrooted so I need to configure the socket in cpg1.6.06 as seen by the webserver
I have already configured phpMyAdmin and WordPress to work this way with no problem
None of the configuration tricks used by those applications work for Coppermine.
I can find no Coppermine documentation that shows how to do this.

help

ron4mac


tonyofpureevil

localhost does not work as mysql is configured with NO network access allowed.

ron4mac


tonyofpureevil


tonyofpureevil

Oops! Replied too fast. The link in your post has the answer.  Will try and then report the result.

ron4mac

Of course a default socket needs be set in PHP


tonyofpureevil

Success!

edit /etc/php-7.3.ini
find the [MYSQLi] section and change default_host to localhost and default_socket to /your/path/to/mysql.sock
save the file and restart php73_fpm

In the Coppermine installer, blank the host field and enter your database username and password

Of course, this only works if you just have one application that uses the default values.
Fortunately, my other applications let me specify the socket location!