{"id":884,"date":"2024-06-19T10:40:01","date_gmt":"2024-06-19T03:40:01","guid":{"rendered":"https:\/\/focusnic.com\/blog\/?p=884"},"modified":"2024-11-22T23:43:39","modified_gmt":"2024-11-22T16:43:39","slug":"cara-install-mysql-80-almalinux-8","status":"publish","type":"post","link":"https:\/\/focusnic.com\/blog\/cara-install-mysql-80-almalinux-8\/","title":{"rendered":"Cara Install MySQL 8.0 di Cloud VPS Server AlmaLinux 8"},"content":{"rendered":"\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-light-blue ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/focusnic.com\/blog\/cara-install-mysql-80-almalinux-8\/#Pengenalan\" >Pengenalan<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/focusnic.com\/blog\/cara-install-mysql-80-almalinux-8\/#Persyaratan\" >Persyaratan<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/focusnic.com\/blog\/cara-install-mysql-80-almalinux-8\/#Instalasi_MySQL_80\" >Instalasi MySQL 8.0<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/focusnic.com\/blog\/cara-install-mysql-80-almalinux-8\/#Install_MySQL_Melalui_AppStream\" >Install MySQL Melalui AppStream<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/focusnic.com\/blog\/cara-install-mysql-80-almalinux-8\/#Konfigurasi_Keamanan_MySQL\" >Konfigurasi Keamanan MySQL<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/focusnic.com\/blog\/cara-install-mysql-80-almalinux-8\/#Install_MySQL_Melalui_Repository\" >Install MySQL Melalui Repository<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/focusnic.com\/blog\/cara-install-mysql-80-almalinux-8\/#Konfigurasi_Keamanan_MySQL-2\" >Konfigurasi Keamanan MySQL<\/a><\/li><\/ul><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/focusnic.com\/blog\/cara-install-mysql-80-almalinux-8\/#Kesimpulan\" >Kesimpulan<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Pengenalan\"><\/span>Pengenalan<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Dalam era digital saat ini, manajemen data menjadi hal yang krusial bagi banyak bisnis dan organisasi. Sebagai salah satu sistem manajemen basis data yang paling populer, MySQL menawarkan fitur-fitur andal dan fleksibilitas yang dibutuhkan untuk mengelola data secara efektif. <\/p>\n\n\n\n<p><a href=\"https:\/\/mysql.com\/\" target=\"_blank\" rel=\"noopener\">MySQL<\/a> adalah sistem manajemen basis data relasional (RDBMS) yang bersifat open source dan populer di seluruh dunia. MySQL digunakan untuk menyimpan dan mengelola data dalam jumlah besar dengan cara yang terstruktur dan efisien.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Persyaratan\"><\/span>Persyaratan<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Akses ke server yang menggunakan AlmaLinux 8.<\/li>\n\n\n\n<li>Hak akses root atau pengguna dengan izin sudo untuk menjalankan perintah.<\/li>\n\n\n\n<li>Koneksi internet yang stabil untuk mengunduh paket yang diperlukan.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Instalasi_MySQL_80\"><\/span>Instalasi MySQL 8.0<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Ketika menginstall MySQL 8.0, Anda memiliki dua pilihan metode &#8211; melalui <strong>AppStream<\/strong> bawaan server atau menggunakan repository resmi dari MySQL. Namun, keputusan ini harus disesuaikan dengan kebutuhan Anda.<\/p>\n\n\n\n<p>Jika Anda memilih untuk menggunakan repository <strong>AppStream<\/strong>, perlu dipertimbangkan bahwa terkadang terdapat keterlambatan dalam memperbarui versi. Sebagai contoh, situs web resmi MySQL mungkin sudah merilis versi 8.0.37, namun di repository <strong>AppStream<\/strong> masih pada versi 8.0.36.<\/p>\n\n\n\n<p>Akan tetapi, jika aplikasi Anda tidak memerlukan fitur-fitur signifikan dari perbedaan versi tersebut, maka penggunaan repository <strong>AppStream<\/strong> mungkin bukan masalah besar.<\/p>\n\n\n\n<p>Dalam tutorial ini Anda akan mempelajarai cara install MySQL melalui dua cara yaitu <strong>AppStream<\/strong> dan repository resmi dari MySQL agar mendapatkan update terbaru. Pada artikel ini kami menggunakan resource\u00a0<a href=\"https:\/\/focusnic.com\/compute-ssd\">Cloud VPS SSD Storage<\/a>\u00a0dengan spesifikasi\u00a0<strong>Compute SSD \u2013 1<\/strong>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Install_MySQL_Melalui_AppStream\"><\/span>Install MySQL Melalui AppStream<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Update server untuk memperbarui paket yang diperlukan agar tetap optimal<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \" >dnf update -y<\/pre><\/div>\n\n\n\n<p>Cek module MySQL pada AppStream menggunakan perintah berikut<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \" >dnf module list mysql<\/pre><\/div>\n\n\n\n<p>Contoh outputnya<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \" >AlmaLinux 8 - AppStream\nName                                        Stream                                           Profiles                                                 Summary                                           \nmysql                                       8.0 [d][x]                                       client, server [d]                                       MySQL Module                                      \n\nHint: [d]efault, [e]nabled, [x]disabled, [i]nstalled<\/pre><\/div>\n\n\n\n<p>Terlihat pada output diatas bahwa MySQL 8 pada repository AppStream belum diaktifkan, silahkan aktifkan menggunakan perintah berikut<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \" >dnf module enable mysql -y<\/pre><\/div>\n\n\n\n<p>Apabila repository sudah aktif maka hasilnya seperti berikut ini<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \" >AlmaLinux 8 - AppStream\nName                                        Stream                                           Profiles                                                 Summary                                           \nmysql                                       8.0 [d][e]                                       client, server [d]                                       MySQL Module                                      \n\nHint: [d]efault, [e]nabled, [x]disabled, [i]nstalled<\/pre><\/div>\n\n\n\n<p>Apabila repository sudah aktif, jalankan perintah berikut untuk menginstall MySQL 8<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \" >dnf module install mysql:8.0<\/pre><\/div>\n\n\n\n<p>Berikut adalah output dari paket yang akan diinstall pada server<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \" >========================================================================================================================================================================================================\n Package                                               Architecture                      Version                                                             Repository                            Size\n========================================================================================================================================================================================================\nInstalling group\/module packages:\n mysql-server                                          x86_64                            8.0.36-1.module_el8.9.0+3735+82bd6c11                               appstream                             32 M\nInstalling dependencies:\n libicu                                                x86_64                            60.3-2.el8_1                                                        baseos                               8.8 M\n mariadb-connector-c-config                            noarch                            3.1.11-2.el8_3                                                      appstream                             14 k\n mecab                                                 x86_64                            0.996-2.module_el8.6.0+3340+d764b636                                appstream                            392 k\n mysql                                                 x86_64                            8.0.36-1.module_el8.9.0+3735+82bd6c11                               appstream                             14 M\n mysql-common                                          x86_64                            8.0.36-1.module_el8.9.0+3735+82bd6c11                               appstream                            136 k\n mysql-errmsg                                          x86_64                            8.0.36-1.module_el8.9.0+3735+82bd6c11                               appstream                            640 k\n protobuf-lite                                         x86_64                            3.5.0-15.el8                                                        appstream                            148 k\nInstalling module profiles:\n mysql\/server                                                                                                                                                                                          \n\nTransaction Summary\n========================================================================================================================================================================================================\nInstall  8 Packages<\/pre><\/div>\n\n\n\n<p>Aktifkan service MySQL agar dapat berjalan otomatis saat server direboot<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \" >systemctl enable --now mysqld<\/pre><\/div>\n\n\n\n<p>Pastikan outputnya seperti berikut<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \" >\u25cf mysqld.service - MySQL 8.0 database server\n   Loaded: loaded (\/usr\/lib\/systemd\/system\/mysqld.service; enabled; vendor preset: disabled)\n   Active: active (running) since Sat 2024-06-15 16:39:14 UTC; 18s ago\n  Process: 4056 ExecStartPost=\/usr\/libexec\/mysql-check-upgrade (code=exited, status=0\/SUCCESS)\n  Process: 3935 ExecStartPre=\/usr\/libexec\/mysql-prepare-db-dir mysqld.service (code=exited, status=0\/SUCCESS)\n  Process: 3911 ExecStartPre=\/usr\/libexec\/mysql-check-socket (code=exited, status=0\/SUCCESS)\n Main PID: 4012 (mysqld)\n   Status: \"Server is operational\"\n    Tasks: 38 (limit: 5635)\n   Memory: 480.0M\n   CGroup: \/system.slice\/mysqld.service\n           \u2514\u25004012 \/usr\/libexec\/mysqld --basedir=\/usr<\/pre><\/div>\n\n\n\n<p>Cek versi MySQL saat ini<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \" >mysql --version<\/pre><\/div>\n\n\n\n<p>Berikut contoh outputnya<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \" >mysql  Ver 8.0.36 for Linux on x86_64 (Source distribution)<\/pre><\/div>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Konfigurasi_Keamanan_MySQL\"><\/span>Konfigurasi Keamanan MySQL<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Langkah berikutnya adalah mengamankan MySQL karena saat ini Anda bisa login menggunakan <em>blank password<\/em> dengan mengetik perintah <kbd>mysql<\/kbd> sudah bisa login tanpa autentikasi. Oleh karena itu kita akan melakukan konfigurasi keamanan dasar pada MySQL<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \" >mysql_secure_installation<\/pre><\/div>\n\n\n\n<p>Berikut adalah contoh outputnya<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \" >Securing the MySQL server deployment.\n\nConnecting to MySQL using a blank password.\n\nVALIDATE PASSWORD COMPONENT can be used to test passwords\nand improve security. It checks the strength of password\nand allows the users to set only those passwords which are\nsecure enough. Would you like to setup VALIDATE PASSWORD component?\n\nPress y|Y for Yes, any other key for No: Yes\n\nThere are three levels of password validation policy:\n\nLOW    Length &gt;= 8\nMEDIUM Length &gt;= 8, numeric, mixed case, and special characters\nSTRONG Length &gt;= 8, numeric, mixed case, special characters and dictionary                  file\n\nPlease enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 0\nPlease set the password for root here.\n\nNew password: \n\nRe-enter new password: \n\nEstimated strength of the password: 50 \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) : Y\nSuccess.\n\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>Jalankan perintah berikut untuk login ke MySQL<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \" >mysql -u root -p<\/pre><\/div>\n\n\n\n<p>Saat ini Anda sudah berhasil melakukan instalasi melalui repository <strong>AppStream<\/strong> dan melakukan konfigurasi keamanan dasar pada MySQL 8. Anda dapat melakukan administrasi seperti membuat database, tabel, dan lain sebagainya.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Install_MySQL_Melalui_Repository\"><\/span>Install MySQL Melalui Repository<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>Update server untuk memperbarui paket yang diperlukan agar tetap optimal<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \">dnf update -y<\/pre><\/div>\n\n\n\n<p>Buat file untuk repository<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \">nano \/etc\/yum.repos.d\/mysql-community.repo<\/pre><\/div>\n\n\n\n<p>Kemudian isikan dengan script berikut<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \" >[mysql80-community]\nname=MySQL 8.0 Community Server\nbaseurl=http:\/\/repo.mysql.com\/yum\/mysql-8.0-community\/el\/8\/$basearch\/\nenabled=1\ngpgcheck=1\ngpgkey=https:\/\/repo.mysql.com\/RPM-GPG-KEY-mysql-2023<\/pre><\/div>\n\n\n\n<p>Matikan module MySQL dari server agar dapat menginstall versi MySQL 8<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \" >dnf module disable mysql<\/pre><\/div>\n\n\n\n<p>Selanjutnya jalankan perintah berikut untuk menginstall MySQL8. Perintah tersebut akan menginstal paket untuk server MySQL (mysql-community-server) dan juga paket untuk komponen yang diperlukan untuk menjalankan server, termasuk paket untuk klien (mysql-community-client).<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \">dnf install mysql-community-server -y<\/pre><\/div>\n\n\n\n<p>Berikut adalah output dari paket yang akan diinstall pada server<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \" >========================================================================================================================================================================================================\n Package                                                       Architecture                          Version                                     Repository                                        Size\n========================================================================================================================================================================================================\nInstalling:\n mysql-community-server                                        x86_64                                8.0.37-1.el8                                mysql80-community                                 65 M\nInstalling dependencies:\n mysql-community-client                                        x86_64                                8.0.37-1.el8                                mysql80-community                                 16 M\n mysql-community-client-plugins                                x86_64                                8.0.37-1.el8                                mysql80-community                                3.6 M\n mysql-community-common                                        x86_64                                8.0.37-1.el8                                mysql80-community                                668 k\n mysql-community-icu-data-files                                x86_64                                8.0.37-1.el8                                mysql80-community                                2.2 M\n mysql-community-libs                                          x86_64                                8.0.37-1.el8                                mysql80-community                                1.5 M\n\nTransaction Summary\n========================================================================================================================================================================================================\nInstall  6 Packages<\/pre><\/div>\n\n\n\n<p>Aktifkan service MySQL agar dapat berjalan otomatis saat server direboot<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \">systemctl enable --now mysqld<\/pre><\/div>\n\n\n\n<p>Cek status MySQL menggunakan perintah berikut<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \">systemctl status mysqld<\/pre><\/div>\n\n\n\n<p>Pastikan outputnya seperti berikut<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \" >\u25cf mysqld.service - MySQL Server\n   Loaded: loaded (\/usr\/lib\/systemd\/system\/mysqld.service; enabled; vendor preset: disabled)\n   Active: active (running) since Sat 2024-06-15 17:40:49 UTC; 21s ago\n     Docs: man:mysqld(8)\n           http:\/\/dev.mysql.com\/doc\/refman\/en\/using-systemd.html\n  Process: 1926 ExecStartPre=\/usr\/bin\/mysqld_pre_systemd (code=exited, status=0\/SUCCESS)\n Main PID: 1998 (mysqld)\n   Status: \"Server is operational\"\n    Tasks: 38 (limit: 5635)\n   Memory: 467.1M\n   CGroup: \/system.slice\/mysqld.service\n           \u2514\u25001998 \/usr\/sbin\/mysql<\/pre><\/div>\n\n\n\n<p>Cek versi MySQL saat ini<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \">mysql --version<\/pre><\/div>\n\n\n\n<p>Berikut contoh outputnya<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \" >mysql  Ver 8.0.37 for Linux on x86_64 (MySQL Community Server - GPL)<\/pre><\/div>\n\n\n\n<p>Secara otomatis MySQL akan membuat password secara acak untuk keamanan, silahkan jalankan perintah ini untuk melanjutkan ke tahap berikutnya<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \">cat \/var\/log\/mysqld.log | grep \"temporary password\"<\/pre><\/div>\n\n\n\n<p>Contoh outputnya seperti berikut<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \" >2024-06-15T17:40:39.436232Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: Wwq1)WpsgjGa<\/pre><\/div>\n\n\n\n<h4 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Konfigurasi_Keamanan_MySQL-2\"><\/span>Konfigurasi Keamanan MySQL<span class=\"ez-toc-section-end\"><\/span><\/h4>\n\n\n\n<p>Selanjutnya kita akan melakukan konfigurasi keamanan dasar. Jalankan perintah berikut untuk memulai proses setup keamanan pada MySQL. Masukkan password yang sudah diambil dari log, contohnya password kami untuk root sebelumnya adalah <kbd>Wwq1)WpsgjGa<\/kbd><\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \">mysql_secure_installation<\/pre><\/div>\n\n\n\n<p>Berikut contoh output ketika menjalankan perintah diatas<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \" >Securing 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: \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) : Y\nSuccess.\n\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!<\/pre><\/div>\n\n\n\n<p>Jalankan perintah berikut untuk login ke MySQL<\/p>\n\n\n\n<div class=\"wp-block-urvanov-syntax-highlighter-code-block\"><pre class=\"lang:sh decode:true \">mysql -u root -p<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Kesimpulan\"><\/span>Kesimpulan<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Dengan mengikuti panduan instalasi MySQL 8.0 pada server  AlmaLinux 8 yang telah kita bahas, Anda dapat dengan mudah mengintegrasikan MySQL ke dalam infrastruktur IT Anda. MySQL 8.0 menawarkan peningkatan kinerja, keamanan, dan fitur-fitur baru yang akan membantu Anda mengelola data Anda dengan lebih efisien. Jika Anda mengalami kendala, jangan ragu untuk mencari bantuan dari sumber-sumber yang terpercaya dan membaca <a href=\"https:\/\/dev.mysql.com\/doc\/\" target=\"_blank\" rel=\"noopener\">dokumentasi resmi MySQL<\/a>. Selamat mencoba!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Pengenalan Dalam era digital saat ini, manajemen data menjadi hal yang krusial bagi banyak bisnis dan organisasi. Sebagai salah satu sistem manajemen basis data yang paling populer, MySQL menawarkan fitur-fitur andal dan fleksibilitas yang dibutuhkan untuk mengelola data secara efektif. MySQL adalah sistem manajemen basis data relasional (RDBMS) yang bersifat open source dan populer di [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":886,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[44],"tags":[15,23],"class_list":{"0":"post-884","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-tutorial","8":"tag-mysql","9":"tag-server"},"_links":{"self":[{"href":"https:\/\/focusnic.com\/blog\/wp-json\/wp\/v2\/posts\/884","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/focusnic.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/focusnic.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/focusnic.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/focusnic.com\/blog\/wp-json\/wp\/v2\/comments?post=884"}],"version-history":[{"count":42,"href":"https:\/\/focusnic.com\/blog\/wp-json\/wp\/v2\/posts\/884\/revisions"}],"predecessor-version":[{"id":935,"href":"https:\/\/focusnic.com\/blog\/wp-json\/wp\/v2\/posts\/884\/revisions\/935"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/focusnic.com\/blog\/wp-json\/wp\/v2\/media\/886"}],"wp:attachment":[{"href":"https:\/\/focusnic.com\/blog\/wp-json\/wp\/v2\/media?parent=884"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/focusnic.com\/blog\/wp-json\/wp\/v2\/categories?post=884"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/focusnic.com\/blog\/wp-json\/wp\/v2\/tags?post=884"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}