I am using MariaDB 10 on Centos 7 and cannot find the [mysqld] section in my configuration file - mariadb

Centos 7
MariaDB 10.6.11
Where can I find the [mysql] section in /etc/my.cnf file
This is all i found in /etc/my.cnf file
#
# This group is read both by the client and the server
# use it for options that affect everything
#
[client-server]
#
# include *.cnf from the config directory
#
!includedir /etc/my.cnf.d
I want to access database server remotely which is required to add bind-address = 0.0.0.0 in /etc/my.cnf file

bind-address is a server option and needs to be added in section [server],[mysqld] or [mariadbd]. Group [mysql] is a client section used e.g. by command line client.
See also: Server Option Groups
The line
!includedir /etc/my.cnf.d
states, that my.cnf reads all configuration files from the /etc/my.cnf.d directory.
So check the configuration files in this directory. If there aren't any configuration files or none of them contains a group which will be read by server, add a new file server.cnf in /etc/my.cnf.d and add the group with bind address.

Related

Unable to change mariadb default data directory from /var/lib/mysql?

Unable to change default data directory: form /var/lib/mysql to /mydata/db/mysql
SELINUX disbaled
Reboot done
Configured at mariadb-server.cnf and also other necessary configuration done.
[mysqld]
datadir = /mydata/db/mysql
socket = /mydata/db/mysql/mysql.sock
pid-file = /run/mariadb/mariadb.pid
But after restart data directory not changing. What are the possible reason for this issue?

MariaDB lacks a conf file?

I have recently installed MariaDB on my server; however, it doesn't have the appropriate database settings for tweaking/tuning! Here is my "my.cnf":
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mariadb according to the
# instructions in http://fedoraproject.org/wiki/Systemd
[mysqld_safe]
log-error=/var/log/mariadb/mariadb.log
pid-file=/var/run/mariadb/mariadb.pid
#
# include all files from the config directory
#
!includedir /etc/my.cnf.d
Where are the other settings?? Such as thread, memory adjustment, etc.?
Add what you need. But generally you don't need any changes from the defaults until there is some kind of issue.

Nginx service not starting on Windows 10 - nginx: [alert] could not open error log file: CreateFile()

I have an Nginx service that's configured to start automatically on my Windows 10; however, this morning, the service wouldn't start.
The error log says: nginx: [alert] could not open error log file: CreateFile() "C:\someForlderName\build\distribution\.\nginx/logs/error.log" failed (3: The system cannot find the path specified)
Looking at the path in the error log above, I do NOT have the /logs/ folder on my local system so it looks like Nginx doesn't have the proper permissions to create that folder?
I'm setup as an admin user and my service is set to Log On As - Local System Account
This only happens on Windows 10; but the service starts and works on
older Windows i.e 8.1
So does anyone know how to grant administrator's permissions to Nginx so that Nginx can create folders and files on Windows 10 ?
You need:
To install nginx/Windows, download the latest mainline version distribution (1.13.8), since the mainline branch of nginx contains all known fixes. Then unpack the distribution, go to the nginx-1.13.8 directory, and run nginx. Here is an example for the drive C: root directory: (Run cmd as administrator)
cd c:\
unzip nginx-1.13.8.zip
cd nginx-1.13.8
start nginx
Go to: http://localhost:80 -> test install
Goback to console cmd: "nginx -s stop"
Run for next time:
Config with file: "C:\nginx-1.13.8\conf\nginx.conf"
Open cmd as administrator
Run bash: "cd C:\nginx-1.13.8"
Run nginx with bash: "start nginx" . If you run with bash: "nginx", will get trouble for exit nginx.
And
nginx -s stop #fast shutdown
nginx -s quit #graceful shutdown
nginx -s reload #changing configuration, starting new worker processes with a new configuration, graceful shutdown of old worker processes
nginx -s reopen #re-opening log files
Under the directory that you run nginx.exe, try to create a directory named logs, and a file named error.log under log.
It should pass this error.
After downloading zip file, you have unzip.
Make sure that you dont have nested folder names. You have to copy your folder which has nginx.exe file in it, and paste it into C:/ folder.
While running commands, like nginx -s stop, make sure that current your working directory is same as the nginx.exe file.
enter image description here
Nginx start on default port 80, not 8080. Try localhost:80 on browser.
If you want to change port, open C:\nginx-1.16.1\conf\nginx.conf with text editor.
change port number what you want use default port.
server {
listen 80;
server_name localhost;
to:
server {
listen 8080;
server_name localhost;
I had a similar issue with starting the nginx server, but after looking at it closely and trying to run the command in different consoles, I realized it just a simple issue of a missing path.
How I solved it was to cd into the containing folder for the nginx.exe file (which actually contains error logs and all the necessary files) and then run the nginx command which started the server and fixed it for me.

How do i setup munin plugin multiping

According to the plugin:
The following environment variables are used
ping_args - Arguments to ping (default "-c 2")
ping_args2 - Arguments after the host name (required for Solaris)
ping - Ping program to use
host - Host to ping
Configuration example
[multiping]
env.host www.example.org mail.example.org
where do i specify the [multiping]
You should write this configuration into a new file located in
/etc/munin/plugin-conf.d
or add these two lines at the end of file
/etc/munin/plugin-conf.d/munin-node

Xampp local Drupal install image path problems

I've got Drupal 6.19 installed locally in a xampp SUBDIRECTORY. Everything works great with the exception of the images are broken. The path being created is missing my subdirectory where Drupal is installed.
The path should start with:
http://localhost/drupal6.19/sites/default/files/
but is instead
http://localhost/sites/default/files.
I've tried setting base url in the setting php file and clearing my cache:
$base_url = 'http://localhost/drupal6.19';
did not work. I've also tried uncommenting this line in the htaccess file and clearing cache:
# RewriteBase /drupal6.19
nothing.
I'm running out of ideas. Any help?
I won't do a clean install as I've already spent a lot of time migrating content over and configuring the site. I need to get this fixed somehow...
Have you changes something in the hosts file. Its located at C:\Windows\System32\drivers\etc. The content of the file look like
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost

Resources