0 like 0 dislike
13 views

Please log in or register to answer this question.

1 Answer

0 like 0 dislike
answered by (13.2k points)  

1. Download the mySQL Software from below link.

https://dev.mysql.com/downloads/mysql/5.7.html#downloads

2. Download & extract the bundle mysql tart file .

3. Installing RPMs.

tar -xvf mysql-5.7.27-1.sles12.x86_64.rpm-bundle.tar

rpm -ivh mysql-community-client-5.7.27-1.sles12.x86_64.rpm --nodeps
rpm -ivh mysql-community-common-5.7.27-1.sles12.x86_64.rpm --nodeps
rpm -ivh mysql-community-devel-5.7.27-1.sles12.x86_64.rpm --nodeps
rpm -ivh mysql-community-embedded-5.7.27-1.sles12.x86_64.rpm --nodeps
rpm -ivh mysql-community-embedded-devel-5.7.27-1.sles12.x86_64.rpm --nodeps
rpm -ivh mysql-community-libs-5.7.27-1.sles12.x86_64.rpm --nodeps
rpm -ivh mysql-community-server-5.7.27-1.sles12.x86_64.rpm --nodeps
rpm -ivh mysql-community-test-5.7.27-1.sles12.x86_64.rpm --nodeps

4. Start the MySQL server with the following command:

sudo service mysql start

You can check the status of the MySQL server with the following command:

sudo service mysql status

 

5. Getting  default MySQL root password .

MySQL Server Initialization (for MySQL 8.0 and later): When the server is started for the first time, the server is initialized, and the following happens (if the data directory of the server is empty when the initialization process begins):

  • The SSL certificate and key files are generated in the data directory.

  • The validate_password plugin is installed and enabled.

  • A superuser account 'root'@'localhost' is created. A password for the superuser is set and stored in the error log file. To reveal it, use the following command:

# sudo grep 'temporary password' /var/log/mysql/mysqld.log

2019-08-05T12:59:29.208767Z 1 [Note] A temporary password is generated for root@localhost: 20Tgcf;ZAB)! 

6. Change the root password as soon as possible by logging in with the generated, temporary password and set a custom password for the superuser account:

# mysql -uroot -p
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass4!';

7. Securing the MySQL Installation (for MySQL 5.6 only)

The program mysql_secure_installation allows you to perform important operations like setting the root password, removing anonymous users, and so on. Always run it to secure your MySQL installation:

# mysql_secure_installation

It is important to remember the root password you set. See mysql_secure_installation — Improve MySQL Installation Security for details.

Do not run mysql_secure_installation after an installation of MySQL 5.7 or 8.0, as the function of the program has already been performed by the SLES repository installation.

 

 

 

 

 

Related questions

0 like 0 dislike
0 answers
0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
asked Mar 31 in MySQL Database Forum by nijamutheen j (13.2k points)  
Welcome to PostgreSQL Database Discussion Forum where you can ask questions and receive answers from other members of the community. Can discuss here Oracle, Postgresql, mariadb , mySQL , AWS , Linux , MSSQL , MongoDB , Greenplum databases related queries ...etc.
...