[转帖]mysql.sock的作用
mysql.sock的作用
mysql有两种连接方式:
mysql 31108 30650 0 Sep10 ? 00:03:17 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/lib/mysql/Wonhigh-Test16.err --pid-file=/var/lib/mysql/Wonhigh-Test16.pid --socket=/var/lib/mysql/mysql.sock --port=3306
[root@Wonhigh-Test16 ~]#
[root@Wonhigh-Test16 ~]# mv /var/lib/mysql/mysql.sock /var/lib/mysql/mysql1.sock
[root@Wonhigh-Test16 ~]# mysql -uroot -p123456
Warning: Using a password on the command line interface can be insecure.
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
[root@Wonhigh-Test16 ~]#
Warning: Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 127
Server version: 5.6.19-log
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
Warning: Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 121
Server version: 5.6.19-log MySQL Community Server (GPL)
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
Bye
[root@Wonhigh-Test16 ~]#
[转帖]mysql.sock的作用的更多相关文章
- mysql.sock的作用
1.在编译安装mysql的时候,会将mysql的配置文件复制到/etc/my.conf中: [root@Web-lnmp02 mysql]# cp support-files/my-small.cnf ...
- mysql 中的socket 即 mysql.sock的作用
这个mysql.sock应该是mysql的主机和客户机在同一host上的时候,使用unix domain socket做为通讯协议的载体,它比tcp快.通常遇到这个问题的原因就是你的mysql ser ...
- MySQL的mysql.sock文件作用(转)
mysql.sock是可用于本地服务器的套接字文件.它只是另一种连接机制. 不包含任何数据,但仅用于从客户端到本地服务器来进行交换数据.
- Mac mySql ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)的解决办法
我的环境:Mac 10.11.6 ,mysql 5.7.14 . mac mySql 报错ERROR 2002 (HY000): Can't connect to local MySQL serv ...
- Mysql启动找不到mysql.sock文件问题(Centos7)
刚装完Mysql5.7,将Mysql添加到开机自启.reboot之后mysql服务却没启动起来, 直接输入mysql –uroot –p ,出现如下错误,找不到mysql.sock文件.用servic ...
- 亲测有效,解决Can 't connect to local MySQL server through socket '/tmp/mysql.sock '(2) ";
版权声明:本文为博主原创文章,未经博主允许不得转载. https://blog.csdn.net/hjf161105/article/details/78850658 最近租了一个阿里云云翼服务器,趁 ...
- mysql.sock文件的作用
mysql.sock应该mysql的主机和客户机在同一host上的时候,使用unix domain socket做为通讯协议的载体,它比tcp快.Mysql有两种连接方式: (1)TCP/IP (2 ...
- 【转】mysql.sock文件的作用
Mysql有两种连接方式: (1),TCP/IP (2),socket 对mysql.sock来说,其作用是程序与mysqlserver处于同一台机器,发起本地连接时可用. (如果程序跟mysql在同 ...
- MAC中Django中runserver提示Can't connect to local MySQL server through socket '/tmp/mysql.sock错误
好像不止遇到一次,直接Google就可以了,在stackoverflow中就有答案,答案就是你没有开MySQL - -. stackoverflow链接见 http://stackoverflow.c ...
随机推荐
- IOS上编译boost库
环境:xcode9mac os 10.13 1.下载boost库并解压2.cd到解压后的文件包内,执行 sh bootstrap.sh(解压后会得到这个脚本文件).3.执行./b2 编译整个库.4.经 ...
- 关于antd表单的自行校验
rules里面加上validator验证,value就是输入的值 上面为正则表达式的检验
- pandas Series和dataframe
DataFrame是一个表格型数据结构,与Series不同的是,DataFrame可以含有一组或者有序的列,每列可以使不同的值的类型,它可以被看做成Series的字典.
- 3. ClustrixDB 操作
测试数据库 一. 测试分片,存储信息 测试前: clxm@p2cn1uclx101m_10.248.100.241 /data]$ clx statCluster Name: cle69e350c2c ...
- DevExpress.XtraGrid.Views.Grid.GridView
private void SetView() { GridView gridView = (GridView)this.DefaultView; if (gridView != null) { gri ...
- UVa 213 信息解码 (模拟 && 二进制)
题意 :对于下面这个字符串 0,00,01,10,000,001,010,011……. 首先是长度为1的串,然后是长度为2的串,以此类推.不存在全为1的串. 你的任务是编写一个程序.首先输入一个代码头 ...
- UVA 12299 线段树 ( 单点跟新 , 区间查询)
题目链接:题意:在传统的RMQ的基础上加上一个操作:shift(i1,i2,i3...ik),表示将这些元素,依次向左移动一位(训练指南247页) #include <iostream> ...
- C++ 打印XPS文档
CoInitializeEx(, COINIT_MULTITHREADED); IXpsOMObjectFactory *xpsFactory; HRESULT hr = CoCreateInstan ...
- R-CNN常见问题
可以不进行特定样本下的微调吗?可以直接采用AlexNet CNN网络的特征进行SVM训练吗? 不针对特定任务进行微调,而将CNN当成特征提取器,pool5层得到的特征是基础特征,类似于HOG.SIFT ...
- java jdk原生的http请求工具类
package com.base; import java.io.IOException; import java.io.InputStream; import java.io.InputStream ...