{"id":672,"date":"2026-07-03T13:45:39","date_gmt":"2026-07-03T04:45:39","guid":{"rendered":"https:\/\/centos.ihavenomoney.co.kr\/?page_id=672"},"modified":"2026-07-03T13:46:45","modified_gmt":"2026-07-03T04:46:45","slug":"rocky8-x-mysql%ec%84%a4%ec%b9%98","status":"publish","type":"page","link":"https:\/\/centos.ihavenomoney.co.kr\/?page_id=672","title":{"rendered":"Rocky8.x Mysql\uc124\uce58"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\uae30\uc874 MariaDB \uc81c\uac70 (\uc124\uce58\ub418\uc5b4 \uc788\ub294 \uacbd\uc6b0)<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:vim decode:true \" >sudo dnf remove mariadb* -y<\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">MySQL \uacf5\uc2dd \uc800\uc7a5\uc18c \ucd94\uac00<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:vim decode:true \" ># Rocky Linux 8\nsudo rpm -Uvh https:\/\/dev.mysql.com\/get\/mysql80-community-release-el8-9.noarch.rpm\n\n# Rocky Linux 9\nsudo rpm -Uvh https:\/\/dev.mysql.com\/get\/mysql80-community-release-el9-1.noarch.rpm<\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Rocky Linux 8 \uc804\uc6a9 \u2014 \uae30\ubcf8 MySQL \ubaa8\ub4c8 \ube44\ud65c\uc131\ud654<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:vim decode:true \" ># Rocky 8\ub9cc \ud544\uc694 (Rocky 9\ub294 \uc0dd\ub7b5)\nsudo dnf module disable mysql -y<\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">MySQL \uc124\uce58<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:vim decode:true \" >sudo dnf install mysql-community-server -y<\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">MySQL \uc2dc\uc791 \ubc0f \uc790\ub3d9\uc2e4\ud589 \ub4f1\ub85d<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:vim decode:true \" >sudo systemctl start mysqld\nsudo systemctl enable mysqld\n\n# \uc0c1\ud0dc \ud655\uc778\nsudo systemctl status mysqld<\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\ucd08\uae30 \uc784\uc2dc \ube44\ubc00\ubc88\ud638 \ud655\uc778<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:vim decode:true \" >sudo grep 'temporary password' \/var\/log\/mysqld.log\n\n[Note] A temporary password is generated for root@localhost: Ab!1xxxxxx;<\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\ubcf4\uc548 \ucd08\uae30 \uc124\uc815<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:vim decode:true \" >sudo mysql_secure_installation\n\n\uc784\uc2dc \ube44\ubc00\ubc88\ud638 \uc785\ub825\n\uc0c8 root \ube44\ubc00\ubc88\ud638 \uc124\uc815 (\ub300\ubb38\uc790+\uc18c\ubb38\uc790+\uc22b\uc790+\ud2b9\uc218\ubb38\uc790 \ud3ec\ud568, 8\uc790 \uc774\uc0c1)\n\ub098\uba38\uc9c0 \uc9c8\ubb38\uc740 \uc54c\uc544\uc11c Y,N \uad8c\uc7a5<\/pre><\/div>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:vim decode:true \" ># sudo mysql_secure_installation\n\nSecuring the MySQL server deployment.\n\nEnter password for user root:\n\nThe existing password for the user account root has expired. Please set a new password.\n\nNew password:\n\nRe-enter new password:\n ... Failed! Error: Your password does not satisfy the current policy requirements\n\nNew password:\n\nRe-enter new password:\nSorry, passwords do not match.\n\nNew password:\n\nRe-enter new password:\n ... Failed! Error: Your password does not satisfy the current policy requirements\n\nNew password:\n\nRe-enter new password:\n ... Failed! Error: Your password does not satisfy the current policy requirements\n\nNew password:\n\nRe-enter new password:\nThe 'validate_password' component is installed on the server.\nThe subsequent steps will run with the existing configuration\nof the component.\nUsing existing password for root.\n\nEstimated strength of the password: 100\nChange the password for root ? ((Press y|Y for Yes, any other key for No) : y\n\nNew password:\n\nRe-enter new password:\n\nEstimated strength of the password: 100\nDo you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y\nBy default, a MySQL installation has an anonymous user,\nallowing anyone to log into MySQL without having to have\na user account created for them. This is intended only for\ntesting, and to make the installation go a bit smoother.\nYou should remove them before moving into a production\nenvironment.\n\nRemove anonymous users? (Press y|Y for Yes, any other key for No) : y\nSuccess.\n\n\nNormally, root should only be allowed to connect from\n'localhost'. This ensures that someone cannot guess at\nthe root password from the network.\n\nDisallow root login remotely? (Press y|Y for Yes, any other key for No) : n\n\n ... skipping.\nBy default, MySQL comes with a database named 'test' that\nanyone can access. This is also intended only for testing,\nand should be removed before moving into a production\nenvironment.\n\n\nRemove test database and access to it? (Press y|Y for Yes, any other key for No) : y\n - Dropping test database...\nSuccess.\n\n - Removing privileges on test database...\nSuccess.\n\nReloading the privilege tables will ensure that all changes\nmade so far will take effect immediately.\n\nReload privilege tables now? (Press y|Y for Yes, any other key for No) : y\nSuccess.\n\nAll done!\n<\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\ubc29\ud654\ubcbd \uc124\uc815 (\uc678\ubd80 \uc811\uc18d \ud5c8\uc6a9 \uc2dc)<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:vim decode:true \" ># sudo mysql_secure_installation\n\nSecuring the MySQL server deployment.\n\nEnter password for user root:\n\nThe existing password for the user account root has expired. Please set a new password.\n\nNew password:\n\nRe-enter new password:\n ... Failed! Error: Your password does not satisfy the current policy requirements\n\nNew password:\n\nRe-enter new password:\nSorry, passwords do not match.\n\nNew password:\n\nRe-enter new password:\n ... Failed! Error: Your password does not satisfy the current policy requirements\n\nNew password:\n\nRe-enter new password:\n ... Failed! Error: Your password does not satisfy the current policy requirements\n\nNew password:\n\nRe-enter new password:\nThe 'validate_password' component is installed on the server.\nThe subsequent steps will run with the existing configuration\nof the component.\nUsing existing password for root.\n\nEstimated strength of the password: 100\nChange the password for root ? ((Press y|Y for Yes, any other key for No) : y\n\nNew password:\n\nRe-enter new password:\n\nEstimated strength of the password: 100\nDo you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y\nBy default, a MySQL installation has an anonymous user,\nallowing anyone to log into MySQL without having to have\na user account created for them. This is intended only for\ntesting, and to make the installation go a bit smoother.\nYou should remove them before moving into a production\nenvironment.\n\nRemove anonymous users? (Press y|Y for Yes, any other key for No) : y\nSuccess.\n\n\nNormally, root should only be allowed to connect from\n'localhost'. This ensures that someone cannot guess at\nthe root password from the network.\n\nDisallow root login remotely? (Press y|Y for Yes, any other key for No) : n\n\n ... skipping.\nBy default, MySQL comes with a database named 'test' that\nanyone can access. This is also intended only for testing,\nand should be removed before moving into a production\nenvironment.\n\n\nRemove test database and access to it? (Press y|Y for Yes, any other key for No) : y\n - Dropping test database...\nSuccess.\n\n - Removing privileges on test database...\nSuccess.\n\nReloading the privilege tables will ensure that all changes\nmade so far will take effect immediately.\n\nReload privilege tables now? (Press y|Y for Yes, any other key for No) : y\nSuccess.\n\nAll done!\n<\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">MySQL \uc678\ubd80 \uc811\uc18d \ud5c8\uc6a9 \uc124\uc815<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:vim decode:true \" >sudo vi \/etc\/my.cnf<\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\uc544\ub798\uc5d0 \ucd94\uac00<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:vim decode:true \" >[mysqld]\n# \ubaa8\ub4e0 IP\uc5d0\uc11c \uc811\uc18d \ud5c8\uc6a9 (\uae30\ubcf8\uac12\uc774 127.0.0.1\uc774\uba74 \uc678\ubd80 \ucc28\ub2e8\ub428)\nbind-address = 0.0.0.0\n\n# \ud3ec\ud2b8 (\uae30\ubcf8 3306)\nport = 3306<\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\uc7ac\uc2dc\uc791<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">sudo systemctl restart mysqld<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">MySQL \uc678\ubd80 \uc811\uc18d \uacc4\uc815 \uad8c\ud55c \ubd80\uc5ec<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">root \uacc4\uc815 \ud655<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:vim decode:true \" >mysql -u root -p\n\nSELECT user, host, plugin\nFROM mysql.user\nWHERE user='root';\n\n+------+-----------+-----------------------+\n| user | host      | plugin                |\n+------+-----------+-----------------------+\n| root | localhost | caching_sha2_password |\n+------+-----------+-----------------------+<\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\uc678\ubd80 root \uacc4\uc815 \uc0dd\uc131<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:vim decode:true \" >CREATE USER 'root'@'%' IDENTIFIED BY '\ube44\ubc00\ubc88\ud638';\n\nGRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;\n\nFLUSH PRIVILEGES;<\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\uae30\uc874 root\ub97c &#8216;%&#8217;\ub85c \ubcc0\uacbd\ud558\ub294 \ubc29\ubc95<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">MySQL \uc7ac\uc2dc\uc791<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">sudo systemctl restart mysqld<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"556\" src=\"https:\/\/centos.ihavenomoney.co.kr\/wp-content\/uploads\/2026\/07\/image-1-1024x556.png\" alt=\"\" class=\"wp-image-675\" srcset=\"https:\/\/centos.ihavenomoney.co.kr\/wp-content\/uploads\/2026\/07\/image-1-1024x556.png 1024w, https:\/\/centos.ihavenomoney.co.kr\/wp-content\/uploads\/2026\/07\/image-1-300x163.png 300w, https:\/\/centos.ihavenomoney.co.kr\/wp-content\/uploads\/2026\/07\/image-1-768x417.png 768w, https:\/\/centos.ihavenomoney.co.kr\/wp-content\/uploads\/2026\/07\/image-1.png 1056w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>\uae30\uc874 MariaDB \uc81c\uac70 (\uc124\uce58\ub418\uc5b4 \uc788\ub294 \uacbd\uc6b0) MySQL \uacf5\uc2dd \uc800\uc7a5\uc18c \ucd94\uac00 Rocky Linux 8 \uc804\uc6a9 \u2014 \uae30\ubcf8 MySQL \ubaa8\ub4c8 \ube44\ud65c\uc131\ud654 MySQL \uc124\uce58 MySQL \uc2dc\uc791 \ubc0f \uc790\ub3d9\uc2e4\ud589 \ub4f1\ub85d \ucd08\uae30 \uc784\uc2dc \ube44\ubc00\ubc88\ud638 \ud655\uc778 \ubcf4\uc548 \ucd08\uae30 \uc124\uc815 \ubc29\ud654\ubcbd \uc124\uc815 (\uc678\ubd80 \uc811\uc18d \ud5c8\uc6a9 \uc2dc) MySQL \uc678\ubd80 \uc811\uc18d \ud5c8\uc6a9 \uc124\uc815 \uc544\ub798\uc5d0 \ucd94\uac00 \uc7ac\uc2dc\uc791 sudo systemctl restart mysqld MySQL \uc678\ubd80 \uc811\uc18d \uacc4\uc815 &hellip;<br \/><a href=\"https:\/\/centos.ihavenomoney.co.kr\/?page_id=672\" class=\"more-link pen_button pen_element_default pen_icon_arrow_double\"><span class=\"screen-reader-text\">Rocky8.x Mysql\uc124\uce58<\/span> \ub354\ubcf4\uae30<\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-672","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/centos.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/pages\/672","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/centos.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/centos.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/centos.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/centos.ihavenomoney.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=672"}],"version-history":[{"count":2,"href":"https:\/\/centos.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/pages\/672\/revisions"}],"predecessor-version":[{"id":676,"href":"https:\/\/centos.ihavenomoney.co.kr\/index.php?rest_route=\/wp\/v2\/pages\/672\/revisions\/676"}],"wp:attachment":[{"href":"https:\/\/centos.ihavenomoney.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=672"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}