{"id":291,"date":"2012-04-15T23:58:02","date_gmt":"2012-04-15T23:58:02","guid":{"rendered":"http:\/\/www.plugged.in\/?p=291"},"modified":"2012-04-15T23:58:02","modified_gmt":"2012-04-15T23:58:02","slug":"mysql-root-password-recovery-in-directadmin","status":"publish","type":"post","link":"https:\/\/www.veriteknik.net.tr\/en\/mysql-root-password-recovery-in-directadmin\/","title":{"rendered":"MySQL root password recovery in DirectAdmin"},"content":{"rendered":"<p style=\"text-align: justify;\">Before changing MySQL root password you may try to recover default installation password. DirectAdmin MySQL root password is set within the installation process and written down to setup.txt.<\/p>\n<p style=\"text-align: justify;\">If you didn&#8217;t change this password you can find the default one in the setup.txt, use the command below to see the contents of \/usr\/local\/directadmin\/scripts\/setup.txt:<\/p>\n<p style=\"text-align: justify;\">your password is stored in the line starting with &#8220;mysql=&#8221;<\/p>\n<p style=\"text-align: justify;\">To see the contents of this file from a terminal, type:<\/p>\n<pre class=\"brush: shell; gutter: true; first-line: 1\">less \/usr\/local\/directadmin\/scripts\/setup.txt<\/pre>\n<p><span style=\"text-align: justify;\">If you want to access mysql from ssh or console directly without typing password, create a file in \/root\/ dir called .my.cnf:<\/span><\/p>\n<pre class=\"brush: shell; gutter: true; first-line: 1\">touch \/root\/.my.cnf<\/pre>\n<p>and edit this file with the vi editor:<\/p>\n<pre class=\"brush: bash; gutter: false; first-line: 1\">vi \/root\/.my.cnf<\/pre>\n<p>Add the lines below:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">[client]\n user=root\n password=XXXXXX<\/pre>\n<p>Fill the password with the pass you got from setup.txt, save the file with SHIFT+ZZ or :wq and exit. After this step just write\u00a0<strong>mysql\u00a0<\/strong>to enter MySQL console directly without password.<\/p>\n<pre class=\"brush: bash; gutter: false; first-line: 1\">[root@test ~]# mysql\n Welcome to the MySQL monitor.\u00a0 Commands end with ; or \\g.\n Your MySQL connection id is 169833\n Server version: 5.0.77-log MySQL Community Edition (GPL)\nType 'help;' or '\\h' for help. Type '\\c' to clear the buffer.\nmysql&gt;<\/pre>\n<p>..<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Before changing MySQL root password you may try to recover default installation password. DirectAdmin MySQL root password is set within the installation process and written down to setup.txt. If you didn&#8217;t change this password you can find the default one in the setup.txt, use the command below to see the contents of \/usr\/local\/directadmin\/scripts\/setup.txt: your password [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","footnotes":""},"categories":[461,364],"tags":[463,455,373,464,465,466,467,468],"yst_prominent_words":[],"class_list":["post-291","post","type-post","status-publish","format-standard","hentry","category-directadmin-linux","category-mysql-databases","tag-change","tag-directadmin","tag-mysql","tag-password","tag-recover","tag-recovery","tag-reset","tag-set"],"jetpack_featured_media_url":"","uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"ckaraca","author_link":"https:\/\/www.veriteknik.net.tr\/en\/author\/ckaraca\/"},"uagb_comment_info":0,"uagb_excerpt":"Before changing MySQL root password you may try to recover default installation password. DirectAdmin MySQL root password is set within the installation process and written down to setup.txt. If you didn&#8217;t change this password you can find the default one in the setup.txt, use the command below to see the contents of \/usr\/local\/directadmin\/scripts\/setup.txt: your password&hellip;","_links":{"self":[{"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/posts\/291","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/comments?post=291"}],"version-history":[{"count":0,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/posts\/291\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/media?parent=291"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/categories?post=291"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/tags?post=291"},{"taxonomy":"yst_prominent_words","embeddable":true,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/yst_prominent_words?post=291"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}