Thursday, August 25, 2016

Unattented mysql installation under Debian for scripts

export DEBIAN_FRONTEND=noninteractive && apt-get -y -f install mysql-server-5.6 && mysqladmin -u root password XXXXXXXXX
#create mysql database and user
mysql -uroot -pXXXXXXXXX -e'create database YYYYYYYY;'
mysql -uroot -pXXXXXXXXX -e'GRANT ALL PRIVILEGES ON YYYYYYYY.* TO "user"@"localhost" IDENTIFIED BY "ZZZZZZZZZzz"';'

No comments:

Post a Comment