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

操作系统版本: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. SAP PI

    PI功能很是强大,且系统很稳定. 1.什么是PI PI = Process IntegrationSAP PI是一项集成的技术和平台    1.为sap和non-sap之间提供集成    2.为A2A ...

  2. Qt打开文件对话框同时选中多个文件或单个文件

    Qt中打开单个文件 //str_path为文件路径 QString str_path = QFileDialog::getOpenFileName(this, tr("选择转码文件" ...

  3. angular --- s3core移动端项目(二)

    product-ctrl.js angular.modules('myApp').controller('ProductCtrl',['$scope','$rootScope','$timeout', ...

  4. ASP.NET Core Swagger 显示接口注释

    在Startup中 services.AddSwaggerGen(options => { options.SwaggerDoc("v1", new Info { Title ...

  5. collections.deque

    d = collections.deque([])  # 创建双端队列d.append('a') # 在最右边添加一个元素,此时 d=deque('a')d.appendleft('b') # 在最左 ...

  6. (14)线程- Event事件和守护线程Daemon

    <一>Event事件 线程Event基本和进程的Event语法是一样的 # wait() 动态给程序加阻塞 # set() 将内部属性改成True # clear() 将内部属性改成Fal ...

  7. 4、NFS

    一.NFS简介 4.1.1:什么是NFS NFS(Network File System,网络文件系统)是由SUN公司开发,并于1984年推出的技术,通过使用NF,用户和程序可以向访问本地文件一样访问 ...

  8. 黏包-黏包的成因、解决方式及struct模块初识、文件的上传和下载

    黏包: 同时执行多条命令之后,得到的结果很可能只有一部分,在执行其他命令的时候又接收到之前执行的另外一部分结果,这种显现就是黏包. 只有TCP协议中才会产生黏包,UDP协议中不会有黏包(udp协议中数 ...

  9. SSM 框架 整合<SpringMVC+Spring+MyBatis>

    一 框架的搭建1.建立一个maven项目 2.建立五个module(entity,dao,service,action,web-view) 3.给予它们之间的依赖关系 dao-->entity ...

  10. Andriod Studio两种签名机制V1和V2的区别

    Android Studio 2.2以上版本打包apk的时候,我们会发现多了个签名版本(v1.v2)选择,如下图红色方框所示 问题描述(v1和v2) Android 7.0中引入了APK Signat ...