用户可以在配置文件中指定套接字文件的路径,如--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)

最新文章

  1. servlet的session为null?
  2. App接口中json方式封装通信接口
  3. iphone6来了,我该做点什么(兼容iphone6的方法)
  4. java.lang.IllegalStateException
  5. websocket nodejs实例
  6. 当装了两个tomcat后,如何修改tomcat端口
  7. error C4996: 'swprintf': swprintf has been changed to conform with the ISO C standard,set _CRT_NON_CONFORMING_SWPRINT
  8. POJ 2251 三维BFS(基础题)
  9. postfix : 452 4.3.1 Insufficient system storage
  10. CentOS7 下安装 Java 8 [wget]
  11. 探索Windows命令行系列(1):导航目录
  12. jupyter 中markdown使用
  13. shell 之扫描ip段
  14. node.js vue-axios和vue-resource
  15. 5、 LwIP协议栈规范翻译——操作系统仿真层
  16. [转帖] SQL参数化的优点 CopyFrom https://www.cnblogs.com/-lzb/articles/4840671.html
  17. 面试题-----按位翻转32位unsigned
  18. SJA1000 CAN驱动程序演示实验
  19. C#编程(十九)----------部分类
  20. 关于RDS for mysql中导入数据库set global event_scheduler =1 需要更多超级权限

热门文章

  1. 写个dump_stack【转】
  2. exit() _exit() 函数区别
  3. 【bzoj3682】Phorni
  4. HDU 6112 今夕何夕 蔡勒公式
  5. mysql utf8改utf8mb4
  6. [Think] position与anchorPoint关系
  7. javascript方法--call()
  8. Tomcat手动指定jdk路径
  9. sharding-jdbc 实现分表
  10. JAX-RS Resteasy