{"id":4616,"date":"2015-01-08T10:55:54","date_gmt":"2015-01-08T08:55:54","guid":{"rendered":"http:\/\/skeletor.org.ua\/?p=4616"},"modified":"2017-01-12T13:18:12","modified_gmt":"2017-01-12T11:18:12","slug":"mysql-warning-using-a-password-on-the-command-line-interface-can-be-insecure","status":"publish","type":"post","link":"https:\/\/skeletor.org.ua\/?p=4616","title":{"rendered":"[mysql] Warning: Using a password on the command line interface can be insecure."},"content":{"rendered":"<p>\u042d\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043d\u0430\u0447\u0430\u043b\u043e \u043f\u043e\u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0432 <strong>mysql 5.6<\/strong> \u0435\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u0432\u043e\u0434 \u043f\u0430\u0440\u043e\u043b\u044f \u043f\u0440\u044f\u043c\u043e \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 \u0441 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c. \u0427\u0442\u043e \u0431\u044b \u0443\u0431\u0440\u0430\u0442\u044c \u044d\u0442\u043e, \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0439 <strong>login-path<\/strong> \u0441 \u043d\u0443\u0436\u043d\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f (<strong>user,pass,host,db,&#8230;<\/strong>) \u0438 \u043f\u043e\u0442\u043e\u043c \u0435\u0433\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u0441\u043a\u0440\u0438\u043f\u0442\u0435. \u0418 \u0442\u0430\u043a, \u0441\u043e\u0437\u0434\u0430\u0451\u043c (\u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0434\u0430\u043d\u043e \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u0435 \u043d\u0430 \u0432\u0432\u043e\u0434 \u043f\u0430\u0440\u043e\u043b\u044f \u0434\u043b\u044f \u044e\u0437\u0435\u0440\u0430 <strong>proftpd<\/strong>):<\/p>\n<p><code># mysql_config_editor set --login-path=proftpd --host=localhost --user=proftpd --password<br \/>\nEnter password:<\/code><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432 \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u0445 \u0438\u043b\u0438 \u0432 \u043e\u0431\u043e\u043b\u043e\u0447\u043a\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0442\u0430\u043a\u0443\u044e \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e:<\/p>\n<p><code># mysql --login-path=proftpd proftpd_admin -N -e \"select ...\"<\/code><\/p>\n<p>\u0411\u043e\u043b\u044c\u0448\u0435 \u0432\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u0442\u0435 \u0432\u0438\u0434\u0435\u0442\u044c \u043d\u0430\u0434\u043e\u0435\u0434\u043b\u0438\u0432\u044b\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f.<\/p>\n<p>\u041f\u0421. \u0415\u0441\u043b\u0438 \u043f\u043e \u043a\u0430\u043a\u0438\u043c-\u0442\u043e \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c \u044d\u0442\u043e \u043d\u0435\u043b\u044c\u0437\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e &#8220;\u043f\u043e\u0434\u0430\u0432\u0438\u0442\u044c&#8221; \u0432\u044b\u0432\u043e\u0434 <strong>stderr<\/strong> \u0432 <strong>\/dev\/null<\/strong>:<\/p>\n<p><code>$ mysql -uuser -ppass -e \"select 1\" 2&gt;\/dev\/null<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u042d\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043d\u0430\u0447\u0430\u043b\u043e \u043f\u043e\u044f\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0432 mysql 5.6 \u0435\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432\u0432\u043e\u0434 \u043f\u0430\u0440\u043e\u043b\u044f \u043f\u0440\u044f\u043c\u043e \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 \u0441 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c. \u0427\u0442\u043e \u0431\u044b \u0443\u0431\u0440\u0430\u0442\u044c \u044d\u0442\u043e, \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0439 login-path \u0441 \u043d\u0443\u0436\u043d\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f (user,pass,host,db,&#8230;) \u0438 \u043f\u043e\u0442\u043e\u043c \u0435\u0433\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u0441\u043a\u0440\u0438\u043f\u0442\u0435. \u0418 \u0442\u0430\u043a, \u0441\u043e\u0437\u0434\u0430\u0451\u043c (\u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0434\u0430\u043d\u043e \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0435\u043d\u0438\u0435 \u043d\u0430 \u0432\u0432\u043e\u0434 \u043f\u0430\u0440\u043e\u043b\u044f \u0434\u043b\u044f \u044e\u0437\u0435\u0440\u0430 proftpd): # mysql_config_editor set &#8211;login-path=proftpd &#8211;host=localhost &#8211;user=proftpd [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,10],"tags":[],"class_list":["post-4616","post","type-post","status-publish","format-standard","hentry","category-databases","category-others"],"_links":{"self":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/4616","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4616"}],"version-history":[{"count":3,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/4616\/revisions"}],"predecessor-version":[{"id":5109,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/4616\/revisions\/5109"}],"wp:attachment":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4616"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4616"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4616"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}