Install MariaDB on Ubuntu server
本文所描述的安装方法实用于一下软件环境 ,不能保证使用于其他版本,请参考自己实际情况调整安装方法及参数。
操作系统版本: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
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的更多相关文章
- Install Java on Ubuntu server
准备工作 a) 获得超级用户权限 关于超级用户访问权限的说明: 要将 Java 安装在系统级位置(例如 /usr/java),则必须以超级用户身份登录,从而获得必要的权限.如果您不具有超级用户访问权限 ...
- 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 ...
- 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 ...
- Install Ubuntu Server
进入引导程序以后, 选择Install Ubuntu Server, 安装主菜单如下: 依次配置: 接着 https://www.youtube.com/watch?v=gqLaT01yei0
- ubuntu server install 安装中文(搜狗)输入法
1.对于ubuntu server默认无中文输入法框架,我比较倾向于我一直使用的ibus-sunpinyin.这里我需要先安装ibus的框架 不过我遇到了问题: dpkg: dependency pr ...
- Install and Enable Telnet server in Ubuntu Linux
转:http://ubuntuguide.net/install-and-enable-telnet-server-in-ubuntu-linux 参考:http://auxnet.org/index ...
- Ubuntu Server无线连接配置
由于Ubuntu Linux内核对于WPA的加密方式支持不是很好,所有使用普通方式的命令行无法连接WPA2类型的路由.首先检查是否安装了wpasupplicant,Ubuntu 10.04已经安装了 ...
- 在ubuntu server中安装和配置docker
经过一段时间针对不同版本的学习,现在总结当前最新的安装配置过程(应该也是比较简单的) 如果不清楚什么是docker,请参考 https://www.docker.com/ 准备工作 建议在安装之前运行 ...
- sysv-rc-conf管理Ubuntu server开机启动服务
在RedHat中,都是使用chkconfig来管理服务的,但是在Ubuntu Server中,却有一个更好的工具,chkconfig也是可以使用的.今天来说一下sysv-rc-conf sysv-rc ...
随机推荐
- GlitchBot
问题 F: GlitchBot 时间限制: 1 Sec 内存限制: 128 MB 提交: 230 解决: 113 [提交] [状态] [命题人:admin] 题目描述 One of our del ...
- ng工程升级cli版本
全局更新ng 然后在工程里 ng update @angular/cli @angular/core
- MVC实战之排球计分软件(深入了解面向对象编程)
在此篇博客之前,我已经写了一个实战系列的博客,虽然不太成熟但是相对比较实用,在这篇博客我将继续使用mvc编程此软件. 此篇博客会在一定的时间内完成,此次完成的软件的一个需求是提供给运动员的使用.我将在 ...
- Spring cloud系列之Zuul配置项中sensitiveHeaders和ignoredHeaders
sensitiveHeaders:会过滤客户端请求中的和该配置项匹配的headers比如: zuul: sensitiveHeaders: X-ABC 如果客户端在发请求是带了X-ABC,那么X-AB ...
- Python _Mix*9
1. 函数 函数是对功能的封装 语法: def 函数名(形参列表): 函数体(代码块) 代码块中有可能包含return 调用: 函数名(实参列表) def mix(a,b): #def 函数名(a和b ...
- caffe drawnet.py 用Python画网络框架
在caffe中可以使用draw_net.py轻松地绘制卷积神经网络(CNN,Convolutional Neural Networks)的架构图.这个工具对于我们理解.学习甚至查错都有很大的帮助. 1 ...
- C语言:统计数字空格其他字符程序
#include <stdio.h> int main(){ char t; int num=0; int spac=0; int other=0; int sum=0; printf(& ...
- JavaWeb基础-过滤器监听器
过滤器 1定义:过滤器是一个服务器的组件,他可以截取用户端的请求与响应信息,并对这些信息进行过滤;过滤器可以动态地拦截请求和响应,以变换或使用包含在请求或响应中的信息. 2过滤器的工作原理: 3过滤器 ...
- void的几点用法
1.可以通过void 0 获取undefined.等同于void(0). void 任意数 === undefined // true void(0) === undefined // true ...
- Oracle 创建存储过程 提示权限不足或者提示表和视图不存在问题
grant create view to hospital; --授予查询权限 grant select any table to hospital; --授予权限 grant select any ...