JDBC MySQL connection using Unix Socket

后端 未结 4 1545
有刺的猬
有刺的猬 2020-12-06 11:57

I am using MySQL using the --skip-networking option on Linux.

Trying to connect my J2EE based application (using servlets) to the MySQL database using JDBC.

4条回答
  •  不知归路
    2020-12-06 12:55

    You simply cannot do this: the MySQL JDBC driver only supports TCP/IP and - on Windows - named pipes to connect to the database. Therefor specifying --skip-networking will not allow you to use JDBC MySQL Connector/J at all.

    See also http://lists.mysql.com/java/8749:

    Java itself doesn't support unix domain sockets, but since you're on windows, you can use named pipes, [..]

    The dead-link in the above post is now http://dev.mysql.com/doc/connector-j/en/connector-j-reference-configuration-properties.html

提交回复
热议问题