?
Solved

how to find out MySQL deadlock and solve it easliy

Posted on 2012-08-28
7
Medium Priority
?
800 Views
Last Modified: 2012-09-24
Dear all,

  Is there any easy way (like the MS SQL deadlock graphic) that found out what MySQL query cause the deadlock and which one has been killed as the victim?

DBA100.
0
Comment
Question by:marrowyung
  • 5
  • 2
7 Comments
 
LVL 1

Author Comment

by:marrowyung
ID: 38339991
what I really need is a graphical presentation of deaklock in MySQL.
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 38340016
sorry, but Mysql is not that evolved:
http://dev.mysql.com/doc/refman/5.0/en/innodb-deadlocks.html
http://dev.mysql.com/doc/refman/5.0/en/innodb-deadlock-detection.html

you can only handle the deadlocks on application level, and eventually modify the application to avoid the scenario that happens
0
 
LVL 1

Author Comment

by:marrowyung
ID: 38349113
angelIII,

Thanks.

WOWOW, this is the most important part for paid SQL DB, right?
0
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
LVL 1

Author Comment

by:marrowyung
ID: 38349156
it seem that only InnoDB can rollback deadlock transcation ?
0
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 2000 total points
ID: 38349611
actually, InnoDB is the one HAVING transactions. if you have MyISAM tables, they won't be part of transactions at all, so no deadlock possible there.
0
 
LVL 1

Author Closing Comment

by:marrowyung
ID: 38383548
Please so and see if you have an idea about:


http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/Q_27858781.html and see if you know why .

Thanks.

DBA100.
0
 
LVL 1

Author Comment

by:marrowyung
ID: 38427730
angelIII,

"actually, InnoDB is the one HAVING transactions. if you have MyISAM tables, they won't be part of transactions at all, so no deadlock possible there. "

something I dont' understand here. You mean MyISAM do not have transcation ? then how transcation comment? or it just don't see deadlock as part of the transcation?
0

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating and Managing Databases with phpMyAdmin in cPanel.
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses
Course of the Month13 days, 14 hours left to enroll

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question