mysql 8.0以上修改root密碼
-
生成Data文件
mysqld --initialize-insecure --user=mysql
-
啟動服務(wù)
net start mysql
-
登錄mysql
mysql -u root -p
-
查詢用戶密碼
select host,user,authentication_string from mysql.user;
-
設(shè)置root用戶密碼
update user set authentication_string='' where user='root'; ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'Kuai123#'; FLUSH PRIVILEGES;
-
創(chuàng)建庫
CREATE DATABASE video CHARACTER SET utf8;
-
pycharm 的url
jdbc:mysql://localhost:3306/video?useSSL=false&serverTimezone=UTC