{"id":3426,"date":"2026-05-14T10:30:24","date_gmt":"2026-05-14T08:30:24","guid":{"rendered":"https:\/\/digitalia.culturanuova.net\/blog\/?p=3426"},"modified":"2026-05-14T10:31:43","modified_gmt":"2026-05-14T08:31:43","slug":"fix-a-corrupt-innodb","status":"publish","type":"post","link":"https:\/\/digitalia.culturanuova.net\/blog\/?p=3426","title":{"rendered":"Fix a corrupt innodb"},"content":{"rendered":"\n<p>Today happened that mariadb worked <em>almost<\/em> correctly, but two wordpress db were incorrectly managed. Indeed I could modify a post, but I couldn&#8217;t add a new one.<\/p>\n\n\n\n<p>In another PC I, luckily, had the good wp db (perfectlty working with its innodb). So, it was possible to fix this problem. With the following steps:<\/p>\n\n\n\n<p>a) in the well working device <strong>dump<\/strong> (from a teminal) the working wp db:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mysqldump -u root -p --single-transaction --routines --triggers your-db-name &gt; dump-yourdbname.sql<\/code><\/pre>\n\n\n\n<p>b) in the bad working device <\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>activate (if not already active) mariadb<\/li>\n\n\n\n<li>in a terminal: <code>mysql -u root -p<\/code> (of course you have to provide your mysql psw)<\/li>\n\n\n\n<li>and then, within mysql, you have to delete the old, bad, db, and create a new one: \n<ul class=\"wp-block-list\">\n<li>DROP DATABASE IF EXISTS yourdbname; <\/li>\n\n\n\n<li>CREATE DATABASE yourdbname CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;<\/li>\n\n\n\n<li>EXIT;<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Now you have a new, good but <strong>empty<\/strong> db. You have now to import the <strong>content<\/strong> of it, with this code: mysql -u root -p yourdbname &lt; dump-yourdbname.sql<\/li>\n<\/ul>\n\n\n\n<p>Now all should work \ud83d\ude42.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today happened that mariadb worked almost correctly, but two wordpress db were incorrectly managed. Indeed I could modify a post, but I couldn&#8217;t add a new one. In another PC I, luckily, had the good wp db (perfectlty working with its innodb). So, it was possible to fix this problem. With the following steps: a) &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/digitalia.culturanuova.net\/blog\/?p=3426\" class=\"more-link\">Leggi tutto<span class=\"screen-reader-text\"> &#8220;Fix a corrupt innodb&#8221;<\/span><\/a><\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[579,566],"tags":[112,1012,562,34,11,488],"class_list":["post-3426","post","type-post","status-publish","format-standard","hentry","category-database","category-webmaster","tag-database","tag-dump","tag-innodb","tag-mariadb","tag-mysql","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3426","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3426"}],"version-history":[{"count":2,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3426\/revisions"}],"predecessor-version":[{"id":3428,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3426\/revisions\/3428"}],"wp:attachment":[{"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3426"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3426"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3426"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}