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
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";