From d6fdc99a0a0a41a8cd21dd7cd467b863c1110108 Mon Sep 17 00:00:00 2001 From: flashlan Date: Thu, 28 Oct 2021 22:19:17 -0300 Subject: [PATCH] mysql script --- createmysql.sh | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/createmysql.sh b/createmysql.sh index 810cf07..8b5ab7f 100755 --- a/createmysql.sh +++ b/createmysql.sh @@ -3,16 +3,19 @@ # ask type of instalation: 1- server / 2- client -sudo apt update -sudo apt upgrade -sudo apt install openjdk-8-jdk # mariadb-server mariadb-client +########################## temporario #################### +#sudo apt update +#sudo apt upgrade +#sudo apt install openjdk-8-jdk # mariadb-server mariadb-client mkdir ~/.librography +rm ~/.librography/DBUser touch ~/.librography/DBUser echo "Entre com o nome para o usuario do banco de dados: " read dbuser echo $dbuser >> ~/.librography/DBUser +rm ~/.librography/DBPass touch ~/.librography/DBPass echo "Entre com a senha para o usuario do banco de dados: " read dbpass @@ -29,11 +32,13 @@ do "server") echo "proceed to install server" sudo apt install mariadb-server - sudo mysql_secure_install + sudo mysql_secure_installation + break ;; "client") echo "proceed to install a cliente" sudo apt install mariadb-client + break ;; "Quit") break @@ -47,18 +52,18 @@ done # is the mysql already configured? # proceed with secure install: -echo "Enter the user name for database: " -read password -echo "The Current User Name is $first_name" -echo -echo "Enter other users'names: " -read name1 name2 name3 -echo "$name1, $name2, $name3 are the other users." +#echo "Enter the user name for database: " +#read password +#echo "The Current User Name is $first_name" +#echo +#echo "Enter other users'names: " +#read name1 name2 name3 +#$echo "$name1, $name2, $name3 are the other users." #PASS=`pwgen -s 40 1` #PASS= dbpass -mysql -uroot <