开发者

Java: Connect to SQL on Apache locally

I have a site running a Linux/Apache/MySQL/PHP stack. I would like to connect to the database from a locally run Java program. Is this possible? (Deploying the Java program to the server would be 开发者_开发知识库a great effort.)


Yes, of course; as long as the Java program has the correct credentials, that the user it logs in with is given proper access from the database, etc.

From the perspective of the database, it has no idea who is connecting to it or what technology they are connecting from - all it sees is just another connection.

See Establishing a Connection in the same JDBC tutorial I linked to earlier.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜