- 积分
- 16840
在线时间 小时
最后登录1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?开始注册
x
[root@ceph1 /]# mysql -uroot -p , `6 M! b& _! I. f+ T
Enter password: & @! l: t+ G: A4 h3 }# K# Y
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)! S" r$ g/ C5 Z _4 h
[root@ceph1 /]# 1 X# N q* R* ^9 ?2 \$ a; I6 I
[root@ceph1 /]# 2 a5 G3 `! B) D3 F7 n) j) } |9 R
[root@ceph1 /]#
1 V0 ^, `; V9 ~9 ~: G- ~1 }添加个client的配置" w8 R: ~9 B* t6 o8 b
[root@ceph1 /]# vim /etc/my.cnf6 i* [ o' H8 W
& F$ L$ ^; q& G+ \# K E[client]
+ D' c8 S g: P6 F! Uport=3306) Y; {% O2 \" H
socket=/var/lib/mysql/mysql.sock" l5 ?! f0 U# `. o
+ F9 s. z2 }( {8 w" D, ?[root@ceph1 /]# service mysqld restart
: C0 u* s$ R; W3 O. ^; qShutting down MySQL.. SUCCESS!
! Z- O) r2 D2 e" {( O8 ?Starting MySQL.. SUCCESS! 1 A+ Q; s1 M4 t, H6 b7 F
[root@ceph1 /]# mysql -uroot -p * c8 V6 E% u3 z) }% g/ k
Enter password: 9 ?* D [- b. F7 G3 j
Welcome to the MySQL monitor. Commands end with ; or \g.
" t9 ], K& J, c# B2 [3 EYour MySQL connection id is 1
5 Z& V" Z3 U, M2 qServer version: 5.6.20 Source distribution. B& C, `1 \8 Y. e& _
. N9 Y# n- \4 ~0 o! Y% r/ b
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
2 [* O; K4 ~, s4 z/ c/ o# l* O0 k4 P: d
Oracle is a registered trademark of Oracle Corporation and/or its
" T! [9 I5 o7 U5 q* _/ x& g, {affiliates. Other names may be trademarks of their respective/ c4 Y) |3 m* }0 Z( `" b4 v5 v
owners.
- e) W8 B8 q0 o' F: o3 `: }& q" b6 q m9 L4 K1 A- Q3 U# q' L# Y! E
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
7 u/ }7 ?% C) x* G* N1 T, P% m+ {2 j
& C8 S& R3 i6 W) r+ Hmysql> H( x- N8 D: I# v. _& g8 t: s
mysql>
" P! G. n, W1 _7 c% m+ X$ A! ?9 i2 B V+ C. L2 J I
|
|