![]() It will first ask the “ Validate Password Component,” which checks for strong passwords. Now, open up the secure installation using the following command: sudo mysql_secure_installationĪnd then, enter the password for the root user that you have set up in the previous command: This will prevent the MySQL installation from running into any errors. Make sure to change the password field and then exit from the MySQL shell exit To secure the MySQL server deployment with custom configurations, you can run the “secure installation wizard.” But before that, open up the MySQL shell using the following command: sudo mysqlĪnd once you are inside the shell, run the following command: ALTER USER IDENTIFIED WITH mysql_native_password BY 'SetRootPasswordHere' However, it is a better option to secure your MySQL installation. ![]() Now your MySQL server is all set up, and you can start using MySQL using the “ sudo mysql” command. Running this command will showcase the following result on the terminal: In case the output returns as “ Inactive,” then you will have the run the following command: sudo systemctl start mysqlĪlso, to make the MySQL service start at the time of OS boot, run the following command: sudo systemctl enable mysql This means that the MySQL services are running. Running the command should give the following output: To check that, run the following command in the terminal: sudo systemctl status mysql However, this doesn’t mean that MySQL service is running. And once it is done, you can verify its installation by checking its version using the following command: mysql -versionĪs you can see in the output images above, MySQL Server version 8 has been installed on your Linux Distribution. When you are prompted about the confirmation for download, type “ Y” and then press the enter key again:Īfter that, wait for the download and installation process to complete. Therefore, provide the password and hit the enter key: When you execute the command, it will ask you for the root user’s password. Once that is done, install MySQL Server using the following command:įor Ubuntu: sudo apt install mysql-server For that, you can use the following command: sudo apt upgrade -y Once that is done, upgrading the packages to their newest version is also a good practice. If you are running the Ubuntu operating system, then the “apt” packages list can be updated using the following command in the terminal: sudo apt update ![]() The first step for installing MySQL on your Linux machine is to update the packages list according to your distribution of Linux. If MySQL is not installed on your machine, follow the rest of the guide. To check this, type the following command in the terminal: mysql -version ![]() You may already have MySQL installed on your machine. MySQL is often installed as a requirement with other applications and services that the user installs on a Linux operating system. ![]() If that is the case, then this post will be your friend and guide you through the process. Often, installing MySQL and removing it from a Linux-based operating system can be quite daunting for new beginners. Many people prefer MySQL over other alternatives available in the market. The capabilities of this RDBMS are not only amazing but also quite user-friendly. MySQL is one of the most famous relational database management systems in the current market. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |