linux:直接yum install msyql-server
或者 看菜鸟教程:https://www.runoob.com/mysql/mysql-install.html
MySQL允许root远程访问:
1. mysql -u root -p; // 登录mysql, 并输入密码 2. use mysql; // 打开 mysql 数据库 3. update user set host=’%’ where user=’root’ and host=’localhost’; // 允许远程登录 update user set host=’localhost’ where user=’root’; // 禁止远程登录 4. flush privileges; //刷新权限表,使配置生效 5. service mysqld restart // 重启mysql服务