{"id":1170,"date":"2022-09-30T03:22:08","date_gmt":"2022-09-30T02:22:08","guid":{"rendered":"https:\/\/editjournal.redakt.eu\/faxmodem\/?p=1170"},"modified":"2022-10-01T15:17:32","modified_gmt":"2022-10-01T14:17:32","slug":"mysql-variable-has-no-effect","status":"publish","type":"post","link":"https:\/\/editjournal.redakt.eu\/faxmodem\/blog\/development\/mysql-variable-has-no-effect\/","title":{"rendered":"Changing a MySQL\/MariaDB variable in my.cnf has no effect?"},"content":{"rendered":"<p>The MySQL\/MariaDB Server settings tweaked in <code>\/etc\/mysql\/my.cnf<\/code> will go live only after you restart it - but sometimes a simple <code>service mysql restart<\/code> just won't do it. Instead, try:<\/p>\n<pre><code class=\"language-shell\">service mysql reload\nservice mysql stop\nservice mysql start<\/code><\/pre>\n<p>If there's some e.g. unrelated error in your config, <code>restart<\/code> will actually do nothing (apparently to ensure the database keeps running) and say nothing, misleading you to think the reload did go through and there's something wrong with your variable syntax. When this happened to me, I spent non-zero time moving <code>skip_name_resolve<\/code> and <code>skip-name-resolve<\/code> around <code>my.cnf<\/code> not being sure about the variable syntax.<\/p>\n<p>However, <code>reload<\/code> forces the server to reload the config, and spits out explicit warning on error.<\/p>\n<p>To check the current values and make sure they're in effect:<\/p>\n<pre><code class=\"language-mysql\">SHOW VARIABLES LIKE &#039;key_buffer_size&#039;;\nSHOW VARIABLES LIKE &#039;skip_name_resolve&#039;;\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The MySQL\/MariaDB Server settings tweaked in \/etc\/mysql\/my.cnf will go live only after you restart it &#8211; but sometimes a simple service mysql restart just won&#8217;t do it. Instead, try: service mysql reload service mysql stop service mysql start If there&#8217;s some e.g. unrelated error in your config, restart will actually do nothing (apparently to ensure&hellip; <a class=\"more-link\" href=\"https:\/\/editjournal.redakt.eu\/faxmodem\/blog\/development\/mysql-variable-has-no-effect\/\">Continue reading <span class=\"screen-reader-text\">Changing a MySQL\/MariaDB variable in my.cnf has no effect?<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[706],"tags":[775,932,720],"class_list":["post-1170","post","type-post","status-publish","format-standard","hentry","category-development","tag-debian","tag-mariadb","tag-mysql","entry"],"_links":{"self":[{"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/posts\/1170","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/comments?post=1170"}],"version-history":[{"count":3,"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/posts\/1170\/revisions"}],"predecessor-version":[{"id":1177,"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/posts\/1170\/revisions\/1177"}],"wp:attachment":[{"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/media?parent=1170"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/categories?post=1170"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/tags?post=1170"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}