You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

installmysql57.sh 723B

12345678910111213141516171819202122232425262728
  1. #!/bin/bash
  2. # Update the system
  3. sudo yum update -y
  4. # Download the MySQL Yum Repository configuration package
  5. wget https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm
  6. # Install the MySQL Yum Repository
  7. sudo rpm -ivh mysql57-community-release-el7-11.noarch.rpm
  8. # Install MySQL Server
  9. sudo yum install mysql-server -y
  10. # Enable lower_case_table_names in the MySQL configuration
  11. sudo sh -c "echo 'lower_case_table_names = 1' >> /etc/my.cnf"
  12. # Start the MySQL service
  13. sudo systemctl start mysqld
  14. # Secure the MySQL installation
  15. sudo mysql_secure_installation
  16. # Restart the MySQL service
  17. sudo systemctl restart mysqld
  18. # Optional: Enable MySQL to start automatically on boot
  19. sudo systemctl enable mysqld