目录

8.2 Mysql相关配置

8.2.1 开启用户远程访问权限

[root\@master \~]\# mysql -u root
mysql \> use mysql;
mysql \> update user set password=password(' your password ') where user='root';
mysql\> grant all privileges on \*.\* to root\@"%" identified by "your
password";
Query OK, 0 rows affected (0.00 sec)
mysql\> flush privileges;

8.2.2 创建utf8编码的数据库

CREATE DATABASE IF NOT EXISTS yourdbname DEFAULT CHARSET utf8 COLLATE utf8_general_ci;