Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

There are different types of logs which are determined by the following global MySQL variables:

If you would like to read the error log file, try this command:

sudo tail -f $(mysql -Nse "SELECT @@GLOBAL.log_error")

then hit Control-C when finish.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .