ubuntu20.0安装MYSQL 最新版本
https://blog.csdn.net/weixin_38924500/article/details/106261971
[https://blog.csdn.net/weixin_38436044/article/details/113745827](https://blog.csdn.net/weixin_38436044/article/details/113745827) 8.0.23-0ubuntu0.20.10.1 MYSQL 更新ROOT密码 已经修改了方法 ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123'; create database test charset=utf8 my.cnf 增加以下配置 支持UTF-8 !includedir /etc/mysql/conf.d/ !includedir /etc/mysql/mysql.conf.d/ [mysqld] collation-server=utf8_unicode_ci init-connect='SET NAMES utf8' 基本操作`
alter table food drop phone; alter table food add phone varchar(20); alter table food change phone phone varchar(20); alter table tood modify phone varchar(30); create table food(id int primary key,name varchar(20) not null,price float); create table food(id int primary key auto_increment,name varchar(20) not null,price float); create table food(id int primary key auto_increment,name varchar(20) not null,price float,publisher varchar(30) default 'qinghua';`
create table score(id int primary key auto_increment,sid int, score float,constraint fk_sid foreign key(sid) references student(id));
mysql 8.0 NAVICAT连接不上因为 加密规则变了 两种方法 1 更新NAVICAT驱动, 2 更改MYSQL加密规则 下面是第二种方法
ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER;
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'password';
flush privileges;