{"id":725,"date":"2016-12-23T00:00:00","date_gmt":"2016-12-23T00:00:00","guid":{"rendered":"http:\/\/blog.hostinger.io\/hostinger-tutorials\/uncategorized\/how-to-install-mysql-on-centos-7\/"},"modified":"2026-03-09T19:20:11","modified_gmt":"2026-03-09T19:20:11","slug":"how-to-install-mysql-on-centos","status":"publish","type":"post","link":"\/ng\/tutorials\/how-to-install-mysql-on-centos\/","title":{"rendered":"How to install MySQL on CentOS 9 Stream"},"content":{"rendered":"<?xml encoding=\"utf-8\" ?><p>MySQL is one of the most widely used database management systems for websites and server applications. It&rsquo;s an essential tool that every webmaster should learn. That&rsquo;s why in this tutorial, we will show you how to install MySQL on CentOS 9&nbsp;Stream through an SSH connection.<\/p><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"https:\/\/assets.hostinger.com\/content\/tutorials\/pdf\/Linux-Commands-Cheat-Sheet.pdf\"><img loading=\"lazy\" decoding=\"async\" width=\"2048\" height=\"566\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/11\/Linux-cheat-sheet.png\/w=1024,h=1024,fit=scale-down\" alt=\"\" class=\"wp-image-69262\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/11\/Linux-cheat-sheet.png\/w=2048,fit=scale-down 2048w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/11\/Linux-cheat-sheet.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/11\/Linux-cheat-sheet.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/11\/Linux-cheat-sheet.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/11\/Linux-cheat-sheet.png\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 2048px) 100vw, 2048px\" \/><\/a><\/figure>\n<\/div><p>\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-how-to-install-mysql-on-a-centos-9-stream-server\">How to Install MySQL on a CentOS 9 Stream Server?<\/h2><p>There are three steps needed when you want to install MySQL on CentOS 9 &mdash; download the MySQL repository, install it, and check its status. We&rsquo;ll go through each step in greater detail.<\/p><h3 class=\"wp-block-heading\" id=\"h-1-download-and-prepare-the-mysql-repository\">1. Download and Prepare the MySQL Repository<\/h3><p>Before we begin learning how to install MySQL, make sure that either your VPS or dedicated server is running on CentOS 9 Stream and you have root access to it. You can learn how to <a href=\"\/ng\/tutorials\/how-to-use-putty-ssh\/\">connect to your server via SSH<\/a> by following our tutorial.<\/p><ol class=\"wp-block-list\">\n<li>We need to update our system by typing in the following command:\n<pre>sudo yum update<\/pre>\n<\/li>\n\n\n\n<li>After the system is updated, it is time to download the MySQL repositories. You can also view other repository versions <a href=\"https:\/\/dev.mysql.com\/downloads\/repo\/yum\/\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a>.\n<pre>sudo wget https:\/\/dev.mysql.com\/get\/mysql80-community-release-el7-3.noarch.rpm<\/pre>\n<\/li>\n\n\n\n<li>At the end of the download, you should see a confirmation message that <strong>.rpm<\/strong> file was saved.<br><a href=\"\/ng\/tutorials\/wp-content\/uploads\/sites\/2\/2016\/12\/download-mysql-1.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2016\/12\/download-mysql-1.png\" alt=\"Downloading MySQL 8 on CentOS 7.\"><\/a><\/li>\n\n\n\n<li>Now, we need to prepare the repository so we could later install MySQL packages from it. Simply enter:\n<pre>sudo rpm -Uvh mysql80-community-release-el7-3.noarch.rpm<\/pre>\n<\/li>\n\n\n\n<li>Once the output indicates that the update and installation are complete, you will be able to install MySQL.<\/li>\n<\/ol><h3 class=\"wp-block-heading\" id=\"h-2-install-mysql\">2. Install MySQL<\/h3><ol class=\"wp-block-list\">\n<li>Use the following <strong>yum install<\/strong> command to install MySQL:\n<pre>sudo yum install mysql-server<\/pre>\n<\/li>\n\n\n\n<li>The script will return with a list of packages and ask you for confirmation to download and install them. Type <strong>y<\/strong> and press <strong>ENTER&nbsp;<\/strong>for each of the requests.<br><a href=\"\/ng\/tutorials\/wp-content\/uploads\/sites\/2\/2016\/12\/install-mysql.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2016\/12\/install-mysql.png\" alt=\"Install MySQL on CentOS 7.\"><\/a><\/li>\n\n\n\n<li>You&rsquo;ll need to do this a few times, but you&rsquo;ll eventually see the <strong>Complete!<\/strong> message at the end of the installation &mdash; it means that you have successfully installed MySQL on your server.<\/li>\n<\/ol><h3 class=\"wp-block-heading\" id=\"h-3-start-mysql-and-check-its-status\">3. Start MySQL and Check its Status<\/h3><ol class=\"wp-block-list\">\n<li>Once you have MySQL ready on CentOS 9, it does not automatically start right after the installation. Therefore, you need to start it manually through the following command: <pre>sudo systemctl start mysqld<\/pre><\/li>\n\n\n\n<li>You will get no response once MySQL starts so to check if it is working properly, use the command below:\n<pre>sudo systemctl status mysqld<\/pre>\n<\/li>\n\n\n\n<li>It will output the information about the MySQL process:<a href=\"\/ng\/tutorials\/wp-content\/uploads\/sites\/2\/2016\/12\/status-mysql.png\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2016\/12\/status-mysql.png\" alt=\"Checking the status after MySQL installation in Linux CentOS.\"><\/a><\/li>\n<\/ol><p>If you see that MySQL is active and running like in the screenshot above, you have successfully installed and started MySQL on your server.<\/p><p>Alternatively for <a href=\"\/ng\/vps-hosting\">Hostinger VPS<\/a> users, ask <strong>Kodee<\/strong> AI Assistant to check if MySQL is indeed running on your server. Access the feature via your dashboard&rsquo;s left sidebar, then type your prompt in the designated field like this:<\/p><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"6a58914cd03ae\"}' data-wp-interactive=\"core\/image\" data-wp-key=\"6a58914cd03ae\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"2282\" height=\"732\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on--click=\"actions.showLightbox\" data-wp-on--load=\"callbacks.setButtonStyles\" data-wp-on-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2016\/12\/hpanel-vps-kodee-mysql.png\/w=1024,h=1024,fit=scale-down\" alt=\"Kodee responds to a question about MySQL's status\" class=\"wp-image-124634\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2016\/12\/hpanel-vps-kodee-mysql.png\/w=2282,fit=scale-down 2282w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2016\/12\/hpanel-vps-kodee-mysql.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2016\/12\/hpanel-vps-kodee-mysql.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2016\/12\/hpanel-vps-kodee-mysql.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2016\/12\/hpanel-vps-kodee-mysql.png\/w=768,fit=scale-down 768w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2016\/12\/hpanel-vps-kodee-mysql.png\/w=1536,fit=scale-down 1536w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2016\/12\/hpanel-vps-kodee-mysql.png\/w=2048,fit=scale-down 2048w\" sizes=\"auto, (max-width: 2282px) 100vw, 2282px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><figure class=\"wp-block-image size-large\"><a class=\"hgr-tutorials-cta hgr-tutorials-cta-vps-hosting\" href=\"\/ng\/vps-hosting\" target=\"_blank\" rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"300\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner.png\/w=1024,h=1024,fit=scale-down\" alt=\"\" class=\"wp-image-77934\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/VPS-hosting-banner.png\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><h2 class=\"wp-block-heading\" id=\"h-how-to-configure-mysql\">How to Configure MySQL?<\/h2><p>Now that you&rsquo;re all set up, we&rsquo;re going to show you some useful commands and tweaks you should know when working with MySQL.<\/p><h3 class=\"wp-block-heading\" id=\"h-changing-mysql-root-user-password\">Changing MySQL Root User Password<\/h3><p>When installing MySQL on CentOS 9 Stream, a temporary root password is generated. Issue the command below to see it:<\/p><pre class=\"wp-block-preformatted ql-syntax\">sudo grep 'password' \/var\/log\/mysqld.log\n<\/pre><p>In order to change it, follow these steps:<\/p><ol class=\"wp-block-list\">\n<li>Firstly, run the following command:\n<pre>sudo mysql_secure_installation<\/pre>\n<\/li>\n\n\n\n<li>Enter the temporary password, and the following message will pop up:\n<pre>The existing password for the user account root has expired. Please set a new password.\nNew password:\nRe-enter new password:<\/pre>\n<\/li>\n\n\n\n<li>Now, type in a new strong password.<br><\/li>\n<\/ol><p>        <div class=\"protip\">\n            <div class=\"protip__heading\">\n                <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                    <path d=\"M1.49234 23.5024C1.23229 23.5024 0.972242 23.4024 0.782206 23.2123C0.562165 22.9923 0.452144 22.6822 0.502153 22.3722C0.562165 21.9221 1.14227 17.9113 3.00262 16.351C3.63274 15.8209 4.43289 15.5509 5.26305 15.5609C6.09321 15.5909 6.87335 15.9109 7.47347 16.4911C8.6937 17.6913 8.76371 19.6717 7.6435 20.9919C6.0832 22.8523 2.08245 23.4324 1.63237 23.4924C1.59236 23.4924 1.54235 23.4924 1.50234 23.4924L1.49234 23.5024ZM5.16303 17.5613C4.84297 17.5613 4.53291 17.6713 4.29287 17.8813C3.60274 18.4614 3.07264 19.9317 2.75258 21.242C4.06282 20.9219 5.5331 20.3918 6.11321 19.7017C6.55329 19.1716 6.54329 18.3814 6.0832 17.9213C5.85316 17.7013 5.5431 17.5713 5.20304 17.5613C5.19304 17.5613 5.17303 17.5613 5.16303 17.5613ZM11.7243 21.8821C11.4942 21.8821 11.2642 21.8021 11.0841 21.652C10.8541 21.462 10.7241 21.1819 10.7241 20.8819V15.9109L8.08358 13.2705H3.11264C2.81259 13.2705 2.53254 13.1404 2.3425 12.9104C2.15246 12.6803 2.07245 12.3803 2.12246 12.0902C2.19247 11.7102 2.84259 8.36953 4.70294 7.12929C6.33325 6.04909 8.96375 6.49918 10.244 6.80923C11.5442 4.96889 13.2546 3.4286 15.2349 2.33839C17.4553 1.11816 19.9858 0.518051 22.4963 0.498047C23.0464 0.498047 23.4865 0.948132 23.4865 1.49824C23.4865 5.0389 22.3763 9.97983 17.1753 13.7605C17.4853 15.0408 17.9354 17.6613 16.8552 19.2816C15.615 21.1419 12.2744 21.7921 11.8943 21.8621C11.8343 21.8721 11.7743 21.8821 11.7143 21.8821H11.7243ZM12.7245 16.181V19.6016C13.7146 19.2916 14.7948 18.7915 15.2049 18.1814C15.675 17.4812 15.605 16.091 15.385 14.9008C14.5248 15.3808 13.6346 15.8109 12.7245 16.181ZM9.66388 12.0302L11.9643 14.3307C13.1845 13.8306 14.3648 13.2204 15.485 12.5103C19.9358 9.51974 21.2361 5.60901 21.4561 2.53843C19.6157 2.67846 17.8254 3.20856 16.2051 4.09872C14.2847 5.14892 12.6544 6.68921 11.4942 8.54956C10.7841 9.65977 10.174 10.82 9.66388 12.0302ZM4.39289 11.2701H7.81353C8.1936 10.3599 8.63368 9.46974 9.11377 8.60957C7.92355 8.38953 6.51329 8.31952 5.81315 8.78961C5.19304 9.19968 4.70294 10.3099 4.39289 11.2701Z\" fill=\"#673DE6\"\/>\n                <\/svg>\n                <p class=\"protip__title\">\n                    Pro Tip                <\/p>\n            <\/div>\n            <p class=\"protip__content\"> A strong password is 8-12 characters long and includes numbers, special characters, uppercase, and lowercase letters.<\/p>\n                    <\/div>\n        \n\n\n\n<\/p><li>Follow the on-screen instructions and hit <strong>y<\/strong> to finish the setup. You have successfully changed the root user password.<\/li><h3 class=\"wp-block-heading\" id=\"h-checking-current-mysql-version\">Checking Current MySQL Version<\/h3><p>Once you&rsquo;ve MySQL installed on CentOS 9 Sream, you can test if everything was set up correctly by checking its version. Type in the following command:<\/p><pre class=\"wp-block-preformatted ql-syntax\">mysql -u root -p\n<\/pre><p>Enter the root password that you&rsquo;ve created, and the response will be as below:<\/p><pre class=\"wp-block-preformatted ql-syntax\">Welcome to the MySQL monitor.&nbsp; Commands end with ; or g.\nYour MySQL connection id is 22\nServer version: 8.0.20\n\nCopyright (c) 2000, 2020, Oracle and\/or its affiliates. All rights reserved.\n\nOracle is a registered trademark of Oracle Corporation and\/or its affiliates. Other names may be trademarks of their respective owners.\n\nType 'help;' or 'h' for help. Type 'c' to clear the current input statement.\n<\/pre><h3 class=\"wp-block-heading\" id=\"h-resetting-the-mysql-root-password\">Resetting the MySQL Root Password<\/h3><p>If you want to reset your password, the process is pretty straightforward. Follow the steps below to change your MySQL root password:<\/p><ol class=\"wp-block-list\">\n<li>Stop the MySQL server with this command:\n<pre>sudo systemctl stop mysqld<\/pre>\n<\/li>\n\n\n\n<li>Restart MySQL in <strong>safe mode<\/strong>, or without a password by typing in:\n<pre>sudo mysqld_safe --skip-grant-tables<\/pre>\n<\/li>\n\n\n\n<li>Press <strong>ENTER<\/strong> if the MySQL server has started but seems to be hanging.<\/li>\n\n\n\n<li>Use the following command to reconnect to MySQL as root:\n<pre>mysql -uroot<\/pre>\n<\/li>\n\n\n\n<li>To change the root password, use the following commands:\n<pre>USE MYSQL;\nUPDATE USER SET PASSWORD=PASSWORD(&ldquo;newpassword&rdquo;) WHERE USER=&rsquo;root&rsquo;;\nFLUSH PRIVILEGES;\nEXIT<\/pre>\n<\/li>\n\n\n\n<li>Replace the <strong>newpassword<\/strong> with a strong password of your own.<\/li>\n\n\n\n<li>Finally, restart MySQL using:\n<pre>sudo systemctl start mysqld<\/pre>\n<\/li>\n\n\n\n<li>You can now login to MySQL with your new password.<\/li>\n<\/ol><h3 class=\"wp-block-heading\" id=\"h-creating-a-new-mysql-user-database\">Creating a New MySQL User, Database<\/h3><p>As the root user in MySQL, you have full access to all of the databases.<\/p><p>However, if you work with a team, there are cases where you might need to apply some restrictions. You&rsquo;d either have to build a new database or create users with custom permissions.<\/p><p>Here&rsquo;s how to quickly solve this issue:<\/p><ol class=\"wp-block-list\">\n<li>Use the following command to create a new database:\n<pre>CREATE DATABASE newdb<\/pre>\n<\/li>\n\n\n\n<li>Change <strong>newdb<\/strong> with the name of the database.<\/li>\n\n\n\n<li>Create a new user by typing the following line:\n<pre>CREATE USER 'username'@'localhost' IDENTIFIED BY 'password'<\/pre>\n<\/li>\n\n\n\n<li>Change the variables for both <strong>username<\/strong> and <strong>password<\/strong> to create your new user.<\/li>\n\n\n\n<li>If you want to delete a certain user instead, use the command:\n<pre>DROP USER &lsquo;username&rsquo;@&lsquo;localhost&rsquo;<\/pre>\n<\/li>\n<\/ol><h3 class=\"wp-block-heading\" id=\"h-managing-mysql-user-permissions\">Managing MySQL User Permissions<\/h3><p>Grant the new user access to a database with by typing in:<\/p><pre class=\"wp-block-preformatted ql-syntax\">GRANT ALL PRIVILEGES ON newdb.* TO 'username'@'localhost'\n<\/pre><p>You can also grant privileges individually, including:<\/p><ul class=\"wp-block-list\">\n<li><strong>SELECT<\/strong> &ndash; users can read through the database using the select command<\/li>\n\n\n\n<li><strong>CREATE<\/strong> &ndash; they can generate new tables<\/li>\n\n\n\n<li><strong>DROP<\/strong> &ndash; allows users to remove tables<\/li>\n\n\n\n<li><strong>DELETE<\/strong> &ndash; users can take out rows from tables<\/li>\n\n\n\n<li><strong>INSERT<\/strong> &ndash; lets users add in rows into tables<\/li>\n\n\n\n<li><strong>UPDATE<\/strong> &ndash; enable them to update the rows<\/li>\n\n\n\n<li><strong>GRANT OPTION<\/strong> &ndash; they can grant or remove the privileges of other users<\/li>\n<\/ul><p>For example, to grant the <strong>CREATE<\/strong> privilege, you&rsquo;d need to type:<\/p><pre class=\"wp-block-preformatted ql-syntax\">GRANT CREATE ON newdb.* TO 'username'@'localhost'\n<\/pre><p>On the other hand, if you want to remove someone&rsquo;s access, use the following:<\/p><pre class=\"wp-block-preformatted ql-syntax\">REVOKE permission_type ON newdb.* TO 'username'@'localhost'\n<\/pre><p>You can also check what current privileges a user has:<\/p><pre class=\"wp-block-preformatted ql-syntax\">SHOW GRANTS username\n<\/pre><p>Finally, once you&rsquo;ve finished managing your users, it&rsquo;s a good idea to reset all the privileges by using this command for your changes to take effect:<\/p><pre class=\"wp-block-preformatted ql-syntax\">FLUSH PRIVILEGES\n<\/pre><h2 class=\"wp-block-heading\" id=\"h-other-useful-mysql-commands\">Other Useful MySQL Commands<\/h2><p>MySQL also has a list of other helpful commands. Simply enter <strong>h<\/strong> or <strong>help<\/strong> to view the list shown below:<\/p><pre class=\"wp-block-preformatted ql-syntax\">List of all MySQL commands:\nNote that all text commands must be first on line and end with ';'\n? &nbsp; &nbsp; &nbsp; &nbsp; (?) Synonym for `help'.\nclear &nbsp; &nbsp; (c) Clear command.\nconnect &nbsp; (r) Reconnect to the server. Optional arguments are db and host.\ndelimiter (d) Set statement delimiter. NOTE: Takes the rest of the line as new delimiter.\nedit&nbsp; &nbsp; &nbsp; (e) Edit command with $EDITOR.\nego &nbsp; &nbsp; &nbsp; (G) Send command to mysql server, display result vertically.\nexit&nbsp; &nbsp; &nbsp; (q) Exit mysql. Same as quit.\ngo&nbsp; &nbsp; &nbsp; &nbsp; (g) Send command to mysql server.\nhelp&nbsp; &nbsp; &nbsp; (h) Display this help.\nnopager &nbsp; (n) Disable pager, print to stdout.\nnotee &nbsp; &nbsp; (t) Don't write into outfile.\npager &nbsp; &nbsp; (P) Set PAGER [to_pager]. Print the query results via PAGER.\nprint &nbsp; &nbsp; (p) Print current command.\nprompt&nbsp; &nbsp; (R) Change your mysql prompt.\nquit&nbsp; &nbsp; &nbsp; (q) Quit mysql.\nrehash&nbsp; &nbsp; (#) Rebuild completion hash.\nsource&nbsp; &nbsp; (.) Execute an SQL script file. Takes a file name as an argument.\nstatus&nbsp; &nbsp; (s) Get status information from the server.\nsystem&nbsp; &nbsp; (!) Execute a system shell command.\ntee &nbsp; &nbsp; &nbsp; (T) Set outfile [to_outfile]. Append everything into given outfile.\nuse &nbsp; &nbsp; &nbsp; (u) Use another database. Takes database name as argument.\ncharset &nbsp; (C) Switch to another charset. Might be needed for processing binlog with multi-byte charsets.\nwarnings&nbsp; (W) Show warnings after every statement.\nnowarning (w) Don't show warnings after every statement.\n\nFor server side help, type 'help contents'\nmysql&gt;\n<\/pre><h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2><p>You have learned how to install MySQL on a CentOS 9 Stream server. By installing MySQL, you are able to store your databases and manage them efficiently on your server.<\/p><p>Be sure to check out our other <a href=\"\/ng\/tutorials\/what-is-vps-hosting\/\">VPS hosting tutorials<\/a> and leave a comment down below if you have any questions.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>MySQL is one of the most widely used database management systems for websites and server applications. It&rsquo;s an essential tool that every webmaster should learn. That&rsquo;s why in this tutorial, we will show you how to install MySQL on CentOS 9&nbsp;Stream through an SSH connection. How to Install MySQL on a CentOS 9 Stream Server? [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"\/ng\/tutorials\/how-to-install-mysql-on-centos\/\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":27,"featured_media":145410,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"How to Install MySQL on CentOS 9: A Step-by-Step Guide","rank_math_description":"MySQL is a popular database management system for applications and websites. In this article you'll learn how to install MySQL on CentOS 9.","rank_math_focus_keyword":"install mysql centos","footnotes":""},"categories":[22644],"tags":[],"class_list":["post-725","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-vps"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/tutorials\/how-to-install-mysql-on-centos","default":0},{"locale":"es-ES","link":"https:\/\/www.hostinger.com\/es\/tutoriales\/instalar-mysql-centos","default":0},{"locale":"id-ID","link":"https:\/\/www.hostinger.com\/id\/tutorial\/cara-install-mysql","default":0},{"locale":"en-GB","link":"https:\/\/www.hostinger.com\/uk\/tutorials\/how-to-install-mysql-on-centos","default":0},{"locale":"en-MY","link":"https:\/\/www.hostinger.com\/my\/tutorials\/how-to-install-mysql-on-centos","default":0},{"locale":"en-PH","link":"https:\/\/www.hostinger.com\/ph\/tutorials\/how-to-install-mysql-on-centos","default":0},{"locale":"es-MX","link":"https:\/\/www.hostinger.com\/mx\/tutoriales\/instalar-mysql-centos","default":0},{"locale":"es-CO","link":"https:\/\/www.hostinger.com\/co\/tutoriales\/instalar-mysql-centos","default":0},{"locale":"es-AR","link":"https:\/\/www.hostinger.com\/ar\/tutoriales\/instalar-mysql-centos","default":0},{"locale":"en-IN","link":"https:\/\/www.hostinger.com\/in\/tutorials\/how-to-install-mysql-on-centos","default":0},{"locale":"en-CA","link":"https:\/\/www.hostinger.com\/ca\/tutorials\/how-to-install-mysql-on-centos","default":0},{"locale":"en-AU","link":"https:\/\/www.hostinger.com\/au\/tutorials\/how-to-install-mysql-on-centos","default":0},{"locale":"en-NG","link":"https:\/\/www.hostinger.com\/ng\/tutorials\/how-to-install-mysql-on-centos","default":0}],"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/posts\/725","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/users\/27"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/comments?post=725"}],"version-history":[{"count":33,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/posts\/725\/revisions"}],"predecessor-version":[{"id":145409,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/posts\/725\/revisions\/145409"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/media\/145410"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/media?parent=725"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/categories?post=725"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/tags?post=725"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}