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 ...
随机推荐
- Sql语句中IN和exists的区别及应用
表展示 首先,查询中涉及到的两个表,一个user和一个order表,具体表的内容如下: user表: order表: in 确定给定的值是否与子查询或列表中的值相匹配.in在查询的时候,首先查询子查询 ...
- SpringMVC 搭建
1. 新建一个项目 Paste_Image.png 我们用eclipse新建项目,选择Dynamic Web Project(动态的Web项目). 点击Next Paste_Image.png ...
- tomcat启动后8005端口未被占用
8005端口是tomcat本身的端口,如果这个端口在启动时未被tomcat占用的话,就无法使用它自带的shutdown.sh脚本关闭tomcat 接下来我以tomcat-9.0.12为例说明 下载to ...
- TestNG详解(单元测试框架)
一.TestNG的优点 1.1 漂亮的HTML格式测试报告 1.2 支持并发测试 1.3 参数化测试更简单 1.4 支持输出日志 1.5 支持更多功能的注解 二.编写TestNG测试用例的步骤 2.1 ...
- js 可以表示的最大值
, ); ; ; for (var i = START; i <= END; i++) { count++; } console.log(count); // A. 0 // B. 100 // ...
- caffe提取每一层中的特征,在matlab或python查看
参考博客: http://blog.csdn.net/abc8730866/article/details/52522843 http://blog.csdn.net/lijiancheng0614/ ...
- 以太坊钱包开发系列2 - 账号Keystore文件导入导出
以太坊去中心化网页钱包开发系列,将从零开始开发出一个可以实际使用的钱包,本系列文章是理论与实战相结合,一共有四篇:创建钱包账号.账号Keystore文件导入导出.展示钱包信息及发起签名交易.发送Tok ...
- js中Undefined 和 Null的区别
Undefined 和 Null Undefined 这个值表示变量不含有值. 可以通过将变量的值设置为 null 来清空变量. <!DOCTYPE html> <html> ...
- tensorflow world language model
上文提到了pytorch里的world language model,那么怎么能不说tensorflow的实现呢,还是以tensorflow ptb的代码为例说说. 地址: https://githu ...
- 【转载】如何将本地文件上传到github托管
转自:http://www.cnblogs.com/babywin/p/6073124.html 清楚明白.