{"id":1808,"date":"2025-04-11T19:21:34","date_gmt":"2025-04-11T10:21:34","guid":{"rendered":"https:\/\/clouds.tokyo\/blog\/?p=1808"},"modified":"2025-04-11T19:26:29","modified_gmt":"2025-04-11T10:26:29","slug":"mysql_lock","status":"publish","type":"post","link":"https:\/\/clouds.tokyo\/blog\/mysql_lock\/","title":{"rendered":"\u3010MySQL\u3011\u30ec\u30f3\u30bf\u30eb\u30b5\u30fc\u30d0\u30fc\u306eMySQL\u304c\u30ed\u30c3\u30af\u3055\u308c\u305f\u3068\u304d\u306e\u5bfe\u51e6\u65b9\u6cd5"},"content":{"rendered":"<p>\u30ec\u30f3\u30bf\u30eb\u30b5\u30fc\u30d0\u30fc\u306eMySQL\u306e\u30ed\u30c3\u30af\u3092\u89e3\u9664\u3057\u3066\u307b\u3057\u3044\u3068\u3044\u3046\u4f9d\u983c\u3092\u53d7\u3051\u5bfe\u5fdc\u3057\u305f\u306e\u3067\u5099\u5fd8\u9332\u3068\u3057\u3066\u6b8b\u3057\u307e\u3059\u3002<\/p>\n<p>X\u30b5\u30fc\u30d0\u30fc\u306e\u30ec\u30f3\u30bf\u30eb\u30b5\u30fc\u30d0\u30fc\u4e0a\u306eMySQL\u3067<br \/>\n\u8907\u6570\u306e\u30c6\u30fc\u30d6\u30eb\u3092\u7d10\u3065\u3051\u305fUPDATE\u6587\u3092\u5b9f\u884c\u3057\u305f\u3068\u3053\u308d\u3001<br \/>\n\u7d50\u679c\u304c\u8fd4\u3063\u3066\u3053\u305a\u3001\u5bfe\u8c61\u306e\u30c6\u30fc\u30d6\u30eb\u306e\u30c7\u30fc\u30bf\u3092\u66f4\u65b0\u3057\u3088\u3046\u3068\u3059\u308b\u3068<\/p>\n<pre>\r\n#1205 - \u30ed\u30c3\u30af\u5f85\u3061\u304c\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\u3057\u307e\u3057\u305f\u3002\u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u3092\u518d\u8a66\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002\r\n<\/pre>\n<p>\u3068\u3044\u3046\u30a8\u30e9\u30fc\u3067\u66f4\u65b0\u3067\u304d\u306a\u304f\u306a\u3063\u305f\u3068\u306e\u3053\u3068\u3002<br \/>\n\u307e\u305f\u3001\u30ec\u30f3\u30bf\u30eb\u30b5\u30fc\u30d0\u30fc\u306eMySQL\u3092\u518d\u8d77\u52d5\u3059\u308b\u65b9\u6cd5\u306f\u7528\u610f\u3055\u308c\u3066\u3044\u306a\u3044\u3068\u306e\u3053\u3068\u3067\u3001\u30ed\u30c3\u30af\u3092\u89e3\u9664\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u624b\u9806\u3067\u30ed\u30c3\u30af\u3092\u89e3\u9664\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\uff11\uff0e\u30b5\u30fc\u30d0\u30fc\u306bSSH\u3067\u63a5\u7d9a\u3059\u308b<\/p>\n<p>\u5c02\u7528\u30b5\u30fc\u30d0\u30fc\u3084VPS\u3067\u306a\u304f\u3066\u3082SSH\u63a5\u7d9a\u3067\u304d\u308b\u30ec\u30f3\u30bf\u30eb\u30b5\u30fc\u30d0\u30fc\u304c\u5897\u3048\u3066\u3044\u307e\u3059\u3002<br \/>\n\u4eca\u56de\u306e\u30b5\u30fc\u30d0\u30fc\u306f\u300cX\u30b5\u30fc\u30d0\u30fc\u300d\u306e\u30ec\u30f3\u30bf\u30eb\u30b5\u30fc\u30d0\u30fc\u3067\u3059\u304c\u3001SSH\u63a5\u7d9a\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n<p>\uff12\uff0e\u30b3\u30de\u30f3\u30c9\u3067MySQL\u306b\u30ed\u30b0\u30a4\u30f3\u3059\u308b<\/p>\n<pre>\r\n> mysql -u \u30e6\u30fc\u30b6\u30fc\u540d -p\r\n<\/pre>\n<p>\u3067\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b\u3057\u3066\u30ed\u30b0\u30a4\u30f3\u3057\u307e\u3059\u3002<br \/>\n\u5bfe\u8c61\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3060\u3051\u306e\u6a29\u9650\u3092\u6301\u3063\u3066\u3044\u308b\u30e6\u30fc\u30b6\u30fc\u3067OK\u3067\u3059\u3002<\/p>\n<p>\uff13\uff0e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u9078\u629e\u3059\u308b<\/p>\n<pre>\r\n> use \u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u540d;\r\n<\/pre>\n<p>\uff14\uff0e\u30d7\u30ed\u30bb\u30b9\u4e00\u89a7\u3092\u8868\u793a\u3059\u308b<\/p>\n<pre>\r\n> show processlist;\r\n<\/pre>\n<p>\u5b9f\u884c\u4e2d\u306e\u30d7\u30ed\u30bb\u30b9\u304c\u4e00\u89a7\u3067\u8868\u793a\u3055\u308c\u307e\u3059\u306e\u3067\u3001<br \/>\n\u30ed\u30c3\u30af\u306e\u539f\u56e0\u3068\u306a\u3063\u3066\u3044\u308bSQL\u306e\u300cId\u300d\u6b04\u3092\u30e1\u30e2\u3057\u307e\u3059\u3002<\/p>\n<p>\uff15\uff0e\u30d7\u30ed\u30bb\u30b9\u3092kill\u3059\u308b<\/p>\n<pre>\r\n> kill \u30e1\u30e2\u3057\u305fId;\r\n<\/pre>\n<p>\u4ee5\u4e0a\u3067\u3059\u3002<\/p>\n<p>\u305d\u306e\u5f8c\u3001\u9069\u5207\u306b\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u8ffd\u52a0\u3057\u305f\u3053\u3068\u3067<br \/>\n\u30ed\u30c3\u30af\u3059\u308b\u3053\u3068\u3082\u306a\u304f\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30ec\u30f3\u30bf\u30eb\u30b5\u30fc\u30d0\u30fc\u306eMySQL\u306e\u30ed\u30c3\u30af\u3092\u89e3\u9664\u3057\u3066\u307b\u3057\u3044\u3068\u3044\u3046\u4f9d\u983c\u3092\u53d7\u3051\u5bfe\u5fdc\u3057\u305f\u306e\u3067\u5099\u5fd8\u9332\u3068\u3057\u3066\u6b8b\u3057\u307e\u3059\u3002 X\u30b5\u30fc\u30d0\u30fc\u306e\u30ec\u30f3\u30bf\u30eb\u30b5\u30fc\u30d0\u30fc\u4e0a\u306eMySQL\u3067 \u8907\u6570\u306e\u30c6\u30fc\u30d6\u30eb\u3092\u7d10\u3065\u3051\u305fUPDATE\u6587\u3092\u5b9f\u884c\u3057\u305f\u3068\u3053\u308d\u3001 \u7d50\u679c\u304c\u8fd4\u3063\u3066 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/clouds.tokyo\/blog\/mysql_lock\/\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;\u3010MySQL\u3011\u30ec\u30f3\u30bf\u30eb\u30b5\u30fc\u30d0\u30fc\u306eMySQL\u304c\u30ed\u30c3\u30af\u3055\u308c\u305f\u3068\u304d\u306e\u5bfe\u51e6\u65b9\u6cd5&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"_jetpack_newsletter_access":""},"categories":[2],"tags":[12,433,640],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pezW3u-ta","jetpack-related-posts":[{"id":1484,"url":"https:\/\/clouds.tokyo\/blog\/db-adminer\/","url_meta":{"origin":1808,"position":0},"title":"\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u898b\u305f\u3044\u304c\u30b5\u30fc\u30d0\u30fc\u306e\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u30d1\u30cd\u30eb\u304c\u89e6\u308c\u306a\u3044\u3068\u304d","author":"yamamoto","date":"2022\u5e746\u67082\u65e5","format":false,"excerpt":"\u30b7\u30b9\u30c6\u30e0\u958b\u767a\u6848\u4ef6\u3067\u3001DB\u306e\u63a5\u7d9a\u60c5\u5831\u306f\u77e5\u3063\u3066\u3044\u308b\u304c \u30ec\u30f3\u30bf\u30eb\u30b5\u30fc\u30d0\u30fc\u306e\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u30d1\u30cd\u30eb\u3092\u89e6\u308b\u6a29\u9650\u304c\u3082\u2026","rel":"","context":"\u5099\u5fd8\u9332","block_context":{"text":"\u5099\u5fd8\u9332","link":"https:\/\/clouds.tokyo\/blog\/category\/memo\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1518,"url":"https:\/\/clouds.tokyo\/blog\/ssh-ecdsa\/","url_meta":{"origin":1808,"position":1},"title":"\u3010Linux\u3011CentOS6\u304b\u3089AlmaLinux9\u3078\u30d1\u30b9\u30ef\u30fc\u30c9\u306a\u3057ssh\u63a5\u7d9a","author":"yamamoto","date":"2023\u5e742\u67089\u65e5","format":false,"excerpt":"\u53e4\u3044\u30b5\u30fc\u30d0\u30fc\u304b\u3089\u65b0\u3057\u3044\u30b5\u30fc\u30d0\u30fc\u3078\u30d1\u30b9\u306a\u3057\u63a5\u7d9a\u304c\u3069\u3046\u3057\u3066\u3082\u5fc5\u8981\u3060\u3063\u305f\u306e\u3067\u30e1\u30e2\u3002 \u3082\u3061\u308d\u3093\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u7684\u2026","rel":"","context":"\u5099\u5fd8\u9332","block_context":{"text":"\u5099\u5fd8\u9332","link":"https:\/\/clouds.tokyo\/blog\/category\/memo\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":931,"url":"https:\/\/clouds.tokyo\/blog\/linux_ntpd_pid\/","url_meta":{"origin":1808,"position":2},"title":"\u3010CentOS\u3011\u300cntpd\u304c\u505c\u6b62\u3057\u3066\u3044\u307e\u3059\u304cPID\u30d5\u30a1\u30a4\u30eb\u304c\u6b8b\u3063\u3066\u3044\u307e\u3059\u300d","author":"yamamoto","date":"2018\u5e741\u670823\u65e5","format":false,"excerpt":"\u3042\u308b\u30b7\u30b9\u30c6\u30e0\u304b\u3089\u81ea\u52d5\u9001\u4fe1\u3055\u308c\u3066\u3044\u308b\u30e1\u30fc\u30eb\u304c\u5c4a\u304b\u306a\u3044\u30b1\u30fc\u30b9\u304c\u5897\u3048\u3001\u539f\u56e0\u3092\u63a2\u3063\u3066\u3044\u307e\u3057\u305f\u3002 \u8272\u3005\u8abf\u3079\u305f\u7d50\u2026","rel":"","context":"\u5099\u5fd8\u9332","block_context":{"text":"\u5099\u5fd8\u9332","link":"https:\/\/clouds.tokyo\/blog\/category\/memo\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":69,"url":"https:\/\/clouds.tokyo\/blog\/rsync_ssh\/","url_meta":{"origin":1808,"position":3},"title":"\u3010Linux\u3011rsync\u3067\u30b5\u30fc\u30d0\u9593\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u540c\u671f","author":"yamamoto","date":"2005\u5e7410\u670826\u65e5","format":false,"excerpt":"\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u306a\u3069\u306e\u76ee\u7684\u3067\u3001rsync\u3092\u4f7f\u3063\u3066\u30b5\u30fc\u30d0\u9593\u3067\u30d5\u30a1\u30a4\u30eb\u3092\u540c\u671f\u3059\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002 \u5b9a\u671f\u7684\u306b\u81ea\u2026","rel":"","context":"\u5099\u5fd8\u9332","block_context":{"text":"\u5099\u5fd8\u9332","link":"https:\/\/clouds.tokyo\/blog\/category\/memo\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1427,"url":"https:\/\/clouds.tokyo\/blog\/wp-move\/","url_meta":{"origin":1808,"position":4},"title":"\u53e4\u3044WordPress\u306e\u30b5\u30fc\u30d0\u30fc\u79fb\u884c\u306f\u7c21\u5358\u3067\u306f\u306a\u3044","author":"yamamoto","date":"2022\u5e748\u670826\u65e5","format":false,"excerpt":"Wordpress\u3092\u5225\u306e\u30b5\u30fc\u30d0\u30fc\u306b\u79fb\u884c\u3057\u306a\u3051\u308c\u3070\u3044\u3051\u306a\u3044\u3068\u304d\u3001 Wordpress\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\uff08\u30b5\u30fc\u2026","rel":"","context":"\u5099\u5fd8\u9332","block_context":{"text":"\u5099\u5fd8\u9332","link":"https:\/\/clouds.tokyo\/blog\/category\/memo\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":772,"url":"https:\/\/clouds.tokyo\/blog\/linux_scp_port\/","url_meta":{"origin":1808,"position":5},"title":"\u3010Linux\u3011\u30dd\u30fc\u30c8\u3092\u6307\u5b9a\u3057\u3066scp","author":"yamamoto","date":"2017\u5e747\u67086\u65e5","format":false,"excerpt":"\u30b5\u30fc\u30d0\u30fc\u69cb\u7bc9\u3067\u3001\u53ef\u80fd\u306a\u9650\u308assh\u306e\u30dd\u30fc\u30c8\u306f\u5909\u66f4\u3059\u308b\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u3002 \u306a\u306e\u3067\u3001\u30b5\u30fc\u30d0\u30fc\u9593\u3067\u306e\u30d5\u30a1\u30a4\u30eb\u2026","rel":"","context":"\u5099\u5fd8\u9332","block_context":{"text":"\u5099\u5fd8\u9332","link":"https:\/\/clouds.tokyo\/blog\/category\/memo\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/clouds.tokyo\/blog\/wp-json\/wp\/v2\/posts\/1808"}],"collection":[{"href":"https:\/\/clouds.tokyo\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/clouds.tokyo\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/clouds.tokyo\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/clouds.tokyo\/blog\/wp-json\/wp\/v2\/comments?post=1808"}],"version-history":[{"count":5,"href":"https:\/\/clouds.tokyo\/blog\/wp-json\/wp\/v2\/posts\/1808\/revisions"}],"predecessor-version":[{"id":1813,"href":"https:\/\/clouds.tokyo\/blog\/wp-json\/wp\/v2\/posts\/1808\/revisions\/1813"}],"wp:attachment":[{"href":"https:\/\/clouds.tokyo\/blog\/wp-json\/wp\/v2\/media?parent=1808"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/clouds.tokyo\/blog\/wp-json\/wp\/v2\/categories?post=1808"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/clouds.tokyo\/blog\/wp-json\/wp\/v2\/tags?post=1808"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}