show variables like '%char%';
show global variables like '%char%';
SET character_set_client = utf8;
SET character_set_server=utf8;
SET character_set_results = utf8;
SET character_set_connection = utf8;
SET character_set_database=utf8;
SET GLOBAL character_set_client=utf8;
SET GLOBAL character_set_connection=utf8;
SET GLOBAL character_set_results=utf8;
SET GLOBAL character_set_server=utf8;
SET GLOBAL character_set_database=utf8;
centenos7查看mysql数据库状态,重启mysql数据库命令
sudo systemctl status mysqld
sudo systemctl restart mysqld
service mysqld status
查看MySQL的安装目录的命令
which mysql