티스토리 뷰
반응형
MySQL 설치
$ sudo yum localinstall https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm
$ sudo yum install mysql-community-server
서버 자동 시작 설정
$ sudo systemctl enable mysqld
$ sudo systemctl start mysqld
mysql 서버가 실행되있는지 확인
$ sudo systemctl status mysqld
mysql root 초기 비밀번호 확인
$ sudo grep 'A temporary password' /var/log/mysqld.log
mysql 접속
$ mysql -u root -p
위 명령을 입력하고 비밀번호 입력을 하면 접속 된다.
root 비밀번호 변경
$ sudo mysql_secure_installation
Securing the MySQL server deployment.
Enter password for user root:
The existing password for the user account root has expired. Please set a new password.
New password:
Re-enter new password:
The 'validate_password' plugin is installed on the server.
The subsequent steps will run with the existing configuration
of the plugin.
Using existing password for root.
Estimated strength of the password: 100
Change the password for root ? ((Press y|Y for Yes, any other key for No) : y
New password:
Re-enter new password:
Estimated strength of the password: 100
Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y
By default, a MySQL installation has an anonymous user,
allowing anyone to log into MySQL without having to have
a user account created for them. This is intended only for
testing, and to make the installation go a bit smoother.
You should remove them before moving into a production
environment.
Remove anonymous users? (Press y|Y for Yes, any other key for No) : y
Success.
Normally, root should only be allowed to connect from
'localhost'. This ensures that someone cannot guess at
the root password from the network.
Disallow root login remotely? (Press y|Y for Yes, any other key for No) : n
... skipping.
By default, MySQL comes with a database named 'test' that
anyone can access. This is also intended only for testing,
and should be removed before moving into a production
environment.
Remove test database and access to it? (Press y|Y for Yes, any other key for No) : n
... skipping.
Reloading the privilege tables will ensure that all changes
made so far will take effect immediately.
Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y
Success.
All done!
반응형
'AWS' 카테고리의 다른 글
AWS RDS MariaDB 한글 깨짐 현상 해결 (인코딩 변경) (0) | 2021.02.06 |
---|---|
AWS EC2 인스턴스와 도메인 연결 (가비아) (0) | 2021.02.06 |
AWS ec2 (Ubuntu) Hostname 변경하기 (0) | 2021.02.03 |
AWS pem키 충돌 문제 (0) | 2021.02.03 |
AWS 인스턴스에 탄력적 IP 할당하기 (0) | 2021.02.02 |
댓글