{"id":605,"date":"2020-08-24T12:57:50","date_gmt":"2020-08-24T12:57:50","guid":{"rendered":"https:\/\/mellowhost.com\/blog\/?p=605"},"modified":"2020-08-24T12:57:50","modified_gmt":"2020-08-24T12:57:50","slug":"how-to-install-mysqlfrm-mysql-utilities-in-centos-7","status":"publish","type":"post","link":"https:\/\/mellowhost.com\/blog\/how-to-install-mysqlfrm-mysql-utilities-in-centos-7.html","title":{"rendered":"How to Install Mysqlfrm \/ Mysql-utilities in CentOS 7"},"content":{"rendered":"\n<p>Mysql provides a set of utility tools that can be used to recover your data from Mysql data files. One of them is &#8216;Mysqlfrm&#8217;. This tool is not given in primary MySQL bundles, instead it comes with Mysql-utilities. <\/p>\n\n\n\n<p>This package can be installed from &#8216;mysql-tools-community&#8217; repo, those are available from <a href=\"https:\/\/repo.mysql.com\/yum\/\">MySQL Yum Repos<\/a><\/p> \n\n\n\n<p>Command would be:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">yum install mysql-utilities<\/pre>\n\n\n\n<p>This would also install another python package called &#8216;mysql-connector-python&#8217; for you form the &#8216;mysql-connectors-community&#8217; repo automatically. There is one catch. Sometimes, due to python version dependencies, you may fail to connect to mysql through the automatically detected mysql-connector-python that is automatically installed by mysql-utilities. You may know that if you are seeing the following error when you type mysqlfrom in the command line:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># mysqlfrm\nTraceback (most recent call last):\n  File \"\/usr\/bin\/mysqlfrm\", line 27, in &lt;module>\n    from mysql.utilities.common.tools import (check_python_version,\nImportError: No module named utilities.common.tools<\/pre>\n\n\n\n<p>For these cases, you may install an older version of mysql connector for python, using the following before installing mysql-utilities:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">yum install mysql-connector-python.noarch<\/pre>\n\n\n\n<p>This would install an older version of mysql connector that works better with Python 2.7 or similar. <\/p>\n\n\n\n<p>Once the above is done, you may now install mysql-utilities using the following back again:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">yum install mysql-utilities<\/pre>\n\n\n\n<p>As you have already installed the connector, this won&#8217;t try to reinstall the mysql connector from dependencies and use the other one that you got installed. <\/p>\n\n\n\n<p>Now you may use the mysqlfrm tool to read your frm files and recover the table structures if required. Here is a great article from 2014 and still valid on mysqlfrm use cases:<\/p>\n\n\n\n<p><a href=\"https:\/\/www.percona.com\/blog\/2014\/01\/02\/recover-table-structure-frm-files-mysql-utilities\/\">How to recover table structure from .frm files with MySQL Utilities<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Mysql provides a set of utility tools that can be used to recover your data from Mysql data files. One of them is &#8216;Mysqlfrm&#8217;. This tool is not given in primary MySQL bundles, instead it comes with Mysql-utilities. This package can be installed from &#8216;mysql-tools-community&#8217; repo, those are available from MySQL Yum Repos Command would &hellip; <a href=\"https:\/\/mellowhost.com\/blog\/how-to-install-mysqlfrm-mysql-utilities-in-centos-7.html\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How to Install Mysqlfrm \/ Mysql-utilities in CentOS 7&#8221;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[295,444,12,14],"tags":[201,446,448,445,447],"_links":{"self":[{"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/posts\/605"}],"collection":[{"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/comments?post=605"}],"version-history":[{"count":1,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/posts\/605\/revisions"}],"predecessor-version":[{"id":606,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/posts\/605\/revisions\/606"}],"wp:attachment":[{"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/media?parent=605"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/categories?post=605"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mellowhost.com\/blog\/wp-json\/wp\/v2\/tags?post=605"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}