{"id":9350,"date":"2025-09-11T05:07:41","date_gmt":"2025-09-11T04:07:41","guid":{"rendered":"https:\/\/angga.feb.uns.ac.id\/?p=9350"},"modified":"2025-09-11T05:40:39","modified_gmt":"2025-09-11T04:40:39","slug":"install-mysql-8-4-5-di-ubuntu-24","status":"publish","type":"post","link":"https:\/\/angga.feb.uns.ac.id\/?p=9350","title":{"rendered":"Install Mysql 8.4.5 di ubuntu 24"},"content":{"rendered":"<blockquote class=\"wp-embedded-content\" data-secret=\"hWTkNYGXSD\"><p><a href=\"https:\/\/www.linuxtuto.com\/how-to-install-mysql-8-4-on-ubuntu-24-04\/\">How to Install MySQL 8.4 on Ubuntu 24.04<\/a><\/p><\/blockquote>\n<p><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;How to Install MySQL 8.4 on Ubuntu 24.04&#8221; &#8212; LinuxTuto\" src=\"https:\/\/www.linuxtuto.com\/how-to-install-mysql-8-4-on-ubuntu-24-04\/embed\/#?secret=Ud2V9Trlmu#?secret=hWTkNYGXSD\" data-secret=\"hWTkNYGXSD\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n<p>&nbsp;<\/p>\n<p>MySQL is a fast, open-source relational database system used to store, manage, and retrieve structured data\u00a0developed by Oracle. It stores data in tables organized by rows and columns and uses Structured Query Language (SQL) to manage and access that data.<\/p>\n<p>MySQL is known for being fast, reliable, and easy to use, making it one of the most popular databases for web applications, mobile apps, and enterprise software. It supports a variety of storage engines, offers replication features for scaling and high availability, and ensures data integrity with ACID-compliant transactions.<\/p>\n<p>In this tutorial, we will show you how to install MySQL 8.4 on a Ubuntu 24.04 OS.<\/p>\n<h2><span class=\"has-inline-color has-vivid-purple-color\">Update Operating System<\/span><\/h2>\n<p>Update your\u00a0<strong>Ubuntu 24.04<\/strong>\u00a0operating system to make sure all existing packages are up to date:<\/p>\n<pre><code># apt update &amp;&amp; apt upgrade -y<\/code><\/pre>\n<h2><span class=\"has-inline-color has-vivid-purple-color\">Add MySQL 8.4 Repository<\/span><\/h2>\n<p>MySQL 8.0 is the currently available version on the default Ubuntu 24.04 repositories.<\/p>\n<p>Go to the\u00a0<a href=\"https:\/\/dev.mysql.com\/downloads\/repo\/apt\/\">download page<\/a>\u00a0for the MySQL 8.4 APT repository.<\/p>\n<p>Also you can run the following command to download it to your Ubuntu 24.04 system:<\/p>\n<pre><code># wget https:\/\/dev.mysql.com\/get\/mysql-apt-config_0.8.34-1_all.deb<\/code><\/pre>\n<p>Now install the downloaded\u00a0<strong>.deb<\/strong>\u00a0package with the following command:<\/p>\n<pre><code># dpkg -i mysql-apt-config_0.8.34-1_all.deb<\/code><\/pre>\n<p>During the installation of the package, you will be asked to choose the versions of the MySQL server and other components that you want to install. Choose\u00a0<strong><span class=\"guilabel\">Ok<\/span><\/strong>\u00a0to finish the configuration and installation of the release package.<\/p>\n<h2><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1909\" src=\"https:\/\/www.linuxtuto.com\/wp-content\/uploads\/2025\/04\/MySQL_8.4.webp\" sizes=\"auto, (max-width: 900px) 100vw, 900px\" srcset=\"https:\/\/www.linuxtuto.com\/wp-content\/uploads\/2025\/04\/MySQL_8.4.webp 900w, https:\/\/www.linuxtuto.com\/wp-content\/uploads\/2025\/04\/MySQL_8.4-300x156.webp 300w, https:\/\/www.linuxtuto.com\/wp-content\/uploads\/2025\/04\/MySQL_8.4-768x399.webp 768w, https:\/\/www.linuxtuto.com\/wp-content\/uploads\/2025\/04\/MySQL_8.4-897x465.webp 897w, https:\/\/www.linuxtuto.com\/wp-content\/uploads\/2025\/04\/MySQL_8.4-684x355.webp 684w\" alt=\"MySQL 8.4 APT\" width=\"900\" height=\"467\" data-pagespeed-url-hash=\"1093666247\" \/><\/h2>\n<p>Once you are done, update the repository with the following command:<\/p>\n<pre><code># apt-get update<\/code><\/pre>\n<p>To check if MySQL 8.4 repo has been successfully installed run the following command:<\/p>\n<pre><code># apt-cache policy mysql-server<\/code><\/pre>\n<p>Output:<\/p>\n<pre><code>mysql-server:\r\n  Installed: (none)\r\n  Candidate: 8.4.5-1ubuntu24.04\r\n  Version table:\r\n     8.4.5-1ubuntu24.04 500\r\n        500 http:\/\/repo.mysql.com\/apt\/ubuntu noble\/mysql-8.4-lts amd64 Packages\r\n     8.0.41-0ubuntu0.24.04.1 500\r\n        500 http:\/\/archive.ubuntu.com\/ubuntu noble-updates\/main amd64 Packages\r\n        500 http:\/\/security.ubuntu.com\/ubuntu noble-security\/main amd64 Packages\r\n     8.0.36-2ubuntu3 500\r\n        500 http:\/\/archive.ubuntu.com\/ubuntu noble\/main amd64 Packages<\/code><\/pre>\n<h2><span class=\"has-inline-color has-vivid-purple-color\">Install MySQL 8.4 on Ubuntu 24.04<\/span><\/h2>\n<p>Now you are ready to install MySQL 8.4 with the following command:<\/p>\n<pre><code># apt install mysql-server<\/code><\/pre>\n<p>You will be asked to set root password, you may go ahead and set one.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-1912\" src=\"https:\/\/www.linuxtuto.com\/wp-content\/uploads\/2025\/04\/MySQL_8.4_root_password-900x469.webp\" sizes=\"auto, (max-width: 900px) 100vw, 900px\" srcset=\"https:\/\/www.linuxtuto.com\/wp-content\/uploads\/2025\/04\/MySQL_8.4_root_password-900x469.webp 900w, https:\/\/www.linuxtuto.com\/wp-content\/uploads\/2025\/04\/MySQL_8.4_root_password-300x156.webp 300w, https:\/\/www.linuxtuto.com\/wp-content\/uploads\/2025\/04\/MySQL_8.4_root_password-768x400.webp 768w, https:\/\/www.linuxtuto.com\/wp-content\/uploads\/2025\/04\/MySQL_8.4_root_password-1536x801.webp 1536w, https:\/\/www.linuxtuto.com\/wp-content\/uploads\/2025\/04\/MySQL_8.4_root_password-1222x637.webp 1222w, https:\/\/www.linuxtuto.com\/wp-content\/uploads\/2025\/04\/MySQL_8.4_root_password-897x468.webp 897w, https:\/\/www.linuxtuto.com\/wp-content\/uploads\/2025\/04\/MySQL_8.4_root_password-684x357.webp 684w, https:\/\/www.linuxtuto.com\/wp-content\/uploads\/2025\/04\/MySQL_8.4_root_password.webp 1886w\" alt=\"MySQL 8.4 root password\" width=\"900\" height=\"469\" data-pagespeed-url-hash=\"2921027535\" \/><\/p>\n<p>Then you can verify the installed version of\u00a0<code>MySQL<\/code>\u00a0with the following command:<\/p>\n<pre><code># mysql --version<\/code><\/pre>\n<p>Output:<\/p>\n<pre><code>mysql  Ver 8.4.5 for Linux on x86_64 (MySQL Community Server - GPL)<\/code><\/pre>\n<p>Start the database server daemon, and also enable it to start automatically at the next boot with the following commands:<\/p>\n<pre><code># systemctl start mysql\r\n# systemctl enable mysql<\/code><\/pre>\n<p>Check the status of the service:<\/p>\n<pre><code># systemctl status mysql<\/code><\/pre>\n<p>Example output:<\/p>\n<pre><code> \u25cf mysql.service - MySQL Community Server\r\n     Loaded: loaded (\/usr\/lib\/systemd\/system\/mysql.service; enabled; preset: enabled)\r\n     Active: active (running)\r\n       Docs: man:mysqld(8)\r\n             http:\/\/dev.mysql.com\/doc\/refman\/en\/using-systemd.html\r\n   Main PID: 5331 (mysqld)\r\n     Status: \"Server is operational\"\r\n      Tasks: 35 (limit: 2217)\r\n     Memory: 433.7M (peak: 449.8M)\r\n        CPU: 2.315s\r\n     CGroup: \/system.slice\/mysql.service\r\n             \u2514\u25005331 \/usr\/sbin\/mysqld\r\n<\/code><\/pre>\n<h2><span class=\"has-inline-color has-vivid-purple-color\">MySQL Create Database<\/span><\/h2>\n<p>We need to login to\u00a0<code>MySQL<\/code>\u00a0shell with the following command:<\/p>\n<pre><code># mysql -u root -p<\/code><\/pre>\n<p>To create a database in\u00a0<code>MySQL<\/code>\u00a0you need to run the following command:<\/p>\n<pre><code>mysql&gt; CREATE DATABASE your_db;<\/code><\/pre>\n<p>View the new database:<\/p>\n<pre><code>SHOW DATABASES;<\/code><\/pre>\n<p>To create a new\u00a0<code>MySQL<\/code>\u00a0user, run the following command:<\/p>\n<pre><code>mysql&gt; CREATE USER 'your_user'@localhost IDENTIFIED BY 'password';<\/code><\/pre>\n<p><strong>Note:<\/strong>\u00a0You should replace\u00a0<code>password<\/code>\u00a0with a secure password.<\/p>\n<p>Give the user full rights to the new database:<\/p>\n<pre><code>GRANT ALL PRIVILEGES ON your_db.* TO 'your_user'@'localhost';<\/code><\/pre>\n<p>Refresh privileges so they take effect:<\/p>\n<pre><code>FLUSH PRIVILEGES;<\/code><\/pre>\n<p>Exit the\u00a0<code>MySQL<\/code>\u00a0shell:<\/p>\n<pre><code>mysql&gt; exit<\/code><\/pre>\n<h2><span class=\"has-inline-color has-vivid-purple-color\">Comments and Conclusion<\/span><\/h2>\n<p>That\u2019s it. You have successfully installed\u00a0<code>MySQL 8.4<\/code>\u00a0on Ubuntu 24.04.<\/p>\n<p>For additional help or useful information, we recommend you to check\u00a0<a href=\"https:\/\/dev.mysql.com\/doc\/\" target=\"_blank\" rel=\"noopener\">the official MySQL documentation<\/a>.<\/p>\n<p>If you have any questions please leave a comment below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to Install MySQL 8.4 on Ubuntu 24.04 &nbsp; MySQL is a fast, open-source relational database system used to store, manage, and retrieve structured data\u00a0developed by Oracle. It stores data in tables organized by rows and columns and uses Structured Query Language (SQL) to manage and access that data. MySQL is known for being fast, [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":9352,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-9350","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/angga.feb.uns.ac.id\/index.php?rest_route=\/wp\/v2\/posts\/9350","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/angga.feb.uns.ac.id\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/angga.feb.uns.ac.id\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/angga.feb.uns.ac.id\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/angga.feb.uns.ac.id\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9350"}],"version-history":[{"count":1,"href":"https:\/\/angga.feb.uns.ac.id\/index.php?rest_route=\/wp\/v2\/posts\/9350\/revisions"}],"predecessor-version":[{"id":9351,"href":"https:\/\/angga.feb.uns.ac.id\/index.php?rest_route=\/wp\/v2\/posts\/9350\/revisions\/9351"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/angga.feb.uns.ac.id\/index.php?rest_route=\/wp\/v2\/media\/9352"}],"wp:attachment":[{"href":"https:\/\/angga.feb.uns.ac.id\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9350"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/angga.feb.uns.ac.id\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9350"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/angga.feb.uns.ac.id\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9350"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}