MariaDB [mysql]>use mysql; //选择系统数据库mysql
MariaDB [mysql]>select Host,User,Password from user; //查看所有用户
MariaDB [mysql]>delete from user where password="";
MariaDB [mysql]>GRANT ALL PRIVILEGES ON *.* TO root@"%" IDENTIFIED BY '123456'; //为root添加远程连接的能力
MariaDB [mysql]>flush privileges;
MariaDB [mysql]>select Host,User,Password from user; //确认密码为空的用户是否已全部删除
MariaDB [mysql]>exit;
设置防火墙,以便局域网内的其它服务器可以访问
vi /etc/sysconfig/iptables
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3309 -j ACCEPT
/etc/init.d/iptables restart
Ubuntu 上如何将 MySQL 5.5 数据库迁移到 MariaDB 10