alter user '유저이름'@'localhost' identified with mysql_native_password by '변경할비밀번호';
flush privileges;
alter user '유저이름'@'localhost' identified with mysql_native_password by '변경할비밀번호';
flush privileges;
# 유저 생성
create user 'root'@'%'identified by 'root';
#권한 설정
grant all privileges on *.* to 'root'@'%' with grant option;
포트 열기
firewall-cmd --zone=public --permanent --add-port=2888/tcp
firewall-cmd --reload
열린 포트 확인
firewall-cmd --zone=public --list-all
service mysqld start 하면
Job for mysqld.service failed because the control process exited with error code. See "systemctl status mysqld.service" and "journalctl -xe" for details.
와 같은 뭣같은 에러를 뿜뿜하는 경우.
난 이전 버전의 mysql 데이터들이 남아있어서 그런 경우였음.. (5.x -> 8.x)
cat /etc/my.cnf | grep log-err
에 나오는 파일경로 (나의 경우 /var/log/mysqld.log)
cat /var/log/mysqld.log | grep '[ERROR]'
확인결과
2020-05-06T06:28:06.069412Z 1 [ERROR] [MY-013090] [InnoDB] Unsupported redo log format (0). The redo log was created before MySQL 5.7.9
2020-05-06T06:28:06.069510Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error.
5.x 의 로그가 남아있어서 말썽이다..
cat /etc/my.cnf | grep datadir 로 데이터 경로 확인 후 (나의 경우 /var/lib/mysql)
yum remove mysql-*
삭제 후
rm -rf /var/lib/mysql
폴더 삭제 후
mysql 재설치...
service mysqld start
유후~
cat <<EOF | tee /etc/yum.repos.d/proxysql.repo
[proxysql_repo]
name= ProxySQL YUM repository
baseurl=https://repo.proxysql.com/ProxySQL/proxysql-2.0.x/centos/$releasever
gpgcheck=1
gpgkey=https://repo.proxysql.com/ProxySQL/repo_pub_key
EOF
yum install proxysql
# yun install proxysql-version
현재 시점 기준 proxysql 은 mysql 5.5 버전으로 설정해야함.
libmysqlclient18 을 설치시 링크함..
저장소 mysql은 8.x 버전 사용 예정...
rpm -Uvh https://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm
# yum repolist
vi /etc/yum.repos.d/mysql-community.repo 에서 버전 설정
# vi /etc/yum.repos.d/mysql-community-source.repo
# 소스는 굳이...?
# install
yum install mysql-server
# mariadb already install 로 인해 설치 에러시
yum -y remove mariadb-libs