วันพฤหัสบดีที่ 30 สิงหาคม พ.ศ. 2561

install MySQL On CentOS

1. Identify the Group name of MySQL Packages
  # yum grouplist | grep -i mysql

2. What is bundled in the “MySQL Database” group?
  # yum groupinfo "MySQL Database"

3. Install the “MySQL Database” group using yum groupinstall
  # yum groupinstall "MySQL Database"

4. Verify MySQL Installation
  # rpm -qa | grep -i mysql
   Check the /etc/passwd and /etc/group to make sure it has created a mysql username and group.
  # grep mysql /etc/passwd
    mysql:x:27:27:MySQL Server:/var/lib/mysql:/bin/bash

  # grep mysql /etc/group
  mysql:x:27:

5. MySQL Post installation – Execute mysql_install_db
  # /usr/bin/mysql_install_db --user=mysql

6. Start MySQL Server
  # service mysqld status

7. Verify that the MySQL server is up and running
  # /usr/bin/mysqladmin version


8. Change the MySQL root account password
  # mysql -u root
   mysql> select host, user from mysql.user;
+-----------+------+
| host      | user |
+-----------+------+
| 127.0.0.1 | root |
| localhost |      |
| localhost | root |
+-----------+------+
5 rows in set (0.00 sec)

  mysql> set password for 'root'@'localhost' = PASSWORD('DoNotTell$AnyBody');
  Query OK, 0 rows affected (0.00 sec)

  mysql> set password for 'root'@'127.0.0.1' = PASSWORD('DoNotTell$AnyBody');
  Query OK, 0 rows affected (0.00 sec)

***********///////////////////////
# yum list installed 'mysql*'

ไม่มีความคิดเห็น:

แสดงความคิดเห็น