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 

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

转载于:https://www.cnblogs.com/itdef/p/7691886.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值