UNIX域套接字连接mysql
用户可以在配置文件中指定套接字文件的路径,如--socket=/data/mysql/mysql.sock
[root@localhost ~]# mysql -uroot -p123456 -S /data/mysql/mysql.sock
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.0.41-log Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| handan |
| monkey |
| mysql |
| test |
+--------------------+
5 rows in set (0.15 sec)
mysql> show variables like 'socket';
+---------------+------------------------+
| Variable_name | Value |
+---------------+------------------------+
| socket | /data/mysql/mysql.sock |
+---------------+------------------------+
1 row in set (0.07 sec)
最新文章
- servlet的session为null?
- App接口中json方式封装通信接口
- iphone6来了,我该做点什么(兼容iphone6的方法)
- java.lang.IllegalStateException
- websocket nodejs实例
- 当装了两个tomcat后,如何修改tomcat端口
- error C4996: 'swprintf': swprintf has been changed to conform with the ISO C standard,set _CRT_NON_CONFORMING_SWPRINT
- POJ 2251 三维BFS(基础题)
- postfix : 452 4.3.1 Insufficient system storage
- CentOS7 下安装 Java 8 [wget]
- 探索Windows命令行系列(1):导航目录
- jupyter 中markdown使用
- shell 之扫描ip段
- node.js vue-axios和vue-resource
- 5、 LwIP协议栈规范翻译——操作系统仿真层
- [转帖] SQL参数化的优点 CopyFrom https://www.cnblogs.com/-lzb/articles/4840671.html
- 面试题-----按位翻转32位unsigned
- SJA1000 CAN驱动程序演示实验
- C#编程(十九)----------部分类
- 关于RDS for mysql中导入数据库set global event_scheduler =1 需要更多超级权限