mirror of
https://github.com/actions/runner-images.git
synced 2025-12-13 12:48:18 +00:00
Update mysql to version 8 on Ubuntu 20.04 (#621)
* mysql update to version 8 * changed package number and install dev tools * added latest version parser * removed sed for whitespaces - changed to grep. * removed unnessacary cut from script. * removed unnesscary grep. * added definition for ubuntus. * root password section moved from if Co-authored-by: Dariy.Nurgaleev <d.nurgaleev@trueengineering.ru>
This commit is contained in:
@@ -9,19 +9,31 @@ source $HELPER_SCRIPTS/document.sh
|
|||||||
|
|
||||||
export ACCEPT_EULA=Y
|
export ACCEPT_EULA=Y
|
||||||
|
|
||||||
# Install MySQL Client
|
if isUbuntu16 || isUbuntu18 ; then
|
||||||
apt-get install mysql-client -y
|
apt-get install mysql-client -y
|
||||||
|
fi
|
||||||
|
|
||||||
# InstallMySQL database development files
|
if isUbuntu20 ; then
|
||||||
apt-get install libmysqlclient-dev -y
|
# Install mysql 8 for Ubuntu 20.
|
||||||
|
|
||||||
# Install MySQL Server
|
debconf-set-selections <<< 'mysql-apt-config mysql-apt-config/select-server select mysql-8.0'
|
||||||
|
package_version=$(curl https://dev.mysql.com/downloads/repo/apt/ 2> /dev/null | grep "\.deb" | awk -F "[()]" '{print $2}')
|
||||||
|
wget https://dev.mysql.com/get/$package_version
|
||||||
|
dpkg -i $package_version
|
||||||
|
apt update
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Mysql setting up root password
|
||||||
MYSQL_ROOT_PASSWORD=root
|
MYSQL_ROOT_PASSWORD=root
|
||||||
echo "mysql-server mysql-server/root_password password $MYSQL_ROOT_PASSWORD" | debconf-set-selections
|
echo "mysql-server mysql-server/root_password password $MYSQL_ROOT_PASSWORD" | debconf-set-selections
|
||||||
echo "mysql-server mysql-server/root_password_again password $MYSQL_ROOT_PASSWORD" | debconf-set-selections
|
echo "mysql-server mysql-server/root_password_again password $MYSQL_ROOT_PASSWORD" | debconf-set-selections
|
||||||
|
|
||||||
|
# Install MySQL Server
|
||||||
apt-get install -y mysql-server
|
apt-get install -y mysql-server
|
||||||
|
|
||||||
|
#Install MySQL Dev tools
|
||||||
|
apt install libmysqlclient-dev -y
|
||||||
|
|
||||||
# Install MS SQL Server client tools (https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-setup-tools?view=sql-server-2017)
|
# Install MS SQL Server client tools (https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-setup-tools?view=sql-server-2017)
|
||||||
apt-get install -y mssql-tools unixodbc-dev
|
apt-get install -y mssql-tools unixodbc-dev
|
||||||
apt-get -f install
|
apt-get -f install
|
||||||
|
|||||||
Reference in New Issue
Block a user