读取mysql中的中文数据问题
如果getConnection("jdbc:mysql://localhost/classmates","root",""),读出mysql中的中文数据显示为????,
如果改为getConnection("jdbc:mysql://localhost/mysql?user=root&password=&useUnicode=true&characterEncoding=8859_1")
则提示
java.sql.SQLException: General error: Incorrect database name 'mysql?user=root&password=&useUnicode=true&characterEncoding=8859_1'
为什么?