序,MariaDB Server是Mysql的fork版本,与Mysql完美兼容,mysql在10年被sun收购,后sun被oracle收购,后mysql的创建者及项目长期技术带头人之一的Michael ‘Monty’ Widenius。Monty和他的团队创建了Mysql的一个fork版本并命名为MariaDB。

MariaDB是一个开源数据库且100%与MySQL兼容,目标是替代MySQL数据库

默认上MariaDB的包并没有在Ubuntu仓库中。要安装MariaDB,我们首先要设置MariaDB仓库。

设置 MariaDB 仓库

  1. $ sudo apt-get install software-properties-common
  2. $ sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
  3. $ sudo add-apt-repository 'deb http://sfo1.mirrors.digitalocean.com/mariadb/repo/10.0/ubuntu trusty main'

安装 MariaDB :

  1. $ sudo apt-get update
  2. $ sudo apt-get install mariadb-server

在安装中,你会被要求设置MariaDB的root密码。

从命令行连接到MariaDB :

  1. linuxtechi@mail:~$ mysql -uroot -p
  2. Enter password:
  3. Welcome to the MariaDB monitor. Commands end with ; or \g.
  4. Your MariaDB connection id is 40
  5. Server version: 10.0.14-MariaDB-1~trusty-log mariadb.org binary distribution
  6. Copyright (c) 2000, 2014, Oracle, SkySQL Ab and others.
  7. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
  8. MariaDB [(none)]>

MariaDB 服务

  1. $ sudo /etc/init.d/mysql stop
  2. $ sudo /etc/init.d/mysql start

以上只是在Ubuntu上装完MariaDB,下面要设置MariaDB允许远程访问

1. 如果Ubuntu有设置防火墙或者iptables规则的话,请自行打开

2. 3306端口是不是没有打开?

使用nestat命令查看3306端口状态:

~# netstat -an | grep 3306

tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN

从结果可以看出3306端口只是在IP 127.0.0.1上监听,所以拒绝了其他IP的访问。

    解决方法:修改/etc/mysql/my.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

把上面这一行注释掉或者把127.0.0.1换成合适的IP,建议注释掉。

重新启动后,重新使用netstat检测:

~# netstat -an | grep 3306
    tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN

3. 现在使用下面命令测试:

     ~# mysql -h 192.168.0.101 -u root -p
    Enter password:
    ERROR 1130 (00000): Host 'Ubuntu-Fvlo.Server' is not allowed to connect to this MySQL server

    结果出乎意料,还是不行。

    解决方法:原来还需要把用户权限分配各远程用户。

    登录到mysql服务器,使用grant命令分配权限

    mysql> grant all on *.* to 你的用户名如root@'%' identified by '你的密码';

    完成后使用mysql命令连接,提示成功,为了确保正确可以再远程登陆测试一下。

ubuntu 14.04 安装mysql server的分支MariaDB Server初级教程的更多相关文章

  1. Ubuntu 14.04 安装mysql

    Ubuntu 14.04 没有mysql5.7的源,需要连接外部资源下载安装. wget http://dev.mysql.com/get/mysql-apt-config_0.8.1-1_all.d ...

  2. ubuntu 14.04 安装mysql server初级教程

    序,mysql数据库是开源的,被大多数企业所使用 目录 一.apt-get install 软件安装原理剖析二.安装mysql server三.配置和管理msyql 一.apt-get install ...

  3. ubuntu 14.04 安装mysql,并配置远程连接和中文乱码

    1. 安装MySQL的jar root@computer-PowerEdge-T30:~# sudo apt-get install mysql-server mysql-client在本次安装中,根 ...

  4. Ubuntu 14.04安装mysql

    在ubuntu kylin上面安装mysq的过程中遇到一些问题,记录如下, wget http://cdn.mysql.com//Downloads/MySQL-5.7/mysql-server_5. ...

  5. ubuntu 14.04安装mysql server & mysql client

    $ sudo apt-get install mysql-server

  6. 阿里云 Ubuntu 14.04 安装mysql 5.6

    1. 升级apt-get apt-get update 如果出现 : 说明没有你不是root用户,则需要用sudo命令 sudo apt-get update 下面出现权限问题都可以参照这个方法. 2 ...

  7. ubuntu 14.04安装mysql数据库

    1. apt-get install mysql-server mysql-client 输入root的密码: 确认root的密码: 2. 连接测试是否成功:mysql –hlocalhost –ur ...

  8. ubuntu 14.04 安装svn server (subversionedge )

    ubuntu 14.04 安装subversionedge 请仔细阅读安装包自带的readme文件! 1.先去官网,找安装包: http://subversion.apache.org/ http:/ ...

  9. Ubuntu 16.04 安装Mysql 5.7 踩坑小记

    title:Ubuntu 16.04 安装Mysql 5.7 踩坑小记 date: 2018.02.03 安装mysql sudo apt-get install mysql-server mysql ...

随机推荐

  1. string字符串的一系列操作

    IndexOf() 查找字串中指定字符或字串首次出现的位置,返首索引值,如: str1.IndexOf("字"): //查找“字”在str1中的索引值(位置) str1.Index ...

  2. [IOS多线程]的使用:防止进行HTTP数据请求时,UI卡死。

    多线程的实现:NSThread 1.子线程的创建:两种方法 第一种: [NSThread detachNewThreadSelector:@selector(downloadImage:) toTar ...

  3. LaTeX test

    \begin{equation} x^2+1=2 \end{equation} \begin{equation} x^2+y=3 \end{equation} $\dfrac{2\pi}{N}$

  4. bootstrap学习总结-01 环境准备

    1 下载Bootstrap Bootstrap 是最受欢迎的 HTML.CSS 和 JS 框架,用于开发响应式布局.移动设备优先的 WEB 项目.当前下载的Bootstrap版本为v3.3.7 htt ...

  5. java学习总结

    1 获得项目绝对路径 String path = request.getContextPath(); String basePath = request.getScheme() + ":// ...

  6. css居中那点事儿

    css居中那点事儿 在css中对元素进行水平居中是非常简单的,然而使元素垂直居中就不是一件简单的事情了,多年以来,垂直居中已经成为了CSS领域的圣杯,因为它是极其常见的需求,但是在实践中却不是一件简单 ...

  7. PHP-权限控制类

    http://blog.csdn.net/painsonline/article/details/7183679 <?php /** * 权限控制类 */ class include_purvi ...

  8. jquery 验证表单信息

    /** * $().validate(json); * *rules:自定义规则 * *messages:提示信息 */ $(document).ready(function(){ $(". ...

  9. 9月6日表格标签(table、行、列、表头)(补)

    一.<table> <table>代表表格标签.   <table></table> 1.width  表示表格宽度,宽度表达方式有像素和百分比两种.网 ...

  10. 关于软件工程结对编程作业 PairProject : Elevator Scheduler(电梯调度算法的实现与测试)的总结

    1)结对编程队友 1106xxxx 张扬 1106xxxx 杨军 其中,此项目的编程实现主要由前者完成. 2)关于结对编程 结对编程的优点: 最直接的一点:在结对编程中,由于有另一个人在你身边和你配合 ...