mysql 配置文件及端口号设置方法
win mysql 软件目录 或 c:根目录 c:\windows
d:\mysql\my.ini
linux my.cnf
/etc/my.cnf
/etc/mysql/my.cnf
d:\mysql\my.ini
[client]
port=3306
default-character-set=utf8
[mysqld]
port = 3306
character-set-server=utf8
max_connections=20000
default-storage-engine=INNODB
[mysql]
default-character-set=utf8
mysql8 caching_sha2_password
set password = 'root';
第一种方案 直接修改root账号密码,同时使用 旧的mysql_native_password加密方式
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '';
ALTER USER 'root'@'localhost' IDENTIFIED '';
set password = '';
第二种方案 建立一个超级管理员,使用旧的mysql_native_password加密
create user admin;
grant all on *.* to admin;
alter user admin IDENTIFIED WITH mysql_native_password BY 'admin';
mysql 5.6 mysql_native_password 密文使用的是password()函数
set password = password('root');