Tag: MySQL8
SELECT CONCAT("ALTER TABLE ", TABLE_SCHEMA, '.', TABLE_NAME," COLLATE utf8mb4_bin;") AS ExecuteTheString FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA="mydb" AND TABLE_TYPE="BASE TABLE";
mysql --skip-column-names < collate.sql > collate_change.sql
ALTER TABLE mydb.test_table COLLATE utf8mb4_bin; (...)
mysql < collate_change.sql
SELECT user, host, plugin FROM mysql.user;
[mysqld] default_authentication_plugin=mysql_native_password
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'pass';
SHOW MASTER LOGS;
PURGE MASTER LOGS before now();
disable-log-bin
mysql> CREATE USER 'root'@'%' IDENTIFIED BY 'root'; mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
SELECT * FROM mysql.component;
bind-address=0.0.0.0 skip-networking=0
$ mysql -b -e "SHOW GLOBAL VARIABLES like 'bind_address'"
select user,host from mysql.user; | root | localhost |
create user root@'%' identified by 'hogehoge'; GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
mysql > GRANT PROCESS ON *.* TO "your-user";