本文所描述的安装方法实用于一下软件环境 ,不能保证使用于其他版本,请参考自己实际情况调整安装方法及参数。

操作系统版本:Ubuntu Server 14.04 LTS 64bit

欲安装MariaDB版本:MariaDB 5.5.39

准备工作

确定安装版本以及安装文件

https://downloads.mariadb.org/

用APT方式安装MariaDB

配置库并导入相应的key

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://mirrors.hustunique.com/mariadb/repo/5.5/ubuntu trusty main'

以上步骤成功后,使用以下命令安装MariaDB

sudo apt-get update
sudo apt-get install mariadb-server

若要更改或设置MariaDB密码

注意:将'adminadmin' 替换成你自己的password

$>  /usr/bin/mysqladmin -u root password 'adminadmin'

启动MariaDB

$> service mysql start
* Starting MariaDB database server mysqld
...done.

确认 MariaDB 已经启动

$> netstat -tulnp|grep mysql
tcp 127.0.0.1: 0.0.0.0:* LISTEN /mysqld

或者

$> service mysql status
* /usr/bin/mysqladmin Ver 9.0 Distrib 5.5.-MariaDB, for debian-linux-gnu on x86_64
Copyright (c) , , Oracle, Monty Program Ab and others. Server version 5.5.-MariaDB-~trusty-log
Protocol version
Connection Localhost via UNIX socket
UNIX socket /var/run/mysqld/mysqld.sock
Uptime: min sec Threads: Questions: Slow queries: Opens: Flush tables: Open tables: Queries per second avg: 0.077

登陆MariaDB

本地机器登陆

mysql -u root -p  

如果是本机,那可以直接使用上面的命令登录,当然,需要输入密码. 如果是远程机器(与MariaDB 所处不同的机器),那么可能需要如下的形式:

其中xxx.xxx.xxx.x 为MariaDB所在机器的IP 或者机器名

mysql -h xxx.xxx.xxx.x -P  -u root -p  

简单SQL测试

MariaDB [(none)]> use mysql

MariaDB [mysql]> select count(*) from user;
+----------+
| count(*) |
+----------+
| |
+----------+
row in set (0.00 sec)

关于远程访问及防火墙设置请参考以下这篇文章

http://www.cnblogs.com/meetweb/p/3701443.html

完成

reference documents

https://mariadb.com/kb/en/mariadb/documentation/getting-started/mariadb-binary-packages/installing-mariadb-deb-files/

http://baike.baidu.com/view/2521908.htm?fr=aladdin

http://www.csdn.net/article/2013-07-12/2816207-5-reasons-its-time-to-ditch-mysql

http://www.it165.net/database/html/201403/5471.html

http://blog.csdn.net/renfufei/article/details/17616549

Install MariaDB on Ubuntu server的更多相关文章

  1. Install Java on Ubuntu server

    准备工作 a) 获得超级用户权限 关于超级用户访问权限的说明: 要将 Java 安装在系统级位置(例如 /usr/java),则必须以超级用户身份登录,从而获得必要的权限.如果您不具有超级用户访问权限 ...

  2. Compiling Xen-4.4 From Source And Installing It On Ubuntu Server (Amd-64)

    First of all, you should install a clean Ubuntu Server (Amd-64) on your server. (Version 14.04 is st ...

  3. install MariaDB 10.2 on Ubuntu 18

    Here are the commands to run to install MariaDB 10.2 from the MariaDB repository on your Ubuntu syst ...

  4. Install Ubuntu Server

    进入引导程序以后, 选择Install Ubuntu Server, 安装主菜单如下: 依次配置: 接着 https://www.youtube.com/watch?v=gqLaT01yei0

  5. ubuntu server install 安装中文(搜狗)输入法

    1.对于ubuntu server默认无中文输入法框架,我比较倾向于我一直使用的ibus-sunpinyin.这里我需要先安装ibus的框架 不过我遇到了问题: dpkg: dependency pr ...

  6. Install and Enable Telnet server in Ubuntu Linux

    转:http://ubuntuguide.net/install-and-enable-telnet-server-in-ubuntu-linux 参考:http://auxnet.org/index ...

  7. Ubuntu Server无线连接配置

    由于Ubuntu  Linux内核对于WPA的加密方式支持不是很好,所有使用普通方式的命令行无法连接WPA2类型的路由.首先检查是否安装了wpasupplicant,Ubuntu 10.04已经安装了 ...

  8. 在ubuntu server中安装和配置docker

    经过一段时间针对不同版本的学习,现在总结当前最新的安装配置过程(应该也是比较简单的) 如果不清楚什么是docker,请参考 https://www.docker.com/ 准备工作 建议在安装之前运行 ...

  9. sysv-rc-conf管理Ubuntu server开机启动服务

    在RedHat中,都是使用chkconfig来管理服务的,但是在Ubuntu Server中,却有一个更好的工具,chkconfig也是可以使用的.今天来说一下sysv-rc-conf sysv-rc ...

随机推荐

  1. log4net:ERROR ConfigureFromXml called with null 'element' parameter

    场景重现 ASP.NET Core 下集成 log4net 时, 运行时报错如下: log4net:ERROR ConfigureFromXml called with null 'element' ...

  2. 【问题解决:信息提示】SpringBoot启动时提示The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path

    问题描述 springboot程序在启动时提示信息 [2018-10-24 21:59:05.214] - 440 信息 [restartedMain] --- org.apache.catalina ...

  3. Learning-MySQL【3】:数据类型和运算符

    一.数据类型 1.数值类型 为每张表的每个字段选择合适的数据类型是数据库设计过程中一个重要的步骤. 数字分为整数和小数.其中整数用整数类型表示,小数用浮点数类型和定点数类型表示. 浮点数类型包括单精度 ...

  4. .Net中json序列化与反序列化

    NuGet中下载Newtonsoft.Json插件. public class JsonHelper<T>{ public static string ModelToJsonString( ...

  5. 安卓constraintLayout中app:srcCompat设置的图片显示不出来

    使用 app:srcCompat 的时候 引入的图片显示不出来的解决方案 首先查看的你的Activity 继承的是那个Activity 如果是继承AppcompatActivity  使用 Image ...

  6. [Angular] 'providedIn' for service

    There is now a new, recommended, way to register a provider, directly inside the @Injectable() decor ...

  7. 安装Go插件遇到的问题及解决方法

    1. 问题:在 Windows 平台下使用 go get 安装sqlite3 驱动时报错 The remote end hung up unexpectedly ? 原因及解决方法: 原因可能有两种: ...

  8. 一个时代的终结:为什么是时候放弃ITOM四大巨头了?这对IT领导者来说意味着什么?

    ​​关注嘉为科技,获取运维新知 2018年7月,Broadcom宣布了收购CA Technologies的计划,收购额近190亿美元.虽然分析师对于芯片制造商收购企业级软件公司这件事是否值得还在进行激 ...

  9. eclipse 运行 mapreduce程序报错 No job jar file set. User classes may not be found. See JobConf(Class) or JobConf#setJar(String).

    报错信息 17/07/06 17:00:27 WARN mapred.JobClient: Use GenericOptionsParser for parsing the arguments. Ap ...

  10. js里面关于日期转换的问题

    我们拿到一个日期字符串:"2017-09-03",我们用new Date("2017-09-03")去转换成日期格式的时候,发现在火狐会报错,是因为火狐不支持这 ...