前言:

  安装过程不再赘述,直接说问题,mysql的远程连接需要解决两个问题:1.允许root用户远程连接。2.允许任意ip远程连接数据库。当然,在测试和解决问题之前,得首先保证你的数据库与远程主机之间的网络通信没有问题,简单的来说,就是互相ping通,其次,为了避免防火墙的干扰,将本地主机和数据库主机的防火墙都关闭,当然,生产环境下防火墙肯定是要打开的,并且需要额外的安全配置。

问题解决:

1.新安装的数据库默认是需要初始化的,在数据库服务启动的情况下,使用下面的命令来进行初始化。

[root@localhost ~]# mysql_secure_installation
New password: 
Re-enter new password: 
Password updated successfully!
Reloading privilege tables..
 ... Success!


By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.

Remove anonymous users"text-align: center">Mariadb远程登陆配置及问题解决

如图所示则为允许任意IP连接。

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。

标签:
Mariadb,远程登陆,配置

免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
狼山资源网 Copyright www.pvsay.com

评论“Mariadb远程登陆配置及问题解决”

暂无“Mariadb远程登陆配置及问题解决”评论...