Hi,
I have installed MariaDB using
The server start well but when I try to run
Where does the system pull the /tmp/mysql.sock path from as my my.cnf file has
Here is the full file:
I have installed MariaDB using
pkg install mariadb100-server
and created a /usr/local/etc/my.cnf file.The server start well but when I try to run
/usr/local/bin/mysql_secure_installation
, I get the following error:
Code:
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none):
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2 "No such file or directory")
Code:
socket = /var/db/mysql/mysql.sock
Code:
# Generated by Percona Configuration Wizard (http://tools.percona.com/) version REL5-20120208
# Configuration name trinity_mariaDB_server generated for fred@trinitech.co.uk at 2016-02-05 11:50:41
[client] # The following options will be passed to all MariaDB clients
#password = your_password
port = 3306
default-character-set=utf8
[mysql]
no-auto-rehash
default-character-set=utf8
[mysqld] # The MariaDB server
# GENERAL #
user = mysql
port = 3306
socket = /var/db/mysql/mysql.sock
bind-address = 10.8.20.10
default-storage-engine = InnoDB
pid-file = /var/db/mysql/mariadb.mydomain.co.uk.pid
lc-messages-dir=/usr/local/share/mysql/english/ # Directory for the errmsg.sys file in the language you want to use
# UTF-8 encoding settings #
collation-server = utf8_unicode_ci
init-connect='SET NAMES utf8'
character-set-server = utf8
# MyISAM #
key-buffer-size = 32M
myisam-recover = FORCE,BACKUP
# SAFETY #
max-allowed-packet = 16M
max-connect-errors = 1000000
skip-name-resolve
sql-mode = STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_AUTO_VALUE_ON_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,ONLY_FULL_GROUP_BY
sysdate-is-now = 1
innodb = FORCE
innodb-strict-mode = 1
skip-symbolic-links
local-infile = 0
explicit_defaults_for_timestamp = TRUE
skip-innodb_doublewrite
# DATA STORAGE #
#datadir = /var/db/mysql/
innodb_data_home_dir = /var/db/mysql/mysql-innodb
innodb_log_group_home_dir = /var/db/mysql/mysql-innodb-logs
# BINARY LOGGING #
log-bin = /var/db/mysql/mysql-bin
expire-logs-days = 14
sync-binlog = 1
# CACHES AND LIMITS #
tmp-table-size = 32M
max-heap-table-size = 32M
query-cache-type = 0
query-cache-size = 0
max-connections = 500
thread-cache-size = 50
open-files-limit = 65535
table-definition-cache = 4096
table-open-cache = 10240
# INNODB #
innodb-flush-method = O_DIRECT
innodb-log-files-in-group = 2
innodb-log-file-size = 512M
innodb-flush-log-at-trx-commit = 1
innodb-file-per-table = 1
innodb-buffer-pool-size = 4G
# LOGGING #
log-error = /var/db/mysql/mysql-error.log
log-queries-not-using-indexes = 1
slow-query-log = 1
slow-query-log-file = /var/db/mysql/mysql-slow.log