473,734 Members | 2,289 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MySQL won't create a slow query log

2 New Member
Posted by Pratchaya:
------------------------------------------------------
MySQL Slow Log ERROR
In my.cnf

i add these lines

#######
log-bin
log-slow-queries = /var/log/mysqld-slow.log
long_query_time =1
#######

But I can't use slow-log
cause i see mysqld.log
i found

########
070211 20:04:25 mysqld started
^G/usr/libexec/mysqld: File '/var/log/mysqld-slow.log' not found
(Errcode: 13)
070211 20:04:25 [ERROR] Could not use /var/log/mysqld-slow.log for
logging (error 13). Turning logging off for the whole duration of the
MySQL server process. To turn it on again: fix the cause, shutdown the
MySQL server and restart it.
/usr/libexec/mysqld: ready for connections.
Version: '4.1.20-log' socket: '/var/lib/mysql/mysql.sock' port: 0
Source distribution
########


but in the directory /var/log i have "mysqld-slow.log" file


Anyone can help me ?
Thank you very much
Prat.


PS. /var/log/

[root@ict log]# ls -l
total 1192
-rw-r----- 1 root root 1037 Feb 9 22:52 acpid
-rw------- 1 root root 15041 Feb 9 18:50 anaconda.log
-rw------- 1 root root 23671 Feb 9 18:50 anaconda.syslog
-rw------- 1 root root 41403 Feb 9 18:50 anaconda.xlog
drwxr-x--- 2 root root 4096 Apr 20 2006 audit
-rw------- 1 root root 1144 Feb 11 20:04 boot.log
-rw------- 1 root root 32335 Feb 11 04:03 boot.log.1
drwxr-xr-x 2 clamav clamav 4096 Feb 11 18:23 clamav
-rw------- 1 root root 49761 Feb 11 21:55 cron
-rw------- 1 root root 90791 Feb 11 04:03 cron.1
drwxr-xr-x 2 lp sys 4096 Feb 11 04:03 cups
-rw-r--r-- 1 root root 17238 Feb 9 22:51 dmesg
drwxr-xr-x 2 root root 4096 Feb 9 18:54 gdm
drwx------ 2 root root 4096 Feb 11 16:11 httpd
-r-------- 1 root root 146584 Feb 11 21:39 lastlog
drwx------ 2 root root 16384 Feb 10 01:34 lost+found
drwxr-xr-x 2 root root 4096 Feb 9 18:38 mail
-rw------- 1 root root 7898 Feb 11 21:30 maillog
-rw------- 1 root root 13381 Feb 11 04:03 maillog.1
-rw------- 1 root root 9139 Feb 11 21:39 messages
-rw------- 1 root root 213732 Feb 11 04:03 messages.1
-rw-r--r-- 1 root root 20448 Feb 11 21:50 mrtg.log
-rw-r----- 1 mysql mysql 7970 Feb 11 20:04 mysqld.log
-rw-r--r-- 1 mysql mysql 0 Feb 11 19:44 mysqld-slow.log
drwx------ 2 root root 4096 Nov 2 2004 ppp
-rw-r--r-- 1 root root 34155 Feb 10 04:02 prelink.log
-rw-r--r-- 1 root root 22816 Feb 11 04:03 rpmpkgs
-rw-r--r-- 1 root root 22816 Feb 10 04:02 rpmpkgs.1
drwx------ 2 root root 4096 Jul 11 2006 samba
-rw-r--r-- 1 root root 63050 Feb 9 18:43 scrollkeeper.lo g
-rw------- 1 root root 3352 Feb 11 21:39 secure
-rw------- 1 root root 4746 Feb 10 18:04 secure.1
-rw-r--r-- 1 root root 160 Feb 11 04:10 snmpd.log
-rw-r--r-- 1 root root 210 Feb 11 04:03 snmpd.log.1
-rw------- 1 root root 0 Feb 11 04:03 spooler
-rw------- 1 root root 0 Feb 9 18:36 spooler.1
drwxr-x--- 2 squid squid 4096 Nov 23 2005 squid
drwxr-xr-x 2 root root 4096 Oct 5 2004 vbox
-rw------- 1 root root 5067 Feb 11 18:04 vsftpd.log
-rw-rw-r-- 1 root utmp 90240 Feb 11 21:39 wtmp
-rw-r--r-- 1 root root 42734 Feb 9 19:23 Xorg.0.log
-rw-r--r-- 1 root root 34730 Feb 9 19:18 Xorg.0.log.old
Aug 31 '07 #1
2 10909
mezise
2 New Member
I had the same error about slow queries logging file. Maybe it is a bug with resolving
filepath string of log-slow-queries variable, because setting the value just to a file
name solved the problem.
So:
log-slow-queries = /var/log/mysql.slow.log # Does not work!
log-slow-queries = mysql.slow.log # Works! MySQL takes it from {datadir} directory

------------------------------------------------------
MYSQL:
protocol_versio n 10
version 5.0.27-log
version_bdb Sleepycat Software: Berkeley DB 4.1.24: (October 21, 2006)
version_comment Source distribution
version_compile _machine i686
version_compile _os redhat-linux-gnu
------------------------------------------------------
Aug 31 '07 #2
pbmods
5,821 Recognized Expert Expert
Heya, mezise. Welcome to TSDN!

Changed thread title to better describe the problem (did you know that threads whose titles do not follow the Posting Guidelines actually get FEWER responses?).

Make sure the file exists before starting mysqld. For some reason, mysqld doesn't seem to want to create the log files if they don't exist (the exception might be when saving in the data dir).
Aug 31 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1720
by: John R | last post by:
I found this old thread while looking for some type of compression solution myself. Long story short, I contacted Lester and ended up writing an LZO solution just as Mark had mentioned below. Thought this could also benifit someone out there so I'm reposting. Here's a link to the source code: http://www.servangle.net/udf_lzo/ BTW, Lester got his zlib implementation working as well. Hopefully these will both be posted on MySQL website...
0
3944
by: Mike Chirico | last post by:
Interesting Things to Know about MySQL Mike Chirico (mchirico@users.sourceforge.net) Copyright (GPU Free Documentation License) 2004 Last Updated: Mon Jun 7 10:37:28 EDT 2004 The latest version of this document can be found at: http://prdownloads.sourceforge.net/souptonuts/README_mysql.txt?download
11
17568
by: DJJ | last post by:
I am using the MySQL ODBC 3.51 driver to link three relatively small MySQL tables to a Microsoft Access 2003 database. I am finding that the data from the MySQL tables takes a hell of a long time to load making any kind linkage with my Access data virtually useless. I have the MySQL driver setup in as a USER DSN. The MySQL data is sitting out on a server and the Access database is running locally. The network connection is very...
4
18696
by: Gordon Burditt | last post by:
What's the easiest way to copy a row from one table to another (with the same schema), without knowing in advance the number and types of the columns? The problem: I have several sets of tables with a primary key of 'account', which contains an email address. If someone changes their email address, I need to change the 'account' field. Unfortunately, someone thought it would speed up lookups if instead of having one table 'settings',...
1
3379
by: jlee | last post by:
I'm pretty much a newbie on mysql, and I need some help. I am running mysql Ver 12.22 Distrib 4.0.24, for portbld-freebsd5.4 (i386) on a server hosting an active website. The site's developer uses his own php shopping cart to receive customer orders. The configuration was done via cPanel with no external modifications - which produced no protests when built, ran and connected with no
0
6635
by: Bucker | last post by:
Could someone view the following that I copied from phpMyAdmin and tell me from the statistics if are server is running OK? Does it look like we will have problems as more people hit our server? I'm not a db admin, so any help would be grateful. Regards,
8
2008
by: Daz | last post by:
Hi everyone. I was faced with the choice of whether my problem is indeed a PHP problem or a MySQL. I have decided it's a PHP problem as I don't experience the same problem when I execute the same query at the CLI. I am having trouble executing a large query through my PHP script. It takes about 7-11 seconds on average to execute, whereas the same query only takes 0.01 seconds to execute through the CLI.
9
1998
by: Derrick Shields | last post by:
I'm working with a database that has over 11 million rows. The .SQL drop file is about 2.5gigs. Doing a simple query: select * from people where last_name like '%smith%' A query like this can take up to two minutes. I've spent hours reading these forums and other sites on the internet, and I've figured that I need to do a couple things: create some indexes -and- possibly create some partitions
0
8948
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8780
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9456
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9246
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6742
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6035
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4553
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4816
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3264
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.