序,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. NOI2016模拟赛Zbox loves stack

    #include <iostream> #include <cstdio> #include <cstring> #include <cmath> #i ...

  2. mvc remote的验证

    1,问题 在mvc验证的时候怎么自定义验证action?比如说验证用户名是否重复. 2.解决方法 通过remote 的特性 第一参数是对应的action 第二个对应的是controller contr ...

  3. Metro-UI系统-1-tile标签

    一 效果图 二 各个效果的详解 1,简单磁贴 <div class="tile" data-role="title"> <!--定义一个磁贴- ...

  4. text-indent无效解决方案

    text-indent是用来字符缩进的. 1.text-indent所在的元素是行内元素而非块级元素.比如用在span,a等行内元素上.解决方案:在行内元素加上display:block; 或者把目标 ...

  5. SQL Server在更改计算机名后的设置

    把原来的账号删除 再添加现有的账号 添加权限 搞定了上面的账号配置,接下来就是设置服务器名称 参考:http://www.cnblogs.com/EasonJim/p/6114249.html 后话: ...

  6. 深入解析direct path read (转)

    文章转自:http://www.itpub.net/thread-1815281-1-1.html 传统读取数据的方式是服务器进程通过读取磁盘,然后把数据加载到共享内存中,这样后面的进程就可以通过共享 ...

  7. [转]vi command summary

    The following tables contain all the basic vi commands. *Starting vi* Command Description vi file st ...

  8. squid日志时间转换

    squid日志时间是unix时间戳 不利于观看 python脚本进行转换 #!/usr/bin/env python #2014-6-5 pdd import re import time impor ...

  9. 批处理(.bat)For命令使用

    for命令使用 @echo off REM 打印当前目录里所有子目录的名称 REM for /d %%i in (*) do @echo %%i REM 打印当前目录里所有名字为3个字符的子目录的名称 ...

  10. 解决冲突-git入门教程

    人生不如意之事十之八九,合并分支往往也不是一帆风顺的. 准备新的feature1分支,继续我们的新分支开发: $ git checkout -b feature1 Switched to a new ...