Hi All,
Lets get the basics out of the way. FBSD 12.2, MariaDB 10.5.10 server and client, along with php 7.4.
The big issue appears to be that when trying to access the database for the coppermine gallery that it wants to use 127.0.0.1 solely instead of localhost. This does not bode well for coppermine and phpMyAdmin.
Lets take a look at the basics
/usr/local/etc/mysql/my.cnf
So lets see where things go wrong
When trying to do the install of coppermine one of the steps asks you to connect to the database. When I try to here is what I see
So I check on the cli of the server:
So I know from the cli I can see the DB and tables
Well let me check a different way:
Lets try it another way:
Well that worked.
When I try to connect via phpMyAdmin I get:
but the cli shows it is there.
How do I get the localhost recognized?
Lets get the basics out of the way. FBSD 12.2, MariaDB 10.5.10 server and client, along with php 7.4.
The big issue appears to be that when trying to access the database for the coppermine gallery that it wants to use 127.0.0.1 solely instead of localhost. This does not bode well for coppermine and phpMyAdmin.
Lets take a look at the basics
/usr/local/etc/mysql/my.cnf
Code:
#
# This group is read both by the client and the server
# use it for options that affect everything, see
# https://mariadb.com/kb/en/configuring-mariadb-with-option-files/#option-groups
#
[client-server]
port = 3306
socket = /var/run/mysql/mysql.sock
#
# include *.cnf from the config directory
#
!includedir /usr/local/etc/mysql/conf.d/
# bind address for localhost
[mysqld]
skip-networking
bind-address = 127.0.0.1
port = 3306
socket = /var/run/mysql/mysql.sock
ps -ax | grep mysql
Code:
19303 - Is 0:00.01 /bin/sh /usr/local/bin/mariadbd-safe --defaults-extra-file=/usr/local/etc/mysql/my.cnf --user=m
19448 - I 0:00.38 /usr/local/libexec/mariadbd --defaults-extra-file=/usr/local/etc/mysql/my.cnf --basedir=/usr/lo
19570 0 S+ 0:00.00 grep mysql
netstat -ln | grep mysql
Code:
fffff8043838e100 stream 0 0 fffff804c604f1e0 0 0 0 /var/run/mysql/mysql.sock
When trying to do the install of coppermine one of the steps asks you to connect to the database. When I try to here is what I see
Code:
The following errors were encountered and need to be corrected first:
Could not create a MySQLi connection, please check the MySQLi details entered
Database error: No such file or directory
So I check on the cli of the server:
Code:
root@nexus:~ # mysql -u photouser -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 6
Server version: 10.5.10-MariaDB FreeBSD Ports
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
photouser@localhost [(none)]> use photodb;
Database changed
photouser@localhost [photodb]> show tables;
+----------------------+
| Tables_in_photodb |
+----------------------+
| cpg143_albums |
| cpg143_banned |
| cpg143_bridge |
| cpg143_categories |
| cpg143_comments |
| cpg143_config |
| cpg143_dict |
| cpg143_ecards |
| cpg143_exif |
| cpg143_favpics |
| cpg143_filetypes |
| cpg143_hit_stats |
| cpg143_pictures |
| cpg143_plugins |
| cpg143_sessions |
| cpg143_temp_data |
| cpg143_usergroups |
| cpg143_users |
| cpg143_vote_stats |
| cpg143_votes |
| cpg15x_albums |
| cpg15x_banned |
| cpg15x_bridge |
| cpg15x_categories |
| cpg15x_categorymap |
| cpg15x_comments |
| cpg15x_config |
| cpg15x_dict |
| cpg15x_ecards |
| cpg15x_exif |
| cpg15x_favpics |
| cpg15x_filetypes |
| cpg15x_hit_stats |
| cpg15x_languages |
| cpg15x_pictures |
| cpg15x_plugins |
| cpg15x_sessions |
| cpg15x_temp_messages |
| cpg15x_usergroups |
| cpg15x_users |
| cpg15x_vote_stats |
| cpg15x_votes |
| cpg16x_albums |
| cpg16x_banned |
| cpg16x_bridge |
| cpg16x_categories |
| cpg16x_categorymap |
| cpg16x_comments |
| cpg16x_config |
| cpg16x_dict |
| cpg16x_ecards |
| cpg16x_exif |
| cpg16x_favpics |
| cpg16x_filetypes |
| cpg16x_hit_stats |
| cpg16x_languages |
| cpg16x_pictures |
| cpg16x_plugins |
| cpg16x_sessions |
| cpg16x_temp_messages |
| cpg16x_usergroups |
| cpg16x_users |
| cpg16x_vote_stats |
| cpg16x_votes |
| pics_albums |
| pics_banned |
| pics_bridge |
| pics_categories |
| pics_categorymap |
| pics_comments |
| pics_config |
| pics_dict |
| pics_ecards |
| pics_exif |
| pics_favpics |
| pics_filetypes |
| pics_hit_stats |
| pics_languages |
| pics_pictures |
| pics_plugins |
| pics_sessions |
| pics_temp_messages |
| pics_usergroups |
| pics_users |
| pics_vote_stats |
| pics_votes |
+----------------------+
86 rows in set (0.001 sec)
photouser@localhost [photodb]>
Well let me check a different way:
Code:
root@nexus:~ # mysql -h 127.0.0.1 -P 3306 -u photouser -p
Enter password:
ERROR 2002 (HY000): Can't connect to MySQL server on '127.0.0.1' (36)
root@nexus:~ #
Code:
root@nexus:~ # mysql -h localhost -P 3306 -u photouser -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 7
Server version: 10.5.10-MariaDB FreeBSD Ports
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
photouser@localhost [(none)]>
When I try to connect via phpMyAdmin I get:
Code:
mysqli_real_connect(): (HY000/2002): No such file or directory
How do I get the localhost recognized?