zoukankan      html  css  js  c++  java
  • 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)

  • 相关阅读:
    strncat_s
    资源编译器 (.rc) 文件
    C++ Namespace 详解
    Structure Definitions
    SetParent
    C++笔记(1)explicit构造函数
    .def
    tellg()和tellp()
    Data Groups
    Messages
  • 原文地址:https://www.cnblogs.com/sixiong/p/5021799.html
Copyright © 2011-2022 走看看