Sponsored Content
Top Forums Web Development [Solved] Disable mySQL autocommit Post 302532025 by Scott on Sunday 19th of June 2011 10:42:01 AM
Old 06-19-2011
[Solved] Disable mySQL autocommit

Hi.

Does anyone know how I can disable auto-commit in mySQL?

I've been Googling it for ages, and one suggestion that always comes up is adding this to /etc/my.cnf:

Code:
[mysqld]
...
init_connect='SET autocommit=0'

But that didn't work. I then read that this wouldn't work anyway for a priviliged user, so I created another user with very basic rights (select, insert, update, delete), and still it doesn't work.

So, thinking it might be because I was connecting from localhost, I installed a new VM and mySQL, and, after messing around for ages with iptables, managed to connect remotely to the mySQL server. But still it auto-commits.

I'm probably doing / missing something stupid, and it's driving me up the wall, so any help would be greatly appreciated.

TIA.

Code:
[scott@localhost ~]$ mysql --version
mysql  Ver 14.12 Distrib 5.0.77, for redhat-linux-gnu (x86_64) using readline 5.1

[scott@localhost ~]$ uname -a
Linux localhost.localdomain 2.6.18-238.12.1.el5 #1 SMP Tue May 31 13:22:04 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux

[scott@localhost ~]$ cat /etc/redhat-release 
CentOS release 5.6 (Final)

 

7 More Discussions You Might Find Interesting

1. AIX

how to set AUTOCOMMIT option in AIX

Hi, Can anybody tell,how to set the auto commit option in AIX,i have tried with environmental variables option like 'export db2option=-c +a'. But its not working in my environment. is there any other option? (1 Reply)
Discussion started by: DB2AIX
1 Replies

2. Shell Programming and Scripting

How to disable Enable/Disable Tab Key

Hi All, I have bash script, so what is sintax script in bash for Enable and Disable Tab Key. Thanks for your help.:( Thanks, Rico (1 Reply)
Discussion started by: carnegiex
1 Replies

3. UNIX for Dummies Questions & Answers

[SOLVED] mysql.sock is missing..

mysql.sock file is missing in /opt/lampp/etc/ is there any backup file available in unix... since without that file .. project is not opening.. reply me as soon as possible ... (19 Replies)
Discussion started by: senkerth
19 Replies

4. UNIX and Linux Applications

command to check value of autocommit and isolation level

Hi, Pls let me know command to get following: 1. how to check current value of autocommit 2. how to check current value of isolation level I am using mysql-5.0.26 on unix -Thanks (2 Replies)
Discussion started by: newbielgn
2 Replies

5. Red Hat

SSL/TLS renegotiation DoS -how to disable? Is it advisable to disable?

Hi all Expertise, I have following issue to solve, SSL / TLS Renegotiation DoS (low) 222.225.12.13 Ease of Exploitation Moderate Port 443/tcp Family Miscellaneous Following is the problem description:------------------ Description The remote service encrypts traffic using TLS / SSL and... (2 Replies)
Discussion started by: manalisharmabe
2 Replies

6. Emergency UNIX and Linux Support

[Solved] EMERGENCY - can I revert 1 hour of mysql changes

I know, its stupid.. MYSQL on CENTOS 5 using WHM Imported a lot of users/posts from old forum to new forum, but my backup was lost. Can I somehow simply remove all mysql table changes for the last 3 hours, returning to pre-import status. ---------- Post updated at 03:44 AM ----------... (6 Replies)
Discussion started by: lawstudent
6 Replies

7. Emergency UNIX and Linux Support

[Solved] Mysql - Take data from row and copy it to another row

Sorry if I repost my question in this section, but I'm really in a hurry since I have to finish my work... :( Dear community, I have a table with two rows like: Row1 Row2 ======= ======= 7,3 text 1 1,3 text 2 1,2,3 blabla What i need to do is add/copy... (2 Replies)
Discussion started by: Lord Spectre
2 Replies
ETCKEEPER(8)															      ETCKEEPER(8)

NAME
etckeeper - store /etc in git, mercurial, bazaar, or darcs SYNOPSIS
etckeeper command [-d directory] DESCRIPTION
etckeeper manages /etc be stored in a git, mercurial, bazaar, or darcs repository. By default each of the commands operates on /etc, but a different directory can be specified to operate on a clone of the /etc repository located elsewhere. COMMANDS
init This initialises and sets up a git, mercurial, bazaar, or darcs repository (depending on the VCS setting in /etc/etckeeper/etck- eeper.conf). Typically this is run in /etc once when starting to use etckeeper on a machine. It can also be used to initialise a clone of the /etc repository located elsewhere. commit [message] Commits all changes in /etc to the repository. A commit message can be specified. You may also use the underlying VCS to commit man- ually. (Note that etckeeper commit will notice if a user has used sudo or su to become root, and record the original username in the commit.) pre-commit This is called as a pre-commit hook. It stores metadata and does sanity checks. pre-install This is called by apt's DPkg::Pre-Install-Pkgs hook, or by equivalent hooks of other package managers. It allows committing any uncommitted changes before packages are installed, upgraded, etc. post-install This is called by apt's DPkg::Post-Invoke hook, or by equivalent hooks of other package managers. It commits changes made by pack- ages into the repository. (You can also call this by hand after running dpkg by hand.) unclean This returns true if the directory contains uncommitted changes. update-ignore [-a] This updates the VCS ignore file. Content outside a "managed by etckeeper" block is not touched. This is generally run when upgrad- ing to a new version of etckeeper. (The -a switch will add a "managed by etckeeper" block if one is not present.) vcs subcommand [options ...] You can use this to run any subcommand of the VCS that etckeeper is configured to run. It will be run in /etc. For example, "etck- eeper vcs diff" will run "git diff", etc. uninit [-f] This command DESTROYS DATA! It is the inverse of the init command, removing VCS information and etckeeper's own bookkeeping informa- tion from the directory. Use with caution. A typical use case would be to run etckeeper uninit, then modify etckeeper.conf to use a different VCS, and then run etckeeper init. (The -f switch can be used to force uninit without prompting.) FILES
/etc/etckeeper/etckeeper.conf is the configuration file. /etc/etckeeper also contains directories containing the programs that are run for each of the above commands. ENVIRONMENT VARIABLES
ETCKEEPER_CONF_DIR path to configuration directory instead of default /etc/etckeeper. SEE ALSO
/usr/share/doc/etckeeper/README.gz AUTHOR
Joey Hess <joey@kitenet.net> ETCKEEPER(8)
All times are GMT -4. The time now is 11:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy