Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Hello I just installed MySQL on my Fedora from Source, with cmake,make,make install etc. It's working, but where can I find logs of the server? I have looked into /var/log, but there is nothing with mysql unfortunately.

/etc/my.cnf

# For advice on how to change settings please see
# 
# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
# *** default location during install, and will be replaced if you
# *** upgrade to a newer version of MySQL.

[mysqld]
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M

# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin

# These are commonly set, remove the # and set as required.
# basedir = .....
# datadir = .....
# port = .....
# server_id = .....
# socket = .....

# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M 

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES    
share|improve this question
    
Could you please specify version of MySQL and Fedora and if you configured some compilation parameters of MySQL? –  pabouk Oct 16 '13 at 17:19

1 Answer 1

If you have mysqld running you can inspect its open descriptors to see where it logs, for example using proc:

[root@localhost ~]# ls -l `pgrep mysqld | sed 's@.*@/proc/&/fd/@'` | grep log
l-wx------. 1 root root 64 Jul 23 10:47 1 -> /var/log/mysqld.log
l-wx------. 1 root root 64 Jul 23 10:47 2 -> /var/log/mysqld.log
lrwx------. 1 root root 64 Jul 23 10:47 8 -> /var/lib/mysql/ib_logfile0
lrwx------. 1 root root 64 Jul 23 10:47 9 -> /var/lib/mysql/ib_logfile1
[root@localhost ~]# 

In this case is /var/log/mysqld.log

share|improve this answer
    
When I did this it only list the ib_logfile0 and ib_logfile1, when i try to cat them, they are full of @@@@@@@@@@@@@ :/ –  CSharpBeginner Oct 16 '13 at 17:22
    
Looks like your mysql is not logging at all, then. The logfile0..1 are binary logfiles of db data, not human readable logfiles. –  cyberz Oct 16 '13 at 17:24
    
Check your my.cnf, for example on mine I have: log-error=/var/log/mysqld.log under the [mysqld_safe] section. –  cyberz Oct 16 '13 at 17:25
    
My my.cnf if almost empty, my mysql is running, I logged, create databases, tables, 2 users, logged with them, everything looked fine, i paste my "etc/my.cnf" in edit #1 –  CSharpBeginner Oct 16 '13 at 17:27
    
Add log-error=/var/log/mysqld.log in the [mysqld_safe] and restart MySQL server, it should log. Also ensure that the /var/log/mysqld.log is writable by the mysql user. –  cyberz Oct 16 '13 at 17:52

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.