|
|
[root@ceph1 /]# mysql -uroot -p : Z& T( \. }# [
Enter password:
2 Z4 e. Q( Y& u1 W, O7 j4 I. sERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
& S' c. ]6 m3 |1 P5 y( F[root@ceph1 /]# _7 G4 f& e$ t" p' y
[root@ceph1 /]# , e4 k8 J+ w; c
[root@ceph1 /]#
: F/ i/ `6 R- P% E添加个client的配置
0 `* ?' P1 D) Q$ k3 t4 r; {* A6 b! o[root@ceph1 /]# vim /etc/my.cnf
' M/ G' [( a @ c! k
! O3 G3 `$ y4 m[client]
( @2 @8 ]- ]$ s& n" T/ ^7 ^; Fport=33067 C/ X1 k( F8 B$ X
socket=/var/lib/mysql/mysql.sock
7 q5 V; Q; I/ E' n" _" |, r7 r+ k. C: N9 F
[root@ceph1 /]# service mysqld restart
8 |" J" `# o5 h M! u. K4 ]& t6 ^Shutting down MySQL.. SUCCESS! # i+ s3 `/ m3 _( u7 m* A
Starting MySQL.. SUCCESS!
2 }: C* ?( N; s' g0 [ R8 H+ }[root@ceph1 /]# mysql -uroot -p 0 U$ T& k' F# s+ n
Enter password:
( u3 `, Q/ O% h+ S1 B! tWelcome to the MySQL monitor. Commands end with ; or \g.1 l8 q: }8 |+ X6 m9 S y: |
Your MySQL connection id is 12 T/ q7 N0 E( ~! I, c2 b, C
Server version: 5.6.20 Source distribution
- b6 M$ t- u0 v" ^
- a2 M3 n% S5 A# H2 Y+ OCopyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.1 a: V. E$ E1 I# q- ]. [5 W
& b h. g: t, _: J( n- w9 m2 {Oracle is a registered trademark of Oracle Corporation and/or its
# m# _1 T, u$ Z3 W! r0 d; t( zaffiliates. Other names may be trademarks of their respective; W9 h% c! [! y' h% ~
owners.0 j- q3 d* W1 j. p" E! w
# E0 e* U7 s: E3 A
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
/ a& R/ j% O$ I; L3 \5 d4 ?* T1 n# B9 x* p$ h' }) m) v
mysql>
7 j$ q$ P8 g! W, @; g" [mysql> / z; P% V8 }, x0 R& P
" s4 e) J( ?" C: T1 q% z, p$ Z
|
|