12345678910111213141516171819202122232425 |
- # Determine the group to add the user to based on the OS
- if [ -f /etc/os-release ]; then
- . /etc/os-release
- OS_NAME=$NAME
- fi
-
- # MySQL Installation for CentOS Stream
- if [[ "$OS_NAME" == "CentOS Linux" ]] || [[ "$OS_NAME" == "CentOS Stream" ]]; then
- bash elxr/i.mysql.centos.sh
- else
- # If on Ubuntu/Debian, you can use debconf-set-selections
- sudo debconf-set-selections <<EOF
- mysql-server mysql-server/lowercase-table-names select Enabled
- EOF
- sudo apt install mysql-server -y
- sudo systemctl start mysql
- fi
-
-
- # Output MySQL status
- echo "MySQL installation completed successfully."
-
- # You can log into MySQL by running:
- echo "You can log into MySQL with: mysql -u root -p"
|