Linux MySQL中文乱码问题

it2022-05-06  0

1、sudo apt-get install mysql-server mysql-client

2、sudo mysql -u root -p

3、update mysql.user set plugin="mysql_native_password" where user="root";

4、update mysql.user set authentication_string=password(‘1234‘) where user=‘root‘ and Host=‘localhost‘;

5、sudo service mysql restart

6、mysql -u root -p

7、(输入 mysql 密码)

8、set character_set_database=utf8;

9、set character_set_server=utf8;

10、set global character_set_database=utf8;

11、set global character_set_server=utf8;


最新回复(0)