Skip to main content
edited tags
Link
Jeff Schaller
  • 68.8k
  • 35
  • 122
  • 264
deleted 26 characters in body
Source Link
Rui F Ribeiro
  • 58k
  • 28
  • 156
  • 237

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;

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;

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;
fix command formatting
Source Link
filbranden
  • 22.6k
  • 4
  • 65
  • 87

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:

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;

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;

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;
added 28 characters in body
Source Link
user204588
  • 131
  • 1
  • 5
Loading
Source Link
user204588
  • 131
  • 1
  • 5
Loading