MySQL Installation on Linux

 MySQL Installation

1. Download the right rpm package for MySQL corresponding to your Linux version. For instance, RHEL7 requires
mysql-8.0.26-1.el7.x86_64.rpm-bundle.tar

2. Make Directory mysql under /opt as /opt/mysql

3. Move the tar file to mysql

4. tar -xvf mysql-8.0.26-1.el7.x86_64.rpm-bundle.tar

5  sudo yum install mysql-community-{server,client,common,libs}-*

6. systemctl start mysqld

7 To reveal the password
sudo grep 'temporary password' /var/log/mysqld.log

8. Change the password by
mysql -uroot -p

ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass4!';


9.
mysqld --initialize --user=mysql
mysqld --initialize-insecure --user=mysql

CREATE USER 'admin'@'%' IDENTIFIED WITH mysql_native_password BY 'password';
GRANT ALL ON *.* TO 'admin'@'%';

**************************************************

Using yum install
sudo must be prefixed even though you login as root
https://dev.mysql.com/doc/refman/8.0/en/linux-installation-yum-repo.html

Comments

Popular posts from this blog

Dolibarr Installation