debian9安装mysql mariadb

debian9下mysql 替换成mariadb-server-10.1

不过两者类似

具体可见 《MySQL和mariadb区别》

http://ask.chinaunix.net/question/556

MySQL之父Widenius先生离开了Sun之后,觉得依靠Sun/Oracle来发展MySQL,实在很不靠谱,于是决定另开分支,这个分支的名字叫做MariaDB。

。。。。。

所以对于大部分的MySQL用户来说,从现在主流的MySQL转到MariaDB应该是没有什么难度的

1 su 切换到root账号

apt-get install mysql-server

显示如下(安装完成后 再次运行安装命令的提示 )

# apt-get install mysql
Reading package lists... Done
Building dependency tree
Reading state information... Done

mysql 也就是debian的MariaDB 安装成功

2 开启服务器 远程ping服务器Ip 发现可ping通

但是无法登陆MariaDB  这是因为没有开启远端访问

默认路径下 /etc/mysql/mariadb.conf.d 开启50-server.cnf

# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = 127.0.0.1

修改为

# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
#bind-address = 127.0.0.1

使用ROOT权限保存文档 服务器可识别除了127.0.0.1 以外的连接

3 进入服务器开启远程账号访问

在mysql 下 输入 grant all privileges on *.* to 'root'@'%' identified by 'ROOTpassword' with grant option;

开启远程访问数据库的账号.

4 可以进行远程访问了 我这里使用的是navicat 

按照提示设置连接属性即可

作 者: itdef
欢迎转帖 请保持文本完整并注明出处
技术博客 http://www.cnblogs.com/itdef/
B站算法视频题解
https://space.bilibili.com/18508846
qq 151435887
gitee https://gitee.com/def/
欢迎c c++ 算法爱好者 windows驱动爱好者 服务器程序员沟通交流
如果觉得不错,欢迎点赞,你的鼓励就是我的动力
阿里打赏 微信打赏
原文地址:https://www.cnblogs.com/itdef/p/7691886.html