---
title: "mysql-connector-java 5.1.9包 bug"
author: "dk05408"
date: "2016-01-08T10:36:28Z"
tags: []
categories: ["编程语言"]
slug: "mysql-connector-java-5-1-9-bug"
draft: false
lastmod: "2016-01-08T10:55:10Z"
id: 2269371
url: "https://dk05408.iteye.com/blog/2269371"
---

1.本地使用ssh端口转发，转发至生产环境mysql数据库端口，本地使用java程序中配置使用127.0.0.1及所有可以dns到本机回环ip的域名，都会导致Access denied for user 'username'@'localhost'错误。

 

2.修改数据库默认连接端口3306无效 连接字符串jdbc:mysql://localhost:3306/xxxx改为jdbc:mysql://localhost:3307/xxxx。运行系统，提示能连接到MySQL，却找不到数据库xxxx

https://bugs.mysql.com/bug.php?id=47494