473,809 Members | 2,728 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Logging Queries on mysql with FreeBSD

Hi,
I am trying to set up my mySQL server on FreeBSD to log every query a
user runs. I understand I must edit the my.cnf file. But one does not
exist for my install. I installed mySQL from the FreeBSD packages and
for some reason, it did not create a my.cnf file in /etc or anywhere.
Where can I set it up to log every query a user runs?

Mar 20 '06 #1
1 2611
"ZacT1984" <zt******@gmail .com> wrote in message
news:11******** **************@ g10g2000cwb.goo glegroups.com.. .
Hi,
I am trying to set up my mySQL server on FreeBSD to log every query a
user runs. I understand I must edit the my.cnf file. But one does not
exist for my install. I installed mySQL from the FreeBSD packages and
for some reason, it did not create a my.cnf file in /etc or anywhere.
Where can I set it up to log every query a user runs?


Correct, the my.cnf file does not exist in a default installation. You have
to create it.

The my.cnf file typically resides either in /etc or in $MYSQL_HOME (aka the
data-directory).
You can also specify the location of a supplementary options file when
invoking mysqld (e.g. within the mysqld_safe script) using
option --default-extra-file=<path>.

See http://dev.mysql.com/doc/refman/5.0/...ion-files.html for more
information on the location and format of the option files.

You can also enable the General Query Log using command-line arguments to
mysqld, without editing the my.cnf file; see
http://dev.mysql.com/doc/refman/5.0/en/query-log.html. However, to enable
this by default you'd probably want to edit the mysqld_safe script that
invokes mysqld. It's better to use the my.cnf file, so that the options
will take effect automatically when MySQL starts.

Regards,
Bill K.
Mar 20 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1468
by: Morten Gulbrandsen | last post by:
Dear mysql users, in the tutorial of the documentation I found an interesting example of a complicated non trivial sql query: URL: http://www.mysql.com/documentation/mysql/bychapter/manual_Tutorial.html# example-Maximum-column-group-row 3.7 Queries from Twin Project
0
4102
by: Yann GAUTHERON | last post by:
Hi, ID_LOGIN is an integer Can anyone say me if this : WHERE index1=ID_LOGIN OR index2=ID_LOGIN must be slower than those 2 queries :
0
1843
by: Christian.Gruber | last post by:
>Description: It would be nice if general query logging could be switched on and off while the MySQL server is running, and not only at startup time. While debugging an application that uses foreign database access libraries, this would be very helpful. One could switch on logging, perform an activity, switch off logging, and look what has happened. Otherwise, the server has to be restarted to change logging, which is a bit annoying......
0
1888
by: Moritz Steiner | last post by:
Ok, but this only works for the current session, if I close and restart = the client the settings are reset... -----Urspr=FCngliche Nachricht----- Von: Victoria Reznichenko =20 Gesendet: Mittwoch, 16. Juli 2003 11:19 An: mysql@lists.mysql.com Betreff: Re: switch query logging while the server is running
4
1582
by: CK | last post by:
Hi all I am running Red Hat and MySQL, I am needing to make it that mysql logs all queries done on the server, at the moment my /etc/my.cnf file looks like this. datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock
1
121540
by: jiing | last post by:
Now let me describe what I have done and my purpose: Originally, I want to user ports to install phpBB But I found that phpBB doesn't support mysql 5.x (but the ports installed mySQL 5.0.0 alpha) so I deinstall mysql5-server and mysql5-client And then I install mysql41-server and mysql41-client on FreeBSD 5.3 by ports but now , mysql is not workable
5
1927
by: My SQL | last post by:
Hi, I started the general query log with mysqld --log On my machine this command works fine and every select, update and all statements are logged. I tried the same command on another machine and many many queries are missing, I am running apache, PHP on that machine and all the queries come through the web on localhost.
0
6694
by: Chrom_ | last post by:
Mysql is filling my /var partition because the log limit doesn't seem to be respected. I've tried many different settings in /etc/mysql/my.cnf but nothing works. Logrotate is not enabled/configured. I just want mysql to use a maximum of, let's say, 1GB of my /var partition The log is /var/log/mysql/
2
1808
by: Frank Aune | last post by:
Hi, Explaining this problem is quite tricky, but please bear with me. Ive got an application which uses MySQL (InnoDB) for two things: 1. Store and retrieve application data (including viewing the application log) 2. Store the application log produced by the python logging module The connection and cursor for the two tasks are completely separate, and they
0
9601
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
10637
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
10379
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,...
0
9199
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5550
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
5687
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4332
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
2
3861
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3014
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.