alter table smslogs
convert to character set utf8mb4 collate utf8mb4_general_ci;
grant all privileges on *.* to 'root'@'%' identified by '{password}';
root 의 plugin 확인
+------------------+-----------------------+
| user | plugin |
+------------------+-----------------------+
| root | auth_socket |
| mysql.session | mysql_native_password |
| mysql.sys | mysql_native_password |
| debian-sys-maint | mysql_native_password |
| root | mysql_native_password |
+------------------+-----------------------+
auth_socket으로 되어있다면, mysql_native_password로 바꿔준다.
+-------------------------------------------+------------------+
| authentication_string | user |
+-------------------------------------------+------------------+
| | root |
| THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE | mysql.session |
| THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE | mysql.sys |
| 3FA0FFC368E9A68176619D90CA4395682B653194 | debian-sys-maint |
| 14661CA7984D6CF0236B0CCD9ED8CFF4297A02E2 | root |
+-------------------------------------------+------------------+
ERROR 1698을 해결하고 나니, 다른 문제가 발생한다.
참고로 mysql 일정 버전 이상부터는 password column이 authentication_string column으로 대체되었다고 한다.(더럽...)
직접 채워준다
update user set authentication_string=password('{당신이 쓸거}') where host='localhost' and user='root';
:%s/{pattern}/{string}/g
튜토리얼 보고 따라 하는거 말고 직접 날 것의 인스턴스 로컬 DB 세팅은 처음 해본다.
더럽다;
> sudo systemctl start mysql
> sudo /usr/bin/mysql -u root -p
매번 sudo랑 경로 찍기 귀찮아서 shell script로 만들었다.
> echo sudo /usr/bin/mysql -u root -p >> connect.sh
> chmod 777 connect.sh
> ./connect.sh
git tag -a [v1.1.0] [commit hash] -m "[메세지]"