(주)누리웨어

화상연동/Web,APP 구축및서비스/LMS/평생교육/학점은행/기업교육/연수관리/설문구축/

Centos 7 mysql8 install

1)yum localinstall 명령어로 MySQL rpm 패키지 설치

[root@hae ~]# yum repolist enabled | grep "mysql.*-community.*"
[root@hae ~]# sudo yum localinstall https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm
Loaded plugins: fastestmirror
mysql80-community-release-el7-3.noarch.rpm | 25 kB 00:00:00
Examining /var/tmp/yum-root-tl7kMk/mysql80-community-release-el7-3.noarch.rpm: mysql80-community-release-el7-3.noarch
Marking /var/tmp/yum-root-tl7kMk/mysql80-community-release-el7-3.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package mysql80-community-release.noarch 0:el7-3 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=================================================================================================================================================================================================================================================================================================================
Package Arch Version Repository Size
=================================================================================================================================================================================================================================================================================================================
Installing:
mysql80-community-release noarch el7-3 /mysql80-community-release-el7-3.noarch 31 k

Transaction Summary
=================================================================================================================================================================================================================================================================================================================
Install 1 Package

Total size: 31 k
Installed size: 31 k
Is this ok [y/d/N]: yes
Is this ok [y/d/N]: yes
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : mysql80-community-release-el7-3.noarch 1/1
Verifying : mysql80-community-release-el7-3.noarch 1/1

Installed:
mysql80-community-release.noarch 0:el7-3

Complete!

2)확인
[root@hae ~]# yum repolist enabled | grep "mysql.*-community.*"
mysql-connectors-community/x86_64 MySQL Connectors Community 185
mysql-tools-community/x86_64 MySQL Tools Community 123
mysql80-community/x86_64 MySQL 8.0 Community Server 229

3)설치
[root@hae ~]# yum install mysql-community-server

4)my.cnf설정
[root@hae ~]# vi /etc/my.cnf

CharacterSet UTF8 설정하기

5.mysql start
[root@hae ~]# systemctl start mysqld

6.root 의 임시비밀번호 확인
mysql 서비스를 시작하면 /var/log/mysqld.log 에
임시비밀번호가 적혀 있습니다.
cat, vi 로 확인하세요.
2021-02-16T16:01:32.809781Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2021-02-16T16:01:34.354853Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: %Z#
2021-02-16T16:01:38.051654Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated and will be removed in a future release.

7.root 로 로그인 에러의 경우 해결
[root@hae zones]# mysql -u -root -p
Enter password:

mysql> alter user ‘root’@’localhost’ identified by ‘비밀번호’;
Query OK, 0 rows affected (0.01 sec)
mysql> flush privileges;

Comments are currently closed.