MySQL基础
create database xxx character set utf8 collate utf8_bin;
grant all privileges on xxx.* to zabbix@localhost identified by 'xxx';
flush privileges;
=<5.7
SET PASSWORD=PASSWORD('[修改的密码]');
5.7-8.0
设置PATH
mysqld --initialize --console
mysqld --install
mysql -uroot -p
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '142857';
mysqladmin -u root password xxxx
[mysqld]
basedir = D:\Program\MySQL
datadir = D:\DBs\MySQL
port = 3306
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
character-set-server = utf8mb4
performance_schema_max_table_instances = 600
table_definition_cache = 400
table_open_cache = 256
[mysql]
default-character-set = utf8mb4
[client]
default-character-set = utf8mb4
mysqld --initialize --console
mysql -uroot -p
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '142857';
如果想默认使用“mysql_native_password”插件认证,可以在配置文件中配置default_authentication_plugin项。
[mysqld]
default_authentication_plugin=mysql_native_password