Advertisement
sourav8256

Untitled

Aug 23rd, 2023
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. Reading webpages...
  2.  
  3. To install MySQL on Linux, you can follow these general steps:
  4.  
  5. 1. Open a terminal on your Linux system.
  6.  
  7. 2. Update the package list by running the following command:
  8. ```
  9. sudo apt update
  10. ```
  11.  
  12. 3. Install the MySQL server package by running the following command:
  13. ```
  14. sudo apt install mysql-server
  15. ```
  16.  
  17. 4. During the installation process, you will be prompted to set a password for the MySQL root user. Choose a strong password and remember it.
  18.  
  19. 5. Once the installation is complete, start the MySQL service by running the following command:
  20. ```
  21. sudo systemctl start mysql
  22. ```
  23.  
  24. 6. To ensure that MySQL starts automatically on system boot, run the following command:
  25. ```
  26. sudo systemctl enable mysql
  27. ```
  28.  
  29. 7. You can verify that MySQL is running by executing the following command:
  30. ```
  31. sudo systemctl status mysql
  32. ```
  33.  
  34. 8. To secure your MySQL installation, run the following command and follow the prompts:
  35. ```
  36. sudo mysql_secure_installation
  37. ```
  38.  
  39. 9. You can now access the MySQL command-line interface by running the following command:
  40. ```
  41. mysql -u root -p
  42. ```
  43.  
  44. You will be prompted to enter the password you set for the MySQL root user.
  45.  
  46. That's it! You have successfully installed MySQL on your Linux system.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement