[转帖]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 ...
随机推荐
- 第二篇:请求库之requests,selenium
requests模块 一.介绍 #介绍:使用requests可以模拟浏览器的请求,比起之前用到的urllib,requests模块的api更加便捷(本质就是封装了urllib3) #注意:reques ...
- Scala传递参数遇到的坑
1.方法中的参数全为val型. 例: def insertMap(map:=>Map[String,Int]):Unit={ map+=("b"->2) //报错 ...
- linux-shell脚本基础-2
1,用户组 添加用户 useradd -u UID -o -g 指定 GID或组名 -c 注释信息 -d 家目录 -s shell -G 附加组 -r 系统用户 -m 家目录,系统用户 -M 不创建家 ...
- 【BZOJ1098】办公楼biu(补图,bfs,链表)
题意:有n个点m条边,要求将点尽可能多的分成若干个部分,使得若两个点不在同一个部分则他们之间必定有边 n<=1e5,m<=2e6 思路:From https://blog.csdn.net ...
- nginx 日志文件分隔
Nginx命令 Nginx命令帮助如下 nginx -h nginx version: nginx/0.8.45 Usage: nginx [-?hvVt] [-s signal] [-c filen ...
- sqli-labs(26a)
0x01偷偷看一波源码 和26关一样 闭合变成了’)而已 0X01构造语句爆库名 这是百度到的 第一个 ' 首先闭合id='$id' 中的',%a0是空格的意思,(ps:此处我的环境是ubuntu14 ...
- maven 配置私服 连接
两种方法: 1.在单个项目的pom.xml中使用 私服的连接地址,这样只对该项目起作用. 2.在maven的setting.xml配置中添加私服的连接地址.这样对所有项目起作用. 本文章只演示第二种方 ...
- 【每日一包0002】array-first
github地址:https://github.com/ABCDdouyae... array-first 获取数组的第一项或者前几项 文档地址:https://www.npmjs.com/packa ...
- maven 报错 Cannot resolve plugin org.apache.maven.plugins:maven-war-plugin:2.1.1
主要原因是本地maven的配置文件和仓库地址不一致.
- 高级软件测试技术-任务进度-Day02
任务进度11-14 使用工具 Jira 小组成员 华同学.郭同学.穆同学.沈同学.覃同学.刘同学 任务进度 在经过了昨天的基本任务分配之后,今天大家就开始了各自的内容,以下是大家任务的进度情况汇总. ...