|
|
[root@ceph1 /]# mysql -uroot -p
( q: ~8 \* x2 i0 }Enter password:
* Z$ v* U+ h4 u, NERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
7 @. `2 L7 b8 @+ L, t6 E[root@ceph1 /]#
0 k' N, S R, ?# U' r5 ^% e+ j[root@ceph1 /]# ; s" q' v) Y0 ~
[root@ceph1 /]#
& q$ }! ?' }3 V添加个client的配置
$ n+ Q* W6 E; k! N8 Z# ^5 c0 k[root@ceph1 /]# vim /etc/my.cnf
0 a, {7 i# ~2 G' C& j2 r; ]+ ~( ^) s/ e- k) `( }
[client]
" g5 n7 U- ]0 ?9 ~5 b" Wport=3306
# g- W/ o' u$ n- M0 Msocket=/var/lib/mysql/mysql.sock: l( O1 M" Y: J/ h
H. ~7 Z% N: P' F: B I[root@ceph1 /]# service mysqld restart
, p, @2 ^' r, K8 UShutting down MySQL.. SUCCESS!
- G+ V2 [2 R/ j7 I5 A+ k0 jStarting MySQL.. SUCCESS! + f( {9 e. \( x6 a* `
[root@ceph1 /]# mysql -uroot -p 4 V1 c: q2 m8 [* r# ^( S2 e* \
Enter password:
7 ]# W+ d& o! r4 G2 rWelcome to the MySQL monitor. Commands end with ; or \g.
$ O' j$ i' M+ D; VYour MySQL connection id is 1
9 }! b6 k3 w6 e' I) F7 O: AServer version: 5.6.20 Source distribution
* D' v# w+ C7 U, L' M2 I M: y% h' q, C7 c: u' i
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.( R& ] ]& u' [+ b' X" c
$ `0 C! T1 r8 Y8 kOracle is a registered trademark of Oracle Corporation and/or its
3 d' b. o) S1 ?/ @3 u' |5 Haffiliates. Other names may be trademarks of their respective
9 M) i, B0 |. N& d' z j2 M+ b, ]owners./ o; M: E2 q4 e/ z5 G( I7 I$ _* ^
0 \! X( F6 f" E" h$ eType 'help;' or '\h' for help. Type '\c' to clear the current input statement. L( `# [9 i: y. `+ t( U. ~* W7 C( P9 D5 B
2 V: w0 y2 x- tmysql>
4 q3 {- W# U# n4 U0 u! a+ _mysql> ! k9 N2 l$ \$ g( g1 A1 ?6 E
' x2 } C9 }6 j+ j$ L6 f# I! X# N |
|