- 积分
- 11892
在线时间 小时
最后登录1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?开始注册
x
[root@ceph1 /]# mysql -uroot -p
- x, d/ x0 t& b0 f; VEnter password:
* q4 T. Q [' CERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)2 X: V$ B7 I# o8 g( u; t
[root@ceph1 /]#
, `1 X7 G9 n+ E6 \[root@ceph1 /]#
2 V3 d: D! J' Q5 F3 b4 p[root@ceph1 /]#
4 i7 P2 t: u& b C/ k6 @0 G- N9 k添加个client的配置# V# u9 Q. q' X6 q
[root@ceph1 /]# vim /etc/my.cnf
$ r' a' ~; o8 [" [0 k+ A) J
! p! [& g$ u# z! N- |, X7 K. {- {[client]" U4 T8 q4 I2 W# Z5 I/ l3 A
port=33062 ]9 ?3 f/ c/ q5 V/ x
socket=/var/lib/mysql/mysql.sock
4 j( x3 B& q/ [) K J! _5 g
8 d! R0 g9 l4 Q6 ]) Y[root@ceph1 /]# service mysqld restart / L; @3 H& Q3 c, N' I8 d
Shutting down MySQL.. SUCCESS! $ ?, r8 Q' f8 w* x8 m( O( P" F
Starting MySQL.. SUCCESS!
4 T- }$ Q6 Y! c[root@ceph1 /]# mysql -uroot -p " W% r: z' x- j0 q, H
Enter password:
8 ]0 V. r8 S0 Z' O; M/ Q mWelcome to the MySQL monitor. Commands end with ; or \g. [# s4 r. D' Z
Your MySQL connection id is 1
$ P; ?# Z1 c; L5 N# GServer version: 5.6.20 Source distribution# g3 d* t5 U8 F9 G- ^
* n; u' M6 Z' A$ }$ f9 j- g9 ?: h
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.7 k# X! w1 \$ L/ K
" |9 H! O$ b- i6 @
Oracle is a registered trademark of Oracle Corporation and/or its
7 O1 B2 O/ T$ t6 d. D* l4 Maffiliates. Other names may be trademarks of their respective: v5 k4 e: C, r9 I- H( D" l3 y
owners.
& k* o) d. I& J& w( S- v+ b
7 t; N' p# t1 b/ i0 vType 'help;' or '\h' for help. Type '\c' to clear the current input statement.6 e! ?% g) F# R7 {: ^% T
' y5 W! L& m& R/ u& [+ Tmysql>
! B- q3 |8 C4 T1 N9 Rmysql>
* {# I& z6 u+ x+ V! \0 O1 ?+ g) o% c5 w0 ]
|
|