近期,笔者无意间看到mysql更新到8.0了,
官网说比以往版本快两倍(不知道吹牛逼没有)
之所以没有用解压版的,是因为解压版的没有32位的,
下载地址:https://dev.mysql.com/downloads/windows/installer/8.0.html
1.请参考https://blog.csdn.net/csdn_liang_1991/article/details/81035293安装,这里引用下大佬的文章。
注意 在第10张图哪里,需要选择使用遗留身份验证,不要用默认的强密码进行加密,
一 jdbc-test 注意url地址
private static final String DBNAME="dbtest";
private static final String URL="jdbc:mysql://localhost/"+DBNAME+"serverTimezone=Hongkong&useUnicode=true&useSSL=false&characterEncoding=utf8";
private static final String NAME="root";
private static final String PASS="******";
static Connection getcon()
{
Connection con=null;
try
{
Class.forName("com.mysql.cj.jdbc.Driver");
con= DriverManager.getConnection(URL,NAME,PASS);
} catch (ClassNotFoundException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SQLException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
return con;
}