{"id":14033,"date":"2025-05-03T04:40:19","date_gmt":"2025-05-03T04:40:19","guid":{"rendered":"https:\/\/greenwebpage.com\/community\/?p=14033"},"modified":"2025-05-03T05:07:23","modified_gmt":"2025-05-03T05:07:23","slug":"how-to-install-mysql-on-debian-12","status":"publish","type":"post","link":"https:\/\/greenwebpage.com\/community\/how-to-install-mysql-on-debian-12\/","title":{"rendered":"How to Install MySQL on Debian 12: In Just 8 Steps"},"content":{"rendered":"\n<p>Installing MySQL on Debian 12 will help someone from a structured and adaptable database framework. This integrates with several systems and services. Furthermore, its dependable and durable features make it more renowned than the others. Setting it up helps users maneuver operations quite easily and improves the overall productivity of the DB infrastructure.<\/p>\n\n\n\n<p>MySQL manual, along with active community support, helps to ease problem-solving and other operational improvements, making this combination useful even in complex scenarios. Furthermore, this makes it more appropriate for administrators, businesses, data analysts or anyone working with large databases who expect an efficient DBMS solution as the system is fairly easy to troubleshoot.<\/p>\n\n\n\n<p>This guide provides the iterative steps involved in installing and configuring MySQL on Debian 12.<\/p>\n\n\n\n<p><strong>Table of Content<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"#How-to-Install-MySQL-on-Debian-12\">How to Install MySQL on Debian 12?<\/a>\n<ul class=\"wp-block-list\">\n<li><a href=\"#Step-1:-Download-MySQL-Package\">Step 1: Download MySQL Package<\/a><\/li>\n\n\n\n<li><a href=\"#Step-2:-MySQL-Configuration-Package-Installation\">Step 2: MySQL Configuration Package Installation<\/a><\/li>\n\n\n\n<li><a href=\"#Step-3:-Refresh-the-System\">Step 3: Refresh the System<\/a><\/li>\n\n\n\n<li><a href=\"#Step-4:-MySQL-Installation\">Step 4: MySQL Installation<\/a><\/li>\n\n\n\n<li><a href=\"#Step-5:-Managing-the-Services\">Step 5: Managing the Services<\/a><\/li>\n\n\n\n<li><a href=\"#Step-6:-MySQL-Secure-Installation\">Step 6: MySQL Secure Installation<\/a><\/li>\n\n\n\n<li><a href=\"#Step-7:-Accessing-MySQL\">Step 7: Accessing MySQL<\/a><\/li>\n\n\n\n<li><a href=\"#Step-8:-Basic-MySQL-Tasks\">Step 8: Basic MySQL Tasks<\/a><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><a href=\"#Conclusion\">Conclusion<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"How-to-Install-MySQL-on-Debian-12\"><a id=\"post-14033-_nns4xjgstncy\"><\/a>How to Install MySQL on Debian 12?<\/h2>\n\n\n\n<p>The default repositories on Debian 12 do not find the MySQL package. Without the provided instructions, it isn\u2019t possible to install it on this Linux system. Thus, consider the below suggestions as they provide the most up-to-date version of MySQL.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Step-1:-Download-MySQL-Package\"><a id=\"post-14033-_jmmcghdn39n3\"><\/a>Step 1: Download MySQL Package<\/h3>\n\n\n\n<p>Let us first download the repository information package of MySQL that comes in .deb format.<\/p>\n\n\n\n<pre>wget https:\/\/dev.mysql.com\/get\/mysql-apt-config_0.8.30-1_all.deb<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1151\" height=\"727\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-1.png\" alt=\"wget https:\/\/dev.mysql.com\/get\/mysql-apt-config_0.8.30-1_all.deb\" class=\"wp-image-14034\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-1.png 1151w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-1-300x189.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-1-1024x647.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-1-768x485.png 768w\" sizes=\"(max-width: 1151px) 100vw, 1151px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Reminder<\/strong>. For the most recent release you should always check the repository page of MySQL.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Step-2:-MySQL-Configuration-Package-Installation\"><a id=\"post-14033-_8m9rcofysfoi\"><\/a>Step 2: MySQL Configuration Package Installation<\/h3>\n\n\n\n<p>Then, utilize the .deb package file to initialize the installation:<\/p>\n\n\n\n<pre>sudo dpkg -i mysql-apt-config_0.8.30-1_all.deb<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"1148\" height=\"298\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-2.png\" alt=\"sudo dpkg -i mysql-apt-config_0.8.30-1_all.deb\" class=\"wp-image-14035\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-2.png 1148w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-2-300x78.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-2-1024x266.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-2-768x199.png 768w\" sizes=\"(max-width: 1148px) 100vw, 1148px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Modify the product and update the existing DB server sources so they respond to the MySQL repository. For example, select the option for initializing configurations:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"1137\" height=\"747\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-3.png\" alt=\"MySQL package configuration\" class=\"wp-image-14036\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-3.png 1137w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-3-300x197.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-3-1024x673.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-3-768x505.png 768w\" sizes=\"(max-width: 1137px) 100vw, 1137px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>To choose a version like (mysql-8.4-lts), and hit OK to proceed:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1136\" height=\"773\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-4.png\" alt=\"MySQL package configuration\" class=\"wp-image-14037\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-4.png 1136w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-4-300x204.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-4-1024x697.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-4-768x523.png 768w\" sizes=\"(max-width: 1136px) 100vw, 1136px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Step-3:-Refresh-the-System\"><a id=\"post-14033-_6o95dsqeq0dw\"><\/a>Step 3: Refresh the System<\/h3>\n\n\n\n<p>Now, users need to modify the server package index on the server to accommodate the newly set MySQL information:<\/p>\n\n\n\n<pre>sudo apt update<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1148\" height=\"299\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-5.png\" alt=\"sudo apt update\" class=\"wp-image-14038\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-5.png 1148w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-5-300x78.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-5-1024x267.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-5-768x200.png 768w\" sizes=\"(max-width: 1148px) 100vw, 1148px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Step-4:-MySQL-Installation\"><a id=\"post-14033-_dqaygmn5krt\"><\/a>Step 4: MySQL Installation<\/h3>\n\n\n\n<p>Let\u2019s install MySQL. The steps needed to install the package are provided in the following code line:<\/p>\n\n\n\n<pre>sudo apt install mysql-server -y<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1142\" height=\"559\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-6.png\" alt=\"sudo apt install mysql-server -y\" class=\"wp-image-14039\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-6.png 1142w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-6-300x147.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-6-1024x501.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-6-768x376.png 768w\" sizes=\"(max-width: 1142px) 100vw, 1142px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>You will be directed to the dialog box for configuring the root account. For this option, set a stronger password to secure the database. Finally, click the Ok button:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1143\" height=\"781\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-7.png\" alt=\"MySQL package configuration\" class=\"wp-image-14040\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-7.png 1143w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-7-300x205.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-7-1024x700.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-7-768x525.png 768w\" sizes=\"(max-width: 1143px) 100vw, 1143px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Let\u2019s verify the version installed:<\/p>\n\n\n\n<pre>mysql --version<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1141\" height=\"136\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-8.png\" alt=\"mysql --version\" class=\"wp-image-14041\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-8.png 1141w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-8-300x36.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-8-1024x122.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-8-768x92.png 768w\" sizes=\"(max-width: 1141px) 100vw, 1141px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Step-5:-Managing-the-Services\"><a id=\"post-14033-_4peq9eo4otmp\"><\/a>Step 5: Managing the Services<\/h3>\n\n\n\n<p>The installed unit uses the systemd daemon which manages the runtime functions for the DB server. The next listed steps will help users manage the services and set the DB server to start automatically with the computer:<\/p>\n\n\n\n<p>Let\u2019s activate services to start at the time of booting:<\/p>\n\n\n\n<pre>sudo systemctl enable mysql<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1142\" height=\"121\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-9.png\" alt=\"sudo systemctl enable mysql\" class=\"wp-image-14042\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-9.png 1142w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-9-300x32.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-9-1024x108.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-9-768x81.png 768w\" sizes=\"(max-width: 1142px) 100vw, 1142px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Enable the services through the systemctl utility:<\/p>\n\n\n\n<pre>sudo systemctl start mysql<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1138\" height=\"123\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-10.png\" alt=\"sudo systemctl start mysql\" class=\"wp-image-14043\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-10.png 1138w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-10-300x32.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-10-1024x111.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-10-768x83.png 768w\" sizes=\"(max-width: 1138px) 100vw, 1138px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>In the end, confirm the status of the system service:<\/p>\n\n\n\n<pre>sudo systemctl status mysql<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1148\" height=\"610\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-11.png\" alt=\"sudo systemctl status mysql\" class=\"wp-image-14044\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-11.png 1148w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-11-300x159.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-11-1024x544.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-11-768x408.png 768w\" sizes=\"(max-width: 1148px) 100vw, 1148px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Step-6:-MySQL-Secure-Installation\"><a id=\"post-14033-_rpiqsuwftjtd\"><\/a>Step 6: MySQL Secure Installation<\/h3>\n\n\n\n<p>MySQL has other insecure defaults like permitting remote connections to the test databases as well as controlling the root database user of the server.<\/p>\n\n\n\n<p>The following steps will secure exposing the DB server and will disable all insecure default configurations:<\/p>\n\n\n\n<p>Completing administrative privileges is crucial, especially In securing MySQL after commencing the installation. MySQL provides an automation security script which helps in performing these changes:<\/p>\n\n\n\n<pre>sudo mysql_secure_installation<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1148\" height=\"722\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-12.png\" alt=\"sudo mysql_secure_installation\" class=\"wp-image-14045\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-12.png 1148w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-12-300x189.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-12-1024x644.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-12-768x483.png 768w\" sizes=\"(max-width: 1148px) 100vw, 1148px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>As for the VALIDATE PASSWORD policies, we are bound to strict password requirements: answer Y, then hit Enter.<\/p>\n\n\n\n<p>Certain security measures will need to be implemented by yourself:<\/p>\n\n\n\n<p><strong>1. Set the Root Password:<\/strong> Choose an appropriate value and make sure it is not too simple. Set the password policy according to the DB server that users desire. For example, to allow strong passwords on the server, type 2 and press Enter. If you\u2019re prompted to change the root password, type N, or if you do want to change the password, type Y.<\/p>\n\n\n\n<p><strong>2. Remove Anonymous Users:<\/strong> In order to restrict unwanted access, removing anonymous user permissions is recommended. For instance, input Y and Enter.<\/p>\n\n\n\n<p><strong>3. Prevent Accessibility of Remote Root: <\/strong>For various security reasons, it is preferable to disable remote root login. For blocking remote access, input Y and hit Enter.<\/p>\n\n\n\n<p><strong>4. Remove the Test DB:<\/strong> To increase security, the test database meant for testing can be removed. To implement this, input Y and hit Enter.<\/p>\n\n\n\n<p><strong>5. Refreshing Privilege Tables:<\/strong> This ensures that all the changes are put into effect immediately. To apply the changes and modify the privilege table, hit Enter.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Step-7:-Accessing-MySQL\"><a id=\"post-14033-_5h4gnvogevt\"><\/a>Step 7: Accessing MySQL<\/h3>\n\n\n\n<p>MySQL will use the command line client to connect with and access the MySQL database server console.<\/p>\n\n\n\n<p>You should now be able to log in on the shell and execute commands against the database server. Type in root along with the password that was set during the safe installation steps:<\/p>\n\n\n\n<pre>sudo mysql -u root -p<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1150\" height=\"606\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-13.png\" alt=\"sudo mysql -u root -p\" class=\"wp-image-14046\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-13.png 1150w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-13-300x158.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-13-1024x540.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-13-768x405.png 768w\" sizes=\"(max-width: 1150px) 100vw, 1150px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"Step-8:-Basic-MySQL-Tasks\"><a id=\"post-14033-_kiquy4s8xd2x\"><\/a>Step 8: Basic MySQL Tasks<\/h3>\n\n\n\n<p>The created user should have their very own database and a unique username for login instead of the root user. Do the following to achieve this:<\/p>\n\n\n\n<p><strong>1. Creation of the Particular DB:<\/strong><\/p>\n\n\n\n<p>Users should first initiate the creation of the DB. For demonstration, we will use <strong>example_db<\/strong>, which can be created with the command below:<\/p>\n\n\n\n<pre>CREATE DATABASE example_db;<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1138\" height=\"166\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-14.png\" alt=\"CREATE DATABASE example_db;\" class=\"wp-image-14047\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-14.png 1138w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-14-300x44.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-14-1024x149.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-14-768x112.png 768w\" sizes=\"(max-width: 1138px) 100vw, 1138px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>2. Display all DBs<\/strong><\/p>\n\n\n\n<p>Access all the databases to check whether the <strong>example_db <\/strong>has been created with the following command:<\/p>\n\n\n\n<pre>SHOW DATABASES;<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1150\" height=\"475\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-15.png\" alt=\"SHOW DATABASES;\" class=\"wp-image-14048\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-15.png 1150w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-15-300x124.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-15-1024x423.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-15-768x317.png 768w\" sizes=\"(max-width: 1150px) 100vw, 1150px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>3. Creation of a New User:<\/strong><\/p>\n\n\n\n<p>Use a database managed by the newly created user, such as <strong>debian12<\/strong>, for the granted permissions on the <strong>example_db<\/strong>. The new user called <strong>example_db <\/strong>has to have a strong password assigned:<\/p>\n\n\n\n<pre>CREATE USER 'debian12'@'localhost' IDENTIFIED BY 'Qwer@1234';<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1143\" height=\"180\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-16.png\" alt=\"CREATE USER 'debian12'@'localhost' IDENTIFIED BY 'Qwer@1234';\" class=\"wp-image-14049\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-16.png 1143w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-16-300x47.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-16-1024x161.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-16-768x121.png 768w\" sizes=\"(max-width: 1143px) 100vw, 1143px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>4. Give Permission to the User:<\/strong><\/p>\n\n\n\n<p>Do not deny the user complete access of the <strong>example_db <\/strong>to the <strong>debian12<\/strong>:<\/p>\n\n\n\n<pre>GRANT ALL PRIVILEGES ON example_db.* TO 'debian12'@'localhost';<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1142\" height=\"146\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-17.png\" alt=\"GRANT ALL PRIVILEGES ON example_db.* TO 'debian12'@'localhost';\" class=\"wp-image-14050\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-17.png 1142w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-17-300x38.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-17-1024x131.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-17-768x98.png 768w\" sizes=\"(max-width: 1142px) 100vw, 1142px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>5. Flush Privileges:<\/strong><\/p>\n\n\n\n<p>For refreshing the user table to enforce the modifications:<\/p>\n\n\n\n<pre>FLUSH PRIVILEGES;<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1151\" height=\"174\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-18.png\" alt=\"FLUSH PRIVILEGES;\" class=\"wp-image-14051\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-18.png 1151w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-18-300x45.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-18-1024x155.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-18-768x116.png 768w\" sizes=\"(max-width: 1151px) 100vw, 1151px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>6. Exit the Shell:<\/strong><\/p>\n\n\n\n<p>Users can end the session using the EXIT statement. EXIT;<\/p>\n\n\n\n<pre>EXIT;<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1153\" height=\"183\" src=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-19.png\" alt=\"EXIT;\" class=\"wp-image-14052\" srcset=\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-19.png 1153w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-19-300x48.png 300w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-19-1024x163.png 1024w, https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/word-image-14033-19-768x122.png 768w\" sizes=\"(max-width: 1153px) 100vw, 1153px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Conclusion\"><a id=\"post-14033-_emur0l77i55y\"><\/a>Conclusion<\/h2>\n\n\n\n<p>MySQL environment is one of the common types an individual should consider as important in today\u2019s digital world. The installation of MySQL on a Debian-based system enables an individual to experience the full efficiency of the DB operations and, therefore, optimize the overall functioning of the DB infrastructure. Following the steps given above will ensure that an individual is able to securely install and connect to his MySQL DB. Such an approach enhances the security of a system and also adds to the remote database maintenance efficiency. It assists in protecting unauthorized access and ensures information confidentiality.<\/p>\n\n\n\n<p>The article has described the steps required for installation of the MySQL effective database environment. However the author strongly recommends one to constantly monitor and optimize the performance of the MySQL servers in order to assure the reliability and efficiency of the system.<\/p>\n\n\n\t\t\t\t\t\t\t<h3 style=\"margin-bottom:20px;display:block;width:100%;margin-top:10px\">Frequently Asked Questions <\/h3>\r\n\t\t\t\t\t\t<style>\r\n\t\t\t\t<style>\r\n#wpsm_accordion_14060 .wpsm_panel-heading{\r\n\tpadding:0px !important;\r\n}\r\n#wpsm_accordion_14060 .wpsm_panel-title {\r\n\tmargin:0px !important; \r\n\ttext-transform:none !important;\r\n\tline-height: 1 !important;\r\n}\r\n#wpsm_accordion_14060 .wpsm_panel-title a{\r\n\ttext-decoration:none;\r\n\toverflow:hidden;\r\n\tdisplay:block;\r\n\tpadding:0px;\r\n\tfont-size: 18px !important;\r\n\tfont-family: Open Sans !important;\r\n\tcolor:#000000 !important;\r\n\tborder-bottom:0px !important;\r\n}\r\n\r\n#wpsm_accordion_14060 .wpsm_panel-title a:focus {\r\noutline: 0px !important;\r\n}\r\n\r\n#wpsm_accordion_14060 .wpsm_panel-title a:hover, #wpsm_accordion_14060 .wpsm_panel-title a:focus {\r\n\tcolor:#000000 !important;\r\n}\r\n#wpsm_accordion_14060 .acc-a{\r\n\tcolor: #000000 !important;\r\n\tbackground-color:#e8e8e8 !important;\r\n\tborder-color: #ddd;\r\n}\r\n#wpsm_accordion_14060 .wpsm_panel-default > .wpsm_panel-heading{\r\n\tcolor: #000000 !important;\r\n\tbackground-color: #e8e8e8 !important;\r\n\tborder-color: #e8e8e8 !important;\r\n\tborder-top-left-radius: 0px;\r\n\tborder-top-right-radius: 0px;\r\n}\r\n#wpsm_accordion_14060 .wpsm_panel-default {\r\n\t\tborder:1px solid transparent !important;\r\n\t}\r\n#wpsm_accordion_14060 {\r\n\tmargin-bottom: 20px;\r\n\toverflow: hidden;\r\n\tfloat: none;\r\n\twidth: 100%;\r\n\tdisplay: block;\r\n}\r\n#wpsm_accordion_14060 .ac_title_class{\r\n\tdisplay: block;\r\n\tpadding-top: 12px;\r\n\tpadding-bottom: 12px;\r\n\tpadding-left: 15px;\r\n\tpadding-right: 15px;\r\n}\r\n#wpsm_accordion_14060  .wpsm_panel {\r\n\toverflow:hidden;\r\n\t-webkit-box-shadow: 0 0px 0px rgba(0, 0, 0, .05);\r\n\tbox-shadow: 0 0px 0px rgba(0, 0, 0, .05);\r\n\t\tborder-radius: 4px;\r\n\t}\r\n#wpsm_accordion_14060  .wpsm_panel + .wpsm_panel {\r\n\t\tmargin-top: 5px;\r\n\t}\r\n#wpsm_accordion_14060  .wpsm_panel-body{\r\n\tbackground-color:#ffffff !important;\r\n\tcolor:#000000 !important;\r\n\tborder-top-color: #e8e8e8 !important;\r\n\tfont-size:16px !important;\r\n\tfont-family: Open Sans !important;\r\n\toverflow: hidden;\r\n\t\tborder: 2px solid #e8e8e8 !important;\r\n\t}\r\n\r\n#wpsm_accordion_14060 .ac_open_cl_icon{\r\n\tbackground-color:#e8e8e8 !important;\r\n\tcolor: #000000 !important;\r\n\tfloat:right !important;\r\n\tpadding-top: 12px !important;\r\n\tpadding-bottom: 12px !important;\r\n\tline-height: 1.0 !important;\r\n\tpadding-left: 15px !important;\r\n\tpadding-right: 15px !important;\r\n\tdisplay: inline-block !important;\r\n}\r\n\r\n\t\t\t\r\n\t\t\t<\/style>\t\r\n\t\t\t<\/style>\r\n\t\t\t<div class=\"wpsm_panel-group\" id=\"wpsm_accordion_14060\" >\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t<!-- Inner panel Start -->\r\n\t\t\t\t\t<div class=\"wpsm_panel wpsm_panel-default\">\r\n\t\t\t\t\t\t<div class=\"wpsm_panel-heading\" role=\"tab\" >\r\n\t\t\t\t\t\t  <h4 class=\"wpsm_panel-title\">\r\n\t\t\t\t\t\t\t<a  class=\"\"  data-toggle=\"collapse\" data-parent=\"#wpsm_accordion_14060 \" href=\"javascript:void(0)\" data-target=\"#ac_14060_collapse1\" onclick=\"do_resize()\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"ac_open_cl_icon fa fa-plus\"><\/span>\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t<span class=\"ac_title_class\">\r\n\t\t\t\t\t\t\t\t\tHow do I update my package list before installing MySQL?\t\t\t\t\t\t\t\t<\/span>\r\n\t\t\t\t\t\t\t<\/a>\r\n\t\t\t\t\t\t  <\/h4>\r\n\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t\t<div id=\"ac_14060_collapse1\" class=\"wpsm_panel-collapse collapse \"  >\r\n\t\t\t\t\t\t  <div class=\"wpsm_panel-body\">\r\n\t\t\t\t\t\t\tUse the command <code>sudo apt update<\/code> to ensure your package list is up to date before installation.\r\n\r\n\t\t\t\t\t\t  <\/div>\r\n\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<!-- Inner panel End -->\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t<!-- Inner panel Start -->\r\n\t\t\t\t\t<div class=\"wpsm_panel wpsm_panel-default\">\r\n\t\t\t\t\t\t<div class=\"wpsm_panel-heading\" role=\"tab\" >\r\n\t\t\t\t\t\t  <h4 class=\"wpsm_panel-title\">\r\n\t\t\t\t\t\t\t<a  class=\"collapsed\"  data-toggle=\"collapse\" data-parent=\"#wpsm_accordion_14060 \" href=\"javascript:void(0)\" data-target=\"#ac_14060_collapse2\" onclick=\"do_resize()\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"ac_open_cl_icon fa fa-plus\"><\/span>\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t<span class=\"ac_title_class\">\r\n\t\t\t\t\t\t\t\t\tHow do I install MySQL server on Debian 12?\t\t\t\t\t\t\t\t<\/span>\r\n\t\t\t\t\t\t\t<\/a>\r\n\t\t\t\t\t\t  <\/h4>\r\n\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t\t<div id=\"ac_14060_collapse2\" class=\"wpsm_panel-collapse collapse \"  >\r\n\t\t\t\t\t\t  <div class=\"wpsm_panel-body\">\r\n\t\t\t\t\t\t\tRun <code>sudo apt install mysql-server<\/code> in your terminal. This installs the default MySQL version from Debian\u2019s repository.\t\t\t\t\t\t  <\/div>\r\n\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<!-- Inner panel End -->\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t<!-- Inner panel Start -->\r\n\t\t\t\t\t<div class=\"wpsm_panel wpsm_panel-default\">\r\n\t\t\t\t\t\t<div class=\"wpsm_panel-heading\" role=\"tab\" >\r\n\t\t\t\t\t\t  <h4 class=\"wpsm_panel-title\">\r\n\t\t\t\t\t\t\t<a  class=\"collapsed\"  data-toggle=\"collapse\" data-parent=\"#wpsm_accordion_14060 \" href=\"javascript:void(0)\" data-target=\"#ac_14060_collapse3\" onclick=\"do_resize()\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"ac_open_cl_icon fa fa-plus\"><\/span>\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t<span class=\"ac_title_class\">\r\n\t\t\t\t\t\t\t\t\tHow do I check if MySQL is running?\t\t\t\t\t\t\t\t<\/span>\r\n\t\t\t\t\t\t\t<\/a>\r\n\t\t\t\t\t\t  <\/h4>\r\n\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t\t<div id=\"ac_14060_collapse3\" class=\"wpsm_panel-collapse collapse \"  >\r\n\t\t\t\t\t\t  <div class=\"wpsm_panel-body\">\r\n\t\t\t\t\t\t\tUse <code>sudo systemctl status mysql<\/code> to check the service status. You should see it listed as \"active (running)\".\t\t\t\t\t\t  <\/div>\r\n\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<!-- Inner panel End -->\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t<!-- Inner panel Start -->\r\n\t\t\t\t\t<div class=\"wpsm_panel wpsm_panel-default\">\r\n\t\t\t\t\t\t<div class=\"wpsm_panel-heading\" role=\"tab\" >\r\n\t\t\t\t\t\t  <h4 class=\"wpsm_panel-title\">\r\n\t\t\t\t\t\t\t<a  class=\"collapsed\"  data-toggle=\"collapse\" data-parent=\"#wpsm_accordion_14060 \" href=\"javascript:void(0)\" data-target=\"#ac_14060_collapse4\" onclick=\"do_resize()\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"ac_open_cl_icon fa fa-plus\"><\/span>\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t<span class=\"ac_title_class\">\r\n\t\t\t\t\t\t\t\t\tHow do I start or stop the MySQL service?\t\t\t\t\t\t\t\t<\/span>\r\n\t\t\t\t\t\t\t<\/a>\r\n\t\t\t\t\t\t  <\/h4>\r\n\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t\t<div id=\"ac_14060_collapse4\" class=\"wpsm_panel-collapse collapse \"  >\r\n\t\t\t\t\t\t  <div class=\"wpsm_panel-body\">\r\n\t\t\t\t\t\t\tUse <code>sudo systemctl start mysql<\/code> to start and <code>sudo systemctl stop mysql<\/code> to stop the service.\t\t\t\t\t\t  <\/div>\r\n\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<!-- Inner panel End -->\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t<!-- Inner panel Start -->\r\n\t\t\t\t\t<div class=\"wpsm_panel wpsm_panel-default\">\r\n\t\t\t\t\t\t<div class=\"wpsm_panel-heading\" role=\"tab\" >\r\n\t\t\t\t\t\t  <h4 class=\"wpsm_panel-title\">\r\n\t\t\t\t\t\t\t<a  class=\"collapsed\"  data-toggle=\"collapse\" data-parent=\"#wpsm_accordion_14060 \" href=\"javascript:void(0)\" data-target=\"#ac_14060_collapse5\" onclick=\"do_resize()\">\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"ac_open_cl_icon fa fa-plus\"><\/span>\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t<span class=\"ac_title_class\">\r\n\t\t\t\t\t\t\t\t\tHow can I secure my MySQL installation?\t\t\t\t\t\t\t\t<\/span>\r\n\t\t\t\t\t\t\t<\/a>\r\n\t\t\t\t\t\t  <\/h4>\r\n\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t\t<div id=\"ac_14060_collapse5\" class=\"wpsm_panel-collapse collapse \"  >\r\n\t\t\t\t\t\t  <div class=\"wpsm_panel-body\">\r\n\t\t\t\t\t\t\tRun <code>sudo mysql_secure_installation<\/code> to configure root password, remove test users, and disable remote root login.\t\t\t\t\t\t  <\/div>\r\n\t\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<\/div>\r\n\t\t\t\t\t<!-- Inner panel End -->\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t\t<\/div>\r\n\t\t\t\r\n<script type=\"text\/javascript\">\r\n\t\r\n\t\tfunction do_resize(){\r\n\r\n\t\t\tvar width=jQuery( '.wpsm_panel .wpsm_panel-body iframe' ).width();\r\n\t\t\tvar height=jQuery( '.wpsm_panel .wpsm_panel-body iframe' ).height();\r\n\r\n\t\t\tvar toggleSize = true;\r\n\t\t\tjQuery('iframe').animate({\r\n\t\t\t    width: toggleSize ? width : 640,\r\n\t\t\t    height: toggleSize ? height : 360\r\n\t\t\t  }, 250);\r\n\r\n\t\t\t  toggleSize = !toggleSize;\r\n\t\t}\r\n\t\t\r\n<\/script>\t\n\n    <div class=\"xs_social_share_widget xs_share_url after_content \t\tmain_content  wslu-style-1 wslu-share-box-shaped wslu-fill-colored wslu-none wslu-share-horizontal wslu-theme-font-no wslu-main_content\">\n\n\t\t\n        <ul>\n\t\t\t        <\/ul>\n    <\/div> \n","protected":false},"excerpt":{"rendered":"<p>Installing MySQL on Debian 12 will help someone from a structured and adaptable database framework. This integrates with several systems and services. Furthermore, its dependable and durable features make it more renowned than the others. Setting it up helps users maneuver operations quite easily and improves the overall productivity of the DB infrastructure. MySQL manual, [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":14063,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43],"tags":[521,520,297,250],"class_list":["post-14033","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-database-administration","tag-databases","tag-debian-12","tag-mysql"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Install MySQL on Debian 12: In Just 8 Steps<\/title>\n<meta name=\"description\" content=\"This guide provides the iterative steps involved in installing and configuring MySQL on Debian 12. Learn more!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/greenwebpage.com\/community\/how-to-install-mysql-on-debian-12\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install MySQL on Debian 12: In Just 8 Steps\" \/>\n<meta property=\"og:description\" content=\"This guide provides the iterative steps involved in installing and configuring MySQL on Debian 12. Learn more!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/greenwebpage.com\/community\/how-to-install-mysql-on-debian-12\/\" \/>\n<meta property=\"og:site_name\" content=\"Greenwebpage Community\" \/>\n<meta property=\"article:published_time\" content=\"2025-05-03T04:40:19+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-05-03T05:07:23+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/HOW-TO-INSTALL-MySQL-on-Debian-12-1.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1020\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Karim Buzdar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Karim Buzdar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-mysql-on-debian-12\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-mysql-on-debian-12\/\"},\"author\":{\"name\":\"Karim Buzdar\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8\"},\"headline\":\"How to Install MySQL on Debian 12: In Just 8 Steps\",\"datePublished\":\"2025-05-03T04:40:19+00:00\",\"dateModified\":\"2025-05-03T05:07:23+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-mysql-on-debian-12\/\"},\"wordCount\":1064,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#organization\"},\"image\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-mysql-on-debian-12\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/HOW-TO-INSTALL-MySQL-on-Debian-12-1.jpg\",\"keywords\":[\"Database Administration\",\"Databases\",\"Debian 12\",\"MySQL\"],\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/greenwebpage.com\/community\/how-to-install-mysql-on-debian-12\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-mysql-on-debian-12\/\",\"url\":\"https:\/\/greenwebpage.com\/community\/how-to-install-mysql-on-debian-12\/\",\"name\":\"How to Install MySQL on Debian 12: In Just 8 Steps\",\"isPartOf\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-mysql-on-debian-12\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-mysql-on-debian-12\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/HOW-TO-INSTALL-MySQL-on-Debian-12-1.jpg\",\"datePublished\":\"2025-05-03T04:40:19+00:00\",\"dateModified\":\"2025-05-03T05:07:23+00:00\",\"description\":\"This guide provides the iterative steps involved in installing and configuring MySQL on Debian 12. Learn more!\",\"breadcrumb\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-mysql-on-debian-12\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/greenwebpage.com\/community\/how-to-install-mysql-on-debian-12\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-mysql-on-debian-12\/#primaryimage\",\"url\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/HOW-TO-INSTALL-MySQL-on-Debian-12-1.jpg\",\"contentUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/HOW-TO-INSTALL-MySQL-on-Debian-12-1.jpg\",\"width\":1020,\"height\":600,\"caption\":\"HOW TO INSTALL MySQL on Debian 12\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/greenwebpage.com\/community\/how-to-install-mysql-on-debian-12\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/greenwebpage.com\/community\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install MySQL on Debian 12: In Just 8 Steps\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#website\",\"url\":\"https:\/\/greenwebpage.com\/community\/\",\"name\":\"Greenwebpage Community\",\"description\":\"Get online in three steps with our wide range of web hosting solutions. Choose from professional business to enterprise options designed to meet your needs.\",\"publisher\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/greenwebpage.com\/community\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#organization\",\"name\":\"Greenwebpage Community\",\"url\":\"https:\/\/greenwebpage.com\/community\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png\",\"contentUrl\":\"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png\",\"width\":512,\"height\":512,\"caption\":\"Greenwebpage Community\"},\"image\":{\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8\",\"name\":\"Karim Buzdar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g\",\"caption\":\"Karim Buzdar\"},\"sameAs\":[\"https:\/\/greenwebpage.com\"],\"url\":\"https:\/\/greenwebpage.com\/community\/author\/karim\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install MySQL on Debian 12: In Just 8 Steps","description":"This guide provides the iterative steps involved in installing and configuring MySQL on Debian 12. Learn more!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/greenwebpage.com\/community\/how-to-install-mysql-on-debian-12\/","og_locale":"en_US","og_type":"article","og_title":"How to Install MySQL on Debian 12: In Just 8 Steps","og_description":"This guide provides the iterative steps involved in installing and configuring MySQL on Debian 12. Learn more!","og_url":"https:\/\/greenwebpage.com\/community\/how-to-install-mysql-on-debian-12\/","og_site_name":"Greenwebpage Community","article_published_time":"2025-05-03T04:40:19+00:00","article_modified_time":"2025-05-03T05:07:23+00:00","og_image":[{"width":1020,"height":600,"url":"http:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/HOW-TO-INSTALL-MySQL-on-Debian-12-1.jpg","type":"image\/jpeg"}],"author":"Karim Buzdar","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Karim Buzdar","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/greenwebpage.com\/community\/how-to-install-mysql-on-debian-12\/#article","isPartOf":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-install-mysql-on-debian-12\/"},"author":{"name":"Karim Buzdar","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8"},"headline":"How to Install MySQL on Debian 12: In Just 8 Steps","datePublished":"2025-05-03T04:40:19+00:00","dateModified":"2025-05-03T05:07:23+00:00","mainEntityOfPage":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-install-mysql-on-debian-12\/"},"wordCount":1064,"commentCount":0,"publisher":{"@id":"https:\/\/greenwebpage.com\/community\/#organization"},"image":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-install-mysql-on-debian-12\/#primaryimage"},"thumbnailUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/HOW-TO-INSTALL-MySQL-on-Debian-12-1.jpg","keywords":["Database Administration","Databases","Debian 12","MySQL"],"articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/greenwebpage.com\/community\/how-to-install-mysql-on-debian-12\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/greenwebpage.com\/community\/how-to-install-mysql-on-debian-12\/","url":"https:\/\/greenwebpage.com\/community\/how-to-install-mysql-on-debian-12\/","name":"How to Install MySQL on Debian 12: In Just 8 Steps","isPartOf":{"@id":"https:\/\/greenwebpage.com\/community\/#website"},"primaryImageOfPage":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-install-mysql-on-debian-12\/#primaryimage"},"image":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-install-mysql-on-debian-12\/#primaryimage"},"thumbnailUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/HOW-TO-INSTALL-MySQL-on-Debian-12-1.jpg","datePublished":"2025-05-03T04:40:19+00:00","dateModified":"2025-05-03T05:07:23+00:00","description":"This guide provides the iterative steps involved in installing and configuring MySQL on Debian 12. Learn more!","breadcrumb":{"@id":"https:\/\/greenwebpage.com\/community\/how-to-install-mysql-on-debian-12\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/greenwebpage.com\/community\/how-to-install-mysql-on-debian-12\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/greenwebpage.com\/community\/how-to-install-mysql-on-debian-12\/#primaryimage","url":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/HOW-TO-INSTALL-MySQL-on-Debian-12-1.jpg","contentUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2025\/05\/HOW-TO-INSTALL-MySQL-on-Debian-12-1.jpg","width":1020,"height":600,"caption":"HOW TO INSTALL MySQL on Debian 12"},{"@type":"BreadcrumbList","@id":"https:\/\/greenwebpage.com\/community\/how-to-install-mysql-on-debian-12\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/greenwebpage.com\/community\/"},{"@type":"ListItem","position":2,"name":"How to Install MySQL on Debian 12: In Just 8 Steps"}]},{"@type":"WebSite","@id":"https:\/\/greenwebpage.com\/community\/#website","url":"https:\/\/greenwebpage.com\/community\/","name":"Greenwebpage Community","description":"Get online in three steps with our wide range of web hosting solutions. Choose from professional business to enterprise options designed to meet your needs.","publisher":{"@id":"https:\/\/greenwebpage.com\/community\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/greenwebpage.com\/community\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/greenwebpage.com\/community\/#organization","name":"Greenwebpage Community","url":"https:\/\/greenwebpage.com\/community\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/","url":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png","contentUrl":"https:\/\/greenwebpage.com\/community\/wp-content\/uploads\/2023\/10\/cropped-logomic.png","width":512,"height":512,"caption":"Greenwebpage Community"},"image":{"@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/467c100c1d017bc081473ee0440680c8","name":"Karim Buzdar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/greenwebpage.com\/community\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0628fcbcddd9bc5486245d2cf4a904dbcdeac9ad6c3098f49237094e9d513d0c?s=96&d=mm&r=g","caption":"Karim Buzdar"},"sameAs":["https:\/\/greenwebpage.com"],"url":"https:\/\/greenwebpage.com\/community\/author\/karim\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts\/14033","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/comments?post=14033"}],"version-history":[{"count":6,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts\/14033\/revisions"}],"predecessor-version":[{"id":14065,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/posts\/14033\/revisions\/14065"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/media\/14063"}],"wp:attachment":[{"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/media?parent=14033"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/categories?post=14033"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/greenwebpage.com\/community\/wp-json\/wp\/v2\/tags?post=14033"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}