473,402 Members | 2,055 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,402 software developers and data experts.

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 2598
"ZacT1984" <zt******@gmail.com> wrote in message
news:11**********************@g10g2000cwb.googlegr oups.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
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:...
0
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
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...
0
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:...
4
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...
1
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...
5
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...
0
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...
2
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.