ubuntu 14.04 安装mysql server的分支MariaDB Server初级教程
序,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 仓库
- $ sudo apt-get install software-properties-common
- $ sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
- $ sudo add-apt-repository 'deb http://sfo1.mirrors.digitalocean.com/mariadb/repo/10.0/ubuntu trusty main'
安装 MariaDB :
- $ sudo apt-get update
- $ sudo apt-get install mariadb-server
在安装中,你会被要求设置MariaDB的root密码。

从命令行连接到MariaDB :
- linuxtechi@mail:~$ mysql -uroot -p
- Enter password:
- Welcome to the MariaDB monitor. Commands end with ; or \g.
- Your MariaDB connection id is 40
- Server version: 10.0.14-MariaDB-1~trusty-log mariadb.org binary distribution
- Copyright (c) 2000, 2014, Oracle, SkySQL Ab and others.
- Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
- MariaDB [(none)]>
MariaDB 服务
- $ sudo /etc/init.d/mysql stop
- $ 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初级教程的更多相关文章
- Ubuntu 14.04 安装mysql
Ubuntu 14.04 没有mysql5.7的源,需要连接外部资源下载安装. wget http://dev.mysql.com/get/mysql-apt-config_0.8.1-1_all.d ...
- ubuntu 14.04 安装mysql server初级教程
序,mysql数据库是开源的,被大多数企业所使用 目录 一.apt-get install 软件安装原理剖析二.安装mysql server三.配置和管理msyql 一.apt-get install ...
- ubuntu 14.04 安装mysql,并配置远程连接和中文乱码
1. 安装MySQL的jar root@computer-PowerEdge-T30:~# sudo apt-get install mysql-server mysql-client在本次安装中,根 ...
- Ubuntu 14.04安装mysql
在ubuntu kylin上面安装mysq的过程中遇到一些问题,记录如下, wget http://cdn.mysql.com//Downloads/MySQL-5.7/mysql-server_5. ...
- ubuntu 14.04安装mysql server & mysql client
$ sudo apt-get install mysql-server
- 阿里云 Ubuntu 14.04 安装mysql 5.6
1. 升级apt-get apt-get update 如果出现 : 说明没有你不是root用户,则需要用sudo命令 sudo apt-get update 下面出现权限问题都可以参照这个方法. 2 ...
- ubuntu 14.04安装mysql数据库
1. apt-get install mysql-server mysql-client 输入root的密码: 确认root的密码: 2. 连接测试是否成功:mysql –hlocalhost –ur ...
- ubuntu 14.04 安装svn server (subversionedge )
ubuntu 14.04 安装subversionedge 请仔细阅读安装包自带的readme文件! 1.先去官网,找安装包: http://subversion.apache.org/ http:/ ...
- 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 ...
随机推荐
- 细解ListView之自定义适配器
下面我们将以一个例子来讲述ListView之自定义适配器 首先我们看一下效果图: [分析] 首先:需要创建一个ListView控件,自定义适配器是为了实现自定义ListView的ListView_It ...
- ubuntu 设置 NAT 转发
针对需求: 嵌入式开发中,经常使用板子和笔记本通过网线直连,如果需要板子连接到外网,就比较尴尬. 最简单方法,可以把板子接到局域网内,我们的笔记本通过局域网交换机连接到板子,可是,这样要很多修改 IP ...
- ubuntu常见错误--could not get lock /var/lib/dpkg/lock -open
最近研究ubuntu,用apt-get命令安装一些软件包时,总报错:E:could not get lock /var/lib/dpkg/lock -open等 出现这个问题的原因可能是有另外一个程序 ...
- 分布式存储数据库的Key的随机分布(RP)和顺序分布(OPP)
在分布式存储数据库的世界中,无论是基于Key/Value的数据库还是Column Base(比如HBase)的数据库,都有一个重要的因子------Key,或者叫RowKey.我们总是根据Key来快速 ...
- AngularJs $location 和 $window
$location $location服务解析浏览器地址中的url(基于window.location)并且使url在应用程序中可用.将地址栏中的网址的变化反映到$location服务和$locati ...
- 【转载】Linux启动过程
转自:http://cizixs.com/2015/01/18/linux-boot-process 简介 我们都知道:操作系统运行的代码是在硬盘上的,最终要跑到内存和 CPU 上,才能被我们使用. ...
- DNS介绍
DNS出现及演化 网络出现的早期 是使用IP地址通讯的,那时就几台主机通讯.但是随着接入网络主机的增多,这种数字标识的地址非常不便于记忆,UNIX上就出现了建立一个叫做hosts的文件(Linux和w ...
- 分页进阶--ajax+jquery+struts2
按照上次的分页逻辑,分页查询的业务大概需要几个“零件”:1.当前页:2.总页数:3.跳转页.后端需要处理的是:按照传送过来请求的页码返回相应地数据,并且接受初始化参数的请求:总页码.第一页的数据. 使 ...
- Spring事务传播简介
一.事务传播属性(propagation) 1.REQUIRED,默认属性 此级别下,会为每一个调用的方法创建一个逻辑事务域,如果前面的方法已经创建了事务,那么后面的方法支持当前事务,如果当前没有事务 ...
- Java学习笔记2
package welcome; public class Constants { public static void main(String[] args){ final double CM_PE ...