Documentation MySQL 8.0 Reference Manual - Tutorial - Connecting to and Disconnecting from the Server
MySQL 8.0 Reference Manual - Tutorial 1
3.1 Connecting to and Disconnecting from the Server
shell> mysql -h host -u user -p Enter password: ********
위의 사용에서 -h 는 host를 가리키며 -u 는 유저, -p 는 패스워드를 가리킨다.
C:\Users\User>mysql -h localhost -u root -p Enter password: ******* Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 17 Server version: 8.0.17 MySQL Community Server - GPL Copyright (c) 2000, 2019, 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>
서버가 시작되어 있지 않았을 때 접속을 시도하면 아래와 같은 에러를 만나게 된다.
C:\Users\User>mysql -h localhost -u root -p Enter password: ******* ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061) C:\Users\User>
또는 아래와 같은 에러를 만나게 된다.(daemon으로 수행되는 방식인 unix 나 linux에서)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
댓글 0
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
12 | MySQL 8.0 Reference Manual - Tutorial - Creating and Using a Database1 | 명품관 | 2020.02.28 | 190 |
» | MySQL 8.0 Reference Manual - Tutorial - Connecting to and Disconnecting from the Server | 명품관 | 2020.02.27 | 195 |
10 | MySQL 8.0 Reference Manual - Tutorial - Entering Queries | 명품관 | 2020.02.28 | 202 |
9 | MySQL 8.0 Reference Manual - Tutorial - Creating and Using a Database2 | 명품관 | 2020.02.29 | 236 |
8 | MySQL 8.0 Reference Manual - Tutorial - Creating and Using a Database4 | 명품관 | 2020.03.03 | 255 |
7 | MySQL 8.0 Reference Manual - Tutorial - Creating and Using a Database3 | 명품관 | 2020.03.02 | 426 |
6 | MySQL Admin - 01 | 명품관 | 2019.10.08 | 706 |
5 | MySQL 설치 후 외부 접속 허용하기 | 명품관 | 2016.09.09 | 2847 |
4 | 기동시 "Job for mysqld.service failed because the control process exited with error code." 에러로 기동 실패 | 명품관 | 2020.09.03 | 8001 |
3 | MySQL 8.0 Reference Manual - MySQL Server Administration1 - Configuring the Server | 명품관 | 2020.03.05 | 9599 |
2 | Windows 버전 MySQL의 my.ini 파일 찾기 | 명품관 | 2020.03.01 | 13397 |
1 | CentOS 6.7 에서 MySQL 5.7 설치 | 명품관 | 2016.09.09 | 13811 |