{"id":17,"date":"2026-01-15T18:26:28","date_gmt":"2026-01-15T18:26:28","guid":{"rendered":"https:\/\/it.serverhome.ru\/?p=17"},"modified":"2026-01-16T10:20:21","modified_gmt":"2026-01-16T10:20:21","slug":"%d1%81%d0%bc%d0%b5%d0%bd%d0%b0-%d0%bf%d0%b0%d1%80%d0%be%d0%bb%d1%8f-root-%d0%b4%d0%bb%d1%8f-mysql","status":"publish","type":"post","link":"https:\/\/my.serverhome.ru\/?p=17","title":{"rendered":"\u0421\u043c\u0435\u043d\u0430 \u043f\u0430\u0440\u043e\u043b\u044f root \u0434\u043b\u044f MySQL"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code>\/etc\/init.d\/mysql stop<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u041e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u0444\u0430\u0439\u043b mysqld.cnf, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u043b\u0443\u0436\u0431\u0443 \u0431\u0435\u0437 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u0440\u0430\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nano \/etc\/mysql\/mysql.conf.d\/mysqld.cnf<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412 \u0441\u0435\u043a\u0446\u0438\u044e\u00a0<strong>[mysqld]<\/strong>\u00a0\u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>skip-grant-tables<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0414\u043e\u043b\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"439\" height=\"238\" src=\"https:\/\/it.serverhome.ru\/wp-content\/uploads\/2026\/01\/02ef853c.png\" alt=\"\" class=\"wp-image-18\" srcset=\"https:\/\/my.serverhome.ru\/wp-content\/uploads\/2026\/01\/02ef853c.png 439w, https:\/\/my.serverhome.ru\/wp-content\/uploads\/2026\/01\/02ef853c-300x163.png 300w\" sizes=\"auto, (max-width: 439px) 100vw, 439px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f (\u0432 nano \u044d\u0442\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0435\u0439 Ctrl O -> Enter -> Ctrl X, \u043b\u0438\u0431\u043e Ctrl X -> Y -> Enter).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 mysql:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>service mysql restart<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0421\u043d\u043e\u0432\u0430 \u043e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0444\u0430\u0439\u043b\u00a0<strong>mysqld.cnf<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nano \/etc\/mysql\/mysql.conf.d\/mysqld.cnf<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0418<strong>\u00a0\u0443\u0434\u0430\u043b\u0438\u0442\u0435<\/strong>\u00a0\u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443. \u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f.\u00a0<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u0441\u044c \u043a MySQL \u043a\u0430\u043a root \u0431\u0435\u0437 \u043f\u0430\u0440\u043e\u043b\u044f:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>use mysql;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u041e\u0431\u043d\u043e\u0432\u0438\u0442\u0435 \u043f\u0430\u0440\u043e\u043b\u044c:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER USER 'root'@'localhost' IDENTIFIED BY 'YOURNEWPASSWORD';<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>flush privileges;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0412\u044b\u0439\u0434\u0438\u0442\u0435 \u0438\u0437 mysql \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439\u00a0<strong>\\q<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/etc\/init.d\/mysql start<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435, \u0447\u0442\u043e \u043f\u0430\u0440\u043e\u043b\u044c \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0432\u0448\u0438\u0441\u044c \u043f\u043e\u0434 root \u0441 \u043d\u043e\u0432\u044b\u043c \u043f\u0430\u0440\u043e\u043b\u0435\u043c. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql -u root -p<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0432\u0430\u0448 \u043d\u043e\u0432\u044b\u0439 \u043f\u0430\u0440\u043e\u043b\u044c.\u00a0<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u0444\u0430\u0439\u043b mysqld.cnf, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0441\u043b\u0443\u0436\u0431\u0443 \u0431\u0435\u0437 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043f\u0440\u0430\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e: \u0412 \u0441\u0435\u043a\u0446\u0438\u044e\u00a0[mysqld]\u00a0\u0434\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443: &hellip; <a title=\"\u0421\u043c\u0435\u043d\u0430 \u043f\u0430\u0440\u043e\u043b\u044f root \u0434\u043b\u044f MySQL\" class=\"hm-read-more\" href=\"https:\/\/my.serverhome.ru\/?p=17\"><span class=\"screen-reader-text\">\u0421\u043c\u0435\u043d\u0430 \u043f\u0430\u0440\u043e\u043b\u044f root \u0434\u043b\u044f MySQL<\/span>\u0427\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043b\u0435\u0435<\/a><\/p>\n","protected":false},"author":1,"featured_media":19,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[7,5,6,8],"class_list":["post-17","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-instructions","tag-linux","tag-mysql","tag-root","tag-ubuntu"],"_links":{"self":[{"href":"https:\/\/my.serverhome.ru\/index.php?rest_route=\/wp\/v2\/posts\/17","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/my.serverhome.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/my.serverhome.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/my.serverhome.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/my.serverhome.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=17"}],"version-history":[{"count":1,"href":"https:\/\/my.serverhome.ru\/index.php?rest_route=\/wp\/v2\/posts\/17\/revisions"}],"predecessor-version":[{"id":20,"href":"https:\/\/my.serverhome.ru\/index.php?rest_route=\/wp\/v2\/posts\/17\/revisions\/20"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/my.serverhome.ru\/index.php?rest_route=\/wp\/v2\/media\/19"}],"wp:attachment":[{"href":"https:\/\/my.serverhome.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=17"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/my.serverhome.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=17"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/my.serverhome.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=17"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}