码迷,mamicode.com
首页 > 数据库 > 详细

debian9安装mysql mariadb

时间:2017-10-19 13:55:23      阅读:222      评论:0      收藏:0      [点我收藏+]

标签:应该   ide   image   option   tree   部分   服务   连接   local   

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 

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

技术分享

debian9安装mysql mariadb

标签:应该   ide   image   option   tree   部分   服务   连接   local   

原文地址:http://www.cnblogs.com/itdef/p/7691886.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!