Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    MYSQL




How Do I Enable Logging?


I need to enable MySQL logging. I looked in the my.ini file and did not see any logging options. Where do I turn on logging? I am using Windows.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
How Do I Enable Binary Logging
I would like to enable binary logging on my database.Am using winXP The information i have talks of adding some lines to my.cnf file then restarting mysql.

Enable Mysql Logging
how common it is for production websites (sites that get used frequently) such as small online stores etc, to enable logging on the database end. Is it that common ? Seems like it might be a performance hit and maybe it might be a good idea only if one suspected something wasnt right (cyber attacks). Any php / mysql errors will be hopefully caught and logged by other means, so the only reason i see to log database action is for seeing just who is trying to get access.

How Do I Enable Query Logging? Is It Secure?
How do I enable query logging? I am using version 4.1.22-standard

MySQL 3 - How To Enable Tcp/ip?
I think that in my mySql named pipes are enabled by default. I need to enable tcp/ip now. Can somebody give me strict instructions how to do this?

Enable Warnings
If I try to insert a value such as 123456 into a tinyint field, it will just insert the largest value that that field can contain. I'm wondering if there is a setting in MySQL that will trigger an error/warning when this occurs instead. Something like ANSI_WARNINGS in MsSql.

Enable SSL Feature
I'd like to launch a mysql server with SSL protocol enabled. I'm working on
windows XP OS. I didn't find clear information about how to do that. In the
user manual I can find in the 5.6.7.2 section that I have to launch an
"@command{configure}" command with some options. The problem is : I can't
find a "configure" command. The only thing I'm able to find is a shell
script called "conf.sh" but I'm working on windows. Do I have to install
cygwin or that kind of stuff ? I've read somewhere else that I had to
compile mysql to be able to use it in SSL mode. I'm a bit lost with those
informations.

Enable Pooling On My Sql
How do i enable pooling on mysql connection?
this is my string.

DRIVER={MySQL ODBC 3.51 Driver};" +
"SERVER=dfdfd;" +
"DATABASE=dbname;" +
"UID=" + UserId +";" +
"PASSWORD=ff;" +
"OPTION=3

Enable InoDB Tables
I am running SuSE 9.0. I have installed, MySql 4.0.15. Apparantly versions
4.0 and above are supposed to come with InnoDB tables already enabled, this
is not the case with mine, the have_innodb variable is at NO.

I edit the my.cnf file to include the following as per mysql manual

innodb_data_file_path = ibdata1:10M:autoextend
set-variable = innodb_buffer_pool_size=70M
set-variable = innodb_additional_mem_pool_size=10M
set-variable = innodb_log_file_size=20M
set-variable = innodb_log_buffer_size=8M
innodb_flush_log_at_trx_commit=1

However when I try and start mysqld up again I get error messages saying
that all the variables are not recognised. These variables are mentioned
again and again in help files to enable innodb tables in MySql.

How To Enable Mime Type
Sorry for another post but how do I enable mime types for my mysql installation. I have looked in the config file and I cannot find it.

Way To Enable Csv Engine In Mysql5.0.27
I want to find if there is any way to enable csv engine in mysql5.0.27.The manual
says while configuring mysql use " --with-csv-storage-engine " but i'm not getting any idea from this.

Enable Remote Connections
When we connect to the database server on the same PC, we give the server as "localhost"
When I tried to connect to the database on another PC by giving the hostname as server it gives the error as

Access denied for user 'root'@'hostnmae'

Can someone tell me how do I make sure remote connections are open for this mysql database and how can I identify it from another PC?

Failed To Enable Constraints
I have a desktop application in Visual Basic .NET working with a MySQL database.
I got to populate the information from my database into the text fields on the form. I can navigate through the records (next, first, previous, last) BUT.. I can't get it to update the database.
I am getting the following message:

"Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints"

This is not a big table, it only has 8 fields (Name, lastname, address, city, zip, state, phonenumber) and the only non-null field that I am NOT INPUTTING manually on the form is the customerID(PK), which is supposed to be assigned automatically for mySql.

Enable/Disable (toggling) Triggers
I want to ENABLE/DISABLE my triggers time to time based upon certain conditions multiple times. How can I do that in MySQL ?

Enable Unicode In MySQL 4.1.0-alpha
I have read that Unicode (UTF-8) was not enabled by default in the
mysql-4.1.0-alpha binaries. How can I enable it? What should I change in the
code to do so?

Disable And Enable A Foreign Key In Mysql 5
i have created primary key / foreign keys...but then when I am trying to change
the data later, i am getting error, now i want to disable the foreign key,
change my data, and enable it again

but i am unable to find the correct syntax for this.

How To Enable Prefix Compression On MyISAM Indexes?
Anyone know? The manual suggests prefix compression (packing) is the default for all character type indexes, but "Packed" is always "NULL" in show indexes results...

mysql> show indexes from _1_log;
+--------+------------+-------------------+--------------+-------------------+-----------+-------------+----------+--------+------+------------+---------+
| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment |
+--------+------------+-------------------+--------------+-------------------+-----------+-------------+----------+--------+------+------------+---------+
| _1_log | 0 | PRIMARY | 1 | ID | A | 27456 | NULL | NULL | | BTREE | |
| _1_log | 1 | ip | 1 | ip | A | 3432 | NULL | NULL | YES | BTREE | |
| _1_log | 1 | countryCode | 1 | uniqueVisit | A | 2 | NULL | NULL | YES | BTREE | |
| _1_log | 1 | countryCode | 2 | countryCode | A | 188 | NULL | NULL | YES | BTREE | |
| _1_log | 1 | language | 1 | uniqueVisit | A | 2 | NULL | NULL | YES | BTREE | |
| _1_log | 1 | language | 2 | language | A | 85 | NULL | NULL | YES | BTREE | |
| _1_log | 1 | browserFamily | 1 | uniqueVisit | A | 2 | NULL | NULL | YES | BTREE | |
| _1_log | 1 | browserFamily | 2 | browserFamily | A | 42 | NULL | NULL | YES | BTREE | |
| _1_log | 1 | browser | 1 | uniqueVisit | A | 2 | NULL | NULL | YES | BTREE | |
| _1_log | 1 | browser | 2 | browserFamily | A | 42 | NULL | NULL | YES | BTREE | |
| _1_log | 1 | browser | 3 | browserVersion | A | 76 | NULL | NULL | YES | BTREE | |
| _1_log | 1 | os | 1 | uniqueVisit | A | 2 | NULL | NULL | YES | BTREE | |
| _1_log | 1 | os | 2 | os | A | 25 | NULL | NULL | YES | BTREE | |
| _1_log | 1 | resolution | 1 | uniqueVisit | A | 2 | NULL | NULL | YES | BTREE | |
| _1_log | 1 | resolution | 2 | resolution | A | 83 | NULL | NULL | YES | BTREE | |
| _1_log | 1 | depth | 1 | uniqueVisit | A | 2 | NULL | NULL | YES | BTREE | |
| _1_log | 1 | depth | 2 | depth | A | 10 | NULL | NULL | YES | BTREE | |
| _1_log | 1 | javascriptEnabled | 1 | uniqueVisit | A | 2 | NULL | NULL | YES | BTREE | |
| _1_log | 1 | javascriptEnabled | 2 | javascriptEnabled | A | 4 | NULL | NULL | YES | BTREE | |
| _1_log | 1 | searchEngine | 1 | uniqueVisit | A | 2 | NULL | NULL | YES | BTREE | |
| _1_log | 1 | searchEngine | 2 | searchEngine | A | 13 | NULL | NULL | YES | BTREE | |
| _1_log | 1 | uniqueVisit | 1 | uniqueVisit | A | 2 | NULL | NULL | YES | BTREE | |
| _1_log | 1 | visitorId | 1 | visitorId | A | 5491 | NULL | NULL | YES | BTREE | |
+--------+------------+-------------------+--------------+-------------------+-----------+-------------+----------+--------+------+------------+---------+
23 rows in set (0.00 sec)
This is MySQL 5.0.27.

Enable Root Access From Remote Machines?
I just setup MySQL5 on a Windows 2003 dedicated box and one of the last questions in the Instance Configuration Wizard had a check box labeled: "Enable Root Access From Remote Machines".

I did some research but could not figure out what that meant. I log on to my box using Remote Desktop so if I don't check this will I able able to have root access?

I am guessing this is a security issue. I want my box to be as safe as I can.

Here is how I have the MySQL config file setup (from the Instance Configuration wizard):

port=3306
basedir="C:/Program Files/MySQL/MySQL Server 5.0/"
datadir="C:/Program Files/MySQL/MySQL Server 5.0/Data/"
default-character-set=latin1
default-storage-engine=INNODB
sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
max_connections=100
query_cache_size=49M
table_cache=256
tmp_table_size=52M
thread_cache_size=8
myisam_max_sort_file_size=100G
myisam_max_extra_sort_file_size=100G
myisam_sort_buffer_size=103M
key_buffer_size=76M
read_buffer_size=64K
read_rnd_buffer_size=256K
sort_buffer_size=256K
innodb_data_home_dir="C:/MySQL Datafiles/"
#skip-innodb
innodb_additional_mem_pool_size=4M
innodb_flush_log_at_trx_commit=1
innodb_log_buffer_size=1524K
innodb_buffer_pool_size=148M
innodb_log_file_size=30M
innodb_thread_concurrency=8

How To Enable Federated Storage Engine After Install Mysql
i download the mysql version 5.0 last week and select complete one to install mysql.... after that i need to use the federated storage Enegine but the query browser said mysql federated feature is disable.

Active Enable Root Access From Remote Machines
Who i can active the option "Enable root access from remote machines" in the files of configuration of mysql 5.

Enable The Option Flag Return Matching Rows
I would like to know if it's possible to enable the "Return matching rows" flag with a connection string. With a dsn connection i already know how can i do this.

How Do I Enable Remote Access To MySQL Database Server
I want to connect to my mysql server which is seperate on an external server but i dont know how to enable remote access to MySQL database. The mysql server is on xp and running mysql 5.

Logging In
I'm having trouble logging into my sql server, I'm running version 4.0 just about anything I type in gives me this error message

"Error
SQL query:

mysql

MySQL said:

#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysql' at line 1 "

Can anyone help me with this problem?

Logging
Is there a way to turn on some sort of logging? I am attempting to connect to a db through VB, just learned it and am not sure if I am getting in and not retrieving data or not even getting in yet. Can this be done through the console and then left on?

How Do I Set Query Logging
I have a situation where my database is deleting records.

I would like to enable logging but this produces a huge text file. Also I am not sure how to read the results.

I am using MySQL 3.23 (the IT department won't upgrade).

Can anyone tell me the most efficient way to set logging for a specific database? I just need to monitor whether a process is deleting these records.

Also how would I read this information?

Are there any known problems like this with MySQL 3.23?

IIS Logging To Mysql?
Can you setup mysql ODBC so that IIS can log into mysql? if so is there any good article/ instructions on the setup?

Query Logging?
I cannot get my query logging to work.

I put

log=hostname.log

in my.ini and at some point it WAS recording a log, but it since stopped. I started the service, stopped the service, did everything. I logged into my machine as admin, as the user, did it all again... cant get it to work.

I am running mysql 5 as part of the XAMPP stack. I installed it on this machine as admin and can run it as a service, but I cant get the log to work.

Any help would be appreciated. I really need to see what SQL is being executed.

MySQL 5 Logging
I've installed MySQL Server 5.0 on Win2K IIS as well as PHP 5.0. PHP works fine, and so does MySQL...the problem is that I can't get the two to talk to each other

Logging On For The First Time
I've downloaded the XP Windows standard version, installed it and logged on without a problem.

I've also downloaded the Linux standard version, installed it(Mandriva 2000 powerpack), and attempted to log on. However, I keep getting a message telling me that it can't find a socks in /var(whatever that is).

Logging In To Monitor Thru Dos
I am playing around with logging in and running commands through batch files on a win2000 machine running mysql, I have a password on my db, I am using mysql -h localhost -u root -p
to start up the monitor this works, but it asks for a password which kind of kills the automated part of what I am wanting to do, is there a way to include the password on this command? I thought about passing the password using %1, but I haven't done dos in so long that I dont even know if this feature still works, does anybody?

Logging Problem
I have a problem with mysql general log, regarding query logging. I'm
running Win2K, mysql 4.1.10 with JBoss 4.0.2. When I turn on logging,
the statements executed from JBoss and logged by mysql look like this:

SELECT uuid from tablex AS a WHERE a.id = ?;

MySQL never logs the parameters of the statements. Can somebody tell me
how to turn this on or what I am missing here?

Logging Into Server
I have a linux box with MySQL.

The following fails. If I try to login locally using

mysql -u USERNAME -p

If I go to another computer on the network and try using the same user
name and password by:

mysql -h SERVER ADDRESS -u USERNAME -p

This login is successful.

Does anyone know why the first operation fails?

Logging With Trigger
I am designing a chatsystem with logging-functionality. And i want to handle the logging-stuff within a trigger. As a procedure the code works, so the syntax in ok. As a trigger i get no errors but nothing is logged.

create trigger messages_insert
before insert on messages
for each row
begin
declare a tinyint(1) unsigned;
select logging into a from users where id = 1;
if a = 1 then
insert into logfile set content = 'A';
end if;
end

Logging In / Cookies
I've been writing some code for site I'm creating, and I got stumped this far in. I have my login code, and it works, sorta - the page that displays right after logging in says that I'm logged in, but the I guess the session is destroyed after that.

I'm sort of fighting blindly here - I just started learning PHP a few months ago and don't know much about sessions and cookies yet. Here's the code that processes the login form; I originally borrowed it from an open-source browser-based RPG (which is why users are referred to as 'players'), but now only about lines 7-17 are the same. Also, it worked fine for that game, so I don't know what's wrong here. Code:

Logging Into Server
I am running Mac OS X 10.4 (PPC) I have installed MySQL server and have the use account mysql but I have no idea of the password. When the install ran it did not give me the opportunity to set a password and I can not find anywhere that states a default password.

Logging Doesn't Work
I have WinXP, and MySQL 5.0.18 running as a service. I followed the instructions for
setting up general query log file (mysqld --log), and the file was created (Nebo.log),
but it does not display any logs.
This is all I have after executing a few queries:

Nebo.log

mysqld, Version: 5.0.18-log. started with:
Tcp port: 3306 Unix socket: (null)
Time Id Command Argument

Can anyone offer any help?

Using A Database For Logging
I need to log the number of "brochure Requests" on a per Region, Per
date basis.

eg for say 20 Regions , have a 366 columns (one per day of the year).
Obviously I can write a script to Create all the tables, but it seems
kind of clumsy.
Do arrays exist in Mysql?
It might also be easier to organise it into 52 weeks of 7 days.

How do I design the tables?

Stats Not Logging
My stats arnt being logged. Page loads with no errors..

$update = "UPDATE `log` SET hits='hits + 1' WHERE ip='$ip' AND date='$date'";
if (mysql_query($update) or die(mysql_error()) ) {
} elseif($logged[username]) {
mysql_query("INSERT into log (ip, hits, date, user) VALUES ('$ip', '1', '$date', '$logged[username]'" or die(mysql_error()) );
}
else{
mysql_query("INSERT into log (ip, hits, date, user) VALUES ('$ip', '1', '$date', '$user'" or die(mysql_error()) );
}?

Transaction Logging
I am reading up on transaction logging, and am wondering whether MySQL's binary log is its "UNDO/REDO log"? I'm a beginner to all this, and not sure whether that's the correct interpretation of the MySQL binary log.

How does MySQL's transaction logging, or any transaction logging mechanism, work? I was reading up on general transaction logging principles but it was getting far too specific to SQL Server and other DBMSs, so I figured that I could come here and someone here might point me to some MySQL-specific resources on this, or perhaps help to explain how this all works.

e.g. Does the transaction log get rid of all transactions once committed, what's the difference in how UNDO and REDO logs work, are these logs stored in a more complex manner than just logging the plain text statement (I'd imagine so, because otherwise how would an undo operation work)?

In fact, I find it funny that I'm asking all the questions above because I'm still not quite clear on what the purpose of transaction logs is in the first place!

While it would be great if somebody could help clear up the confusion I'm having, it would also be good if you could point me to some MySQL-specific resources on this topic. I browsed through the MySQL documentation and did a web search, but either did not find any resources period, or did not find resources that "dumbed it down" enough for me.

Logging Parameters
I can't see any useful-looking log files in my current localhost MySQL setup, and I can't see a way to specify logging in the Server Instance Configuration Wizard (1.0.8) either.

There are plenty of logging parameters listed in mysqld --help --verbose, but I'm not sure why I need to run that when I already have the service set up by the Wizard, which is working fine apart from logging. If I have to do it the mysqld way, how can I shut off the service, and is that a good idea anyway?

Replication Logging
Im wondering if there is some method to automatically "clean up" the binary logs left by replication even after they are used. For example, I have a number of mysql replication logs sitting on a server. There are about 25 of them, a GIG in size each.

My MYSQL replication is UP TO DATE. This means everything is properly sync'd. But I dont want to just 'DELETE' everything.

Logging On And Off MySQL
How does MySQL manage connections/sessions that are not formally and
properly closed?

What are the possible negative consequences if many of the
software/operators on the client side fail to properly close the sessions
they open? Will the MySQL server be able to handle this gracefully? Or will
they consume server resources until the system crashes?

Will the open sessions eventually time out close automatically?
Is there a timeout value that can be set on the server?

Can one query the server for information about open connections?

MySQL Logging Out
I'm not sure if this is related to MySQL or just happens to be occuring with MySQL on the Linux box, but MySQL will -- at random intervals -- log out without my explicit action and be followed by this message

[X]+ Stopped mysql -u <user> -p <database>
(where X is a number)

Now I don't have admin or root access to this server, but is there anything I can do or talk about with the administrator?

Error Logging
I'd like to be able to capture errors and write them to an error log table from the stored procedure.  This is fairly simple in MS SQL ... I haven't found much information about how to do it in MySQL.  Has anyone else run into this?

Turning On Logging
I have a database that has various information submitted to it from the internet. I am having problems with people hacking/submitting info that shouldn't be submitted. I don't know how they are doing it but I though that if I turned on the Logging for that particular DB maybe it would give me some clues i.e. IP addresses, ISP, date/time info, SQL Statement executed etc.What form of logging would I need to turn on?

Unchecking The Enable TCP/IP Option (was "Mysql Problem")
I have had a problem with Mysql so I downloaded it again but after configuring it would not start so reconfigured and unchecked the enable TCP/IP box in the networking options and Mysql worked fine. But can’t get PHP to connect so I think the enable TCP/IP box should be ticked. So I thought I would do better with a complete re start. I have removed and reloaded several times but the same problem occurs every time.


Logging On To MySQL - Problem
I'm trying to log on to MySQL for the first time. I only installed MySQL and PHP for the first time yesterday.

When I click on the mysql.exe (in C:Program FilesMySQLMySQL Server 5.0in) nothing happens.

I thought I was meant to get a command prompt to type in my username and pw. The following actually happens to me: I double click on it, the command box opens for about 2 seconds and then closes down.

Statistics Logging, Too Big Of A Table?
If you are logging hits/statistics in a table by each page view this logging/statistics table will grow very large.

Logging Record Deletions
I want to create a script to monitor when deletions are taking place from my database.

I thought something like using SQL count to check the number of records every minute so I can log when authorised deletions are occuring.

Server Log Not Logging All Queries
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.

I wonder why this is happening?


Copyright © 2005-08 www.BigResource.com, All rights reserved