Connecting Java to MySQL
This may be more of a mysql question than a java question, but I will ask anyway.
I have a TestMySQL class which goes through all the necessary steps to connect java to mysql, but I want to connect it to a database which is configured to be on localhost on my server. When writing php, I just use localhost as the server, but is there a way to access it from my computer using a java program such as this?
Just use localhost as the server in java then.
This link is to an early program i've started. It connects to mysql on my machine as localhost. I would just paste the code section you need to see, but im at work and we dont have winzip on these computers.
the mysql is not on my machine though. Its on a separate computer and set up on that one as localhost.
so then you'll have to run your program from that server, unless they allow outside connections
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL