---
title: "Java project,every parameters is correct,but it can't connect the MySql database"
author: "helloxyworld"
date: "2012-06-19T10:12:35Z"
tags: []
categories: ["编程语言"]
slug: "java-project-every-parameters-is-correct-but-it-can-t-connect-the-mysql-database"
draft: false
lastmod: "2012-06-19T10:11:12Z"
id: 1563656
url: "https://helloxyworld.iteye.com/blog/1563656"
---

java project , it work first, but it doesn't work suddenly.  find code under:

　　<span style="color:green">connection = (Connection) DriverManager.getConnection(url, username, password);</span>
the connection is null.

last find reason:
      I stop my Local Area Connection.  set is run ... the problem is solved.