Login mysql errors

Rafal

New member
Joined
Jul 3, 2018
Messages
2
Hey,

How is it with this Centos and logging mysql errors?

So far I've been working on Debian and I had logs at /usr/local/mysql/data/server.hostname.com.err

They were full of logs from the very start, etc.

Centos from what I read should have in

/var/lib/mysql/server.hostname.com.err

However, this file with the mysql logo does not exist.

Any idea how to enable login?
 
Does the log not exist? Is mysql even running then?
Which Centos version are you using? 6 or 7?

Normally you can put:
Code:
log-warnings = 2
in the [mysqld] section of /etc/mysql/my.cnf

I presume you do have a my.cnf there with a symlink to /etc/my.cnf?
 
hi

Hey, I added log-warnings = 2 but it did not help.

I have a centos 7

my file /etc/my.cnf:

[Mysqld]
local-infile = 0
tmpdir = / dev / shm
bind-address = 127.0.0.1
skip-name-resolve
skip-host-cache
slow-query-1 = log
log-warnings = 2
long_query_time = 0
slow-query-log-file = / var / log / MySQL slow.log
socket = / var / lib / MySQL / mysql.sock
# Character-set-server = utf8
# Collation-server = utf8_polish_ci

Below the mysql directory, as you can see, there is no file with logs:

pwd
/ Var / lib / mysql
[root @ vps462 mysql] # ls -l
together 116808
-rw-rw ---- 1 mysql mysql 16384 07-03 17:57 aria_log.00000001
-rw-rw ---- 1 mysql mysql 52 07-03 17:57 aria_log_control
drwx ------ 2 mysql mysql 4096 2017-10-07 da_roundcube
-rw-rw ---- 1 mysql mysql 18874368 07-03 18:01 ibdata1
-rw-rw ---- 1 mysql mysql 50331648 07-03 18:01 ib_logfile0
-rw-rw ---- 1 mysql mysql 50331648 2017-10-02 ib_logfile1
-rw-rw ---- 1 mysql mysql 0 2017-10-02 multi-master.info
drwx - x - x 2 mysql mysql 4096 2017-10-02 mysql
srwxrwxrwx 1 mysql mysql 0 07-03 17:57 mysql.sock
-rw-r - r-- 1 root root 15 2017-10-02 mysql_upgrade_info
drwx ------ 2 mysql mysql 4096 2017-10-02 performance_schema
-rw-rw ---- 1 mysql mysql 24576 07-03 17:57 tc.log
-rw-rw ---- 1 mysql mysql 6 07-03 17:57 vps462.pid
-rw-rw ---- 1 mysql mysql 4 01-05 23:08 vpsdlada.pid
 
Oke then I don't know.

Jut to be sure... the spaces in the directory's like:
tmpdir = / dev / shm
are copy/paste errors or done one purpuse correct? They are without spaces in the cnf file like:
tmpdir = /dev/shm
like it should be? I presume it all is like should be, just noticed it.

You can also check if it's not logged into systemd log for some reason by this command:
journalctl -u mariadb

If you're not using MariaDB but installed Mysql from rpm, it can be a bug which is present in with some Mysql versions in Centos 7.

Try to state the logfile in the my.cnf under the [mysqld] part like this:
Code:
log-error=/var/lib/mysql/mysql-error.log
Save and restart mysql, check if a mysql-error.log is made, if yes, you're fine now and it was the bug. If not.. then I don't know.
 
Back
Top