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密码

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

启动MariaDB

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

确认 MariaDB 已经启动

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

登陆MariaDB

mysql -u root -p  

如果是本机,那可以直接使用上面的命令登录,当然,需要输入密码. 如果是其他机器,那么可能需要如下的形式:

mysql -h 127.0.0.1 -P 3306 -u root -p  

简单SQL测试

MariaDB [(none)]> use mysql

MariaDB [mysql]> select count(*) from user;
+----------+
| count(*) |
+----------+
|        5 |
+----------+
1 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

时间: 2024-10-21 13:33:12

Install MariaDB on Ubuntu server的相关文章

Install Java in Ubuntu server

准备工作 a) 获得超级用户权限 关于超级用户访问权限的说明: 要将 Java 安装在系统级位置(例如 /usr/java),则必须以超级用户身份登录,从而获得必要的权限.如果您不具有超级用户访问权限,请将 Java 安装在您的主目录中,或者安装在您具有写入权限的子目录中 b) 从以下 java网站找到适合当前环境的安装包 http://www.java.com/en/download/manual.jsp 本文以安装版本 7 Update 67 for linux 64x为例 安装包链接:ht

Install Mariadb in Ubuntu 16.04 LTS

MariaDB官网提供了repository https://downloads.mariadb.org/mariadb/repositories/#mirror=tuna 在这里可以查询到各类系统的安装方法,这里仅对Ubuntu 16.04 LTS讲解. add key sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8 add sources sudo sh -c

Install laravel 5 on ubuntu server

Install laravel 5 on ubuntu server http://laravel.io/forum/06-10-2015-solved-install-laravel-5-on-ubuntu-server https://www.digitalocean.com/community/questions/how-to-install-laravel-5-on-ubuntu-nginx-server https://www.digitalocean.com/community/tu

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 strongly recommended for the best compatibility) Get the souce code of Xen ready by "git clone". ((If some errors occur in this step, you may check

Ubuntu Server 16.04 安装 Percona Server 5.7 来代替 MySQL 或 MariaDB详细教程

本文标签:    Ubuntu MySQL UbuntuServer PerconaServer MySQL数据库服务器性能优化 互联网杂谈 一.这货是什么? Percona 为 MySQL数据库服务器进行了改进,在功能和性能上较 MySQL 有着很显著的提升.该版本提升了在高负载情况下的 InnoDB 的性能.为 DBA 提供一些非常有用的性能诊断工具:另外有更多的参数和命令来控制服务器行为.Via 经过长期实践以及生产环境测试, Percona Server 的性能和稳定性比原生的 MySQ

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 system: sudo apt-get install software-properties-common sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8 sudo add

How do install openjdk and tomcat in ubuntu server

OK, here is the solution I found after searching lots of things: http://www.oschina.net/question/12_21632 https://www.digitalocean.com/community/tutorials/how-to-install-apache-tomcat-on-ubuntu-12-04 My system is a ubuntu 10.04 LTS (Lucid), the openj

Install ntopng on Ubuntu 14.04 Server

please check http://www.nmon.net/apt-stable/ 1. echo -e "deb http://www.nmon.net/apt-stable/14.04/ x64/\ndeb http://www.nmon.net/apt-stable/14.04/ all/" > /etc/apt/sources.list.d/ntop.list wget -qO - http://www.nmon.net/apt-stable/ntop.key |

Install MySQL 5.7.5-m15 on Ubuntu Server 14.04 LTS

Install libaio MySQL depends on the libaio library. If you have not the libaio installed on your system, then install it first. apt-get install libaio1 If the command above prompts that you need insert the disc labled "Ubuntu Server 14.04 LTS ...&quo