|
|
[root@ceph1 /]# mysql -uroot -p
4 z, O( x/ W) [. F3 @5 HEnter password: $ l( p$ I9 ^* R% a/ Z
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
# W/ D8 A1 v/ f, f[root@ceph1 /]#
s1 g2 z8 c0 O& v4 k s, r* F- A% C[root@ceph1 /]# " a' R( R% Q2 g+ y: x$ U N1 c* D
[root@ceph1 /]#
S' m* u6 `0 l/ t添加个client的配置6 E" Y$ O" y N6 ^* @" X) _$ d4 Q
[root@ceph1 /]# vim /etc/my.cnf( u8 S) p( J: o7 W4 R* R
- }* h$ d8 I- \) a$ X! o$ L* ^0 f[client]3 Q5 A# h& f* b% E3 O* ~1 t
port=3306
5 k- C0 ^9 s9 o, \# [4 A# Y( Osocket=/var/lib/mysql/mysql.sock1 e8 l L; `8 ^! D9 Q( b$ u; _; q! I
7 v8 s0 J/ i6 e B7 E[root@ceph1 /]# service mysqld restart 3 h' [8 n0 ~4 y/ g4 ]2 G
Shutting down MySQL.. SUCCESS!
$ L2 A% h* G: R! I; A& N* O3 TStarting MySQL.. SUCCESS! 2 J( B( j- k9 u. o
[root@ceph1 /]# mysql -uroot -p
% F7 l+ ]2 X6 T( aEnter password: . p1 W5 d0 m, G7 A* u8 [
Welcome to the MySQL monitor. Commands end with ; or \g.5 f4 F5 P% g: X+ k! h3 N- h
Your MySQL connection id is 1
3 n Q9 }( Q# W4 pServer version: 5.6.20 Source distribution
7 n- E) @+ `, k3 A# }$ c* S; {! o; p; f" b2 K
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.- k8 S, L9 D E. W
+ Q# ?/ r8 P! N7 f# C0 H, eOracle is a registered trademark of Oracle Corporation and/or its
1 D3 [( N% b0 }7 d' i( X5 {3 Maffiliates. Other names may be trademarks of their respective3 f" N$ Q6 |( j: G% |9 B! j
owners.
' K! A7 @" u' J P
% k' G9 ~& {& Y* d7 m. IType 'help;' or '\h' for help. Type '\c' to clear the current input statement.9 p6 }& A' I( z* ^4 s/ p& y
6 Z) H/ m. x( Ymysql>
$ F( S6 Y7 y% }. f) r1 K4 Imysql>
% T/ n$ w' V: E& r! r
) H! {0 |, `+ s3 A0 v |
|