- Oracle, MySQL, MSSQL, SQLite...
MySQL은 8.대 버전은 비밀번호를 잊어버리면 처음부터 다시 깔아야 해서 번거로움.
그래서 5. 대 버전으로 다시 받았는데 나는 5.7버전을 다운로드 받음.
MySQL 5.7 버전은 설치를 완료했을 때 아래와 같이 비밀번호를 알려주는 대화상자가 뜸 잘 복사해 놓아야 함. ****부분이 비밀번호인데 지금은 일부러 가려 놓은거고 원래는 보여짐.
*
2018-11-20T05:17:21.439505Z 1 [Note] A temporary password is generated for root@localhost: ****
If you lose this password, please consult the section How to Reset the Root Password in the MySQL reference manual.
*
외부 접속도구를 이용할 때 초기 비밀번호로는 접속이 안 됨
그래서 비밀번호 초기화를 해주어야 함.
많은 오류 끝에 해결했는데 코드를 그대로 복사해 두겠음.
Last login: Tue Nov 20 14:40:41 on ttys000
503-26ui-iMac:~ a503-26$ cd /usr/local/mysql/bin
503-26ui-iMac:bin a503-26$ ./mysql -u root -p
Enter password: ****
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.7.24
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> update user set authentication_string=password('2261bbs') where user='root'; FLUSH PRIVILEGES;
ERROR 1046 (3D000): No database selected
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
mysql> SET PASSWORD = PASSWORD('****');
Query OK, 0 rows affected, 1 warning (0.15 sec)
mysql>
- MongoDB, Cassandra, Hive...