Install MYSQL 5.7 using bash script with Centos

Multi tool use
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I'm a little new to linux. I'm using Centos 7 and trying to write a script that will install mysql 5.7 during a vagrant setup. I know how to change the root password manually, but how do you write this in a script?
I have this already
wget http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm
yum -y localinstall mysql57-community-release-el7-7.noarch.rpm
yum -y install mysql-community-server
service mysqld start
Here is what I know to do manually:
Get the temp password
grep 'temporary' /var/log/mysqld.log
Then I type and enter pass at prompt
mysql -u root -p
Enter Passwword:
Then change the pass or run the mysql_secure_installation
ALTER USER 'root'@'localhost' IDENTIFIED BY 'Newhakase-labs123@';
flush privileges;
bash centos mysql
New contributor
user204588 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |Â
up vote
0
down vote
favorite
I'm a little new to linux. I'm using Centos 7 and trying to write a script that will install mysql 5.7 during a vagrant setup. I know how to change the root password manually, but how do you write this in a script?
I have this already
wget http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm
yum -y localinstall mysql57-community-release-el7-7.noarch.rpm
yum -y install mysql-community-server
service mysqld start
Here is what I know to do manually:
Get the temp password
grep 'temporary' /var/log/mysqld.log
Then I type and enter pass at prompt
mysql -u root -p
Enter Passwword:
Then change the pass or run the mysql_secure_installation
ALTER USER 'root'@'localhost' IDENTIFIED BY 'Newhakase-labs123@';
flush privileges;
bash centos mysql
New contributor
user204588 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm a little new to linux. I'm using Centos 7 and trying to write a script that will install mysql 5.7 during a vagrant setup. I know how to change the root password manually, but how do you write this in a script?
I have this already
wget http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm
yum -y localinstall mysql57-community-release-el7-7.noarch.rpm
yum -y install mysql-community-server
service mysqld start
Here is what I know to do manually:
Get the temp password
grep 'temporary' /var/log/mysqld.log
Then I type and enter pass at prompt
mysql -u root -p
Enter Passwword:
Then change the pass or run the mysql_secure_installation
ALTER USER 'root'@'localhost' IDENTIFIED BY 'Newhakase-labs123@';
flush privileges;
bash centos mysql
New contributor
user204588 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I'm a little new to linux. I'm using Centos 7 and trying to write a script that will install mysql 5.7 during a vagrant setup. I know how to change the root password manually, but how do you write this in a script?
I have this already
wget http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm
yum -y localinstall mysql57-community-release-el7-7.noarch.rpm
yum -y install mysql-community-server
service mysqld start
Here is what I know to do manually:
Get the temp password
grep 'temporary' /var/log/mysqld.log
Then I type and enter pass at prompt
mysql -u root -p
Enter Passwword:
Then change the pass or run the mysql_secure_installation
ALTER USER 'root'@'localhost' IDENTIFIED BY 'Newhakase-labs123@';
flush privileges;
bash centos mysql
bash centos mysql
New contributor
user204588 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
user204588 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited 5 mins ago
New contributor
user204588 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 16 mins ago
user204588
1042
1042
New contributor
user204588 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
user204588 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
user204588 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
user204588 is a new contributor. Be nice, and check out our Code of Conduct.
user204588 is a new contributor. Be nice, and check out our Code of Conduct.
user204588 is a new contributor. Be nice, and check out our Code of Conduct.
user204588 is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f476802%2finstall-mysql-5-7-using-bash-script-with-centos%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password