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-apt-repository 'deb [arch=amd64,arm64,ppc64el] http://mirrors.neusoft.edu.cn/mariadb/repo/10.2/ubuntu bionic main'

Once the key is imported and the repository added you can install MariaDB 10.2 from the MariaDB repository with:

sudo apt update
sudo apt install mariadb-server

Some times we need to stop or start MariaDB service. Use the following commands to stop, start, check status and restart MariaDB servic.

$ sudo systemctl stop mysql.service      # To Stop MariaDB service
$ sudo systemctl start mysql.service # To Start MariaDB service
$ sudo systemctl status mysql.service # To Check MariaDB service status
$ sudo systemctl restart mysql.service # To Stop then Start MariaDB service

try remotely connect to the server

it's very trick,

firstly you have to comments bind-address in file /etc/mysql/my.cnf in case you are encountering 10061 error refer to this page

#bind-address = <some ip-address>
grant user to remote access the db via root user refer to this page for details
GRANT ALL PRIVILEGES ON *.* TO 'root'@'192.168.%' IDENTIFIED BY 'my-new-password' WITH GRANT OPTION;
and then reset root user of mariadb's password  refer to this
MariaDB [(none)]> select host,user,password from mysql.user;

+-----------+------+-------------------------------------------+
| host | user | password |
+-----------+------+-------------------------------------------+
| localhost | root | *C61A1C944BC7AXXXXXXXXXXXXXX4B81A462D9CB3 |
| 127.0.0.1 | root | *C61A1C944BC7A3XXXXXXXXXXXXX4B81A462D9CB3 |
| :: | root | *C61A1C944BC7A3XXXXXXXXXXXXX4B81A462D9CB3 |
| % | root | *81F5E21E35407DXXXXXXXXXXXXXEBFB6AF209E1B | wrong password made me facing 1045 error
+-----------+------+-------------------------------------------+
restar the db service
service mysql restart

if it's Centos 7, please use the following instead

systemctl restart mariadb.service

then connect to the db via Navicat or mariadb CLI command

mysql -h xxx.xx.xx -u root -p 

others useful command

change user password

Open the bash shell and connect to the server as root user

mysql -u root -h localhost -p

Run command:

ALTER USER admin IDENTIFIED BY 'New-Password-Here';

change databse or table charset

ALTER DATABASE databasename CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE cen_bridge_dictionary CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

create database with specified charset

CREATE DATABASE IF NOT EXISTS RUNOOB DEFAULT CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci;

backup and restore

backup db

mysqldump -u user_name -p  --databases database_name >dump.sql

restore db

mysql -u root -p[root_password] --databases database_name < dumpfilename.sql

refer to this page for charactar set

reference documents

https://askubuntu.com/questions/1009175/mariadb-10-0-33-configuring-mariadb-for-remote-client-access

https://www.jb51.net/article/26505.htm

https://mariadb.com/kb/en/library/configuring-mariadb-for-remote-client-access/

https://downloads.mariadb.org/mariadb/repositories/#mirror=neusoft&distro=Ubuntu&distro_release=bionic--ubuntu_bionic&version=10.2

https://tecadmin.net/install-mariadb-10-on-ubuntu/

install MariaDB 10.2 on Ubuntu 18的更多相关文章

  1. How to install the NVIDIA drivers on Ubuntu 18.04 Bionic Beaver Linux

    Objective The objective is to install the NVIDIA drivers on Ubuntu 18.04 Bionic Beaver Linux. This a ...

  2. CENTOS 7 install mariadb 10.3

    CENTOS install mariadb 10.3 cat >/etc/yum.repos.d/MariaDB.repo << 'EOF' [mariadb] name = Ma ...

  3. How to Install Oracle Java 11 on Ubuntu 18.04 LTS (Bionic) Written by Rahul, Updated on April 3, 20

    本文系转载备份 请阅读点击下面链接阅读原文以获取更佳地阅读体验.谢谢. How to Install Oracle Java 11 on Ubuntu 18.04 LTS (Bionic) Writt ...

  4. [转]How to Install Oracle Java 11 in Ubuntu 18.04/18.10

    链接地址:http://ubuntuhandbook.org/index.php/2018/11/how-to-install-oracle-java-11-in-ubuntu-18-04-18-10 ...

  5. How to install tensorflow from source on ubuntu 18.04 64bit

    1,install dependencies sudo apt-get install openjdk-8-jdk git python-dev python3-dev python-numpy py ...

  6. 从Ubuntu 18.04 LTS升级到Ubuntu 18.10版本的方法

    从Ubuntu 18.04 LTS升级到Ubuntu 18.10版本的方法 2018-10-18 21:08:39作者:ywnz稿源:云网牛站 本文提供从Ubuntu 18.04 LTS(Bionic ...

  7. Ubuntu 18 Kubernetes集群的安装和部署 以及Helm的安装

    首先说一下我的环境, 我是在windows 10 上面建了一个ubuntu18的虚拟机,同时由于某些原因 不受网络限制, 所以安装比较顺利. Install 1.安装并启用 Docker  sudo ...

  8. Ubuntu 18.04 Server 配置静态ip

    刚在虚拟机里面状态了一个 Ubunut 18.04 Server 作为我的服务器,我习惯使用静态ip首先再virtualbox中设置虚拟机网络的连接方式为桥接模式进入ubuntu虚拟机根据我的印象直接 ...

  9. Ubuntu 18.04 安装、配置和美化

    本文章修改自inkss的博文 为什么要修改原文? 本来我是想自己写这么一篇的,但是没想到在百度一搜,居然一篇好文.我之前没看到,真是可惜. 这篇文章主要是帮助我记录一些东西,如题. 原文虽然不错,但是 ...

随机推荐

  1. method.invoke()s

    在框架中经常会会用到method.invoke()方法,用来执行某个的对象的目标方法.以前写代码用到反射时,总是获取先获取Method,然后传入对应的Class实例对象执行方法.然而前段时间研究inv ...

  2. CEPH集群操作入门--部署和运维

    部署 预检和安装Ceph 参考 虚拟机使用ceph-deploy安装ceph 创建群集 添加/删除监视器 密钥管理 添加/删除OSD 添加/删除MDS 清除主机 管理任务   运维 操作群集 健康检查 ...

  3. hosts 添加主机和ip映射

    背景:在服务器搭建环境时,迁移项目后,停止服务出现以下问题. 原因:项目停止或启动找不到映射名称或服务. 解决:修改hosts文件.hosts文件地址 /etc/hosts         添加主机和 ...

  4. TCP学习总结(二)

    前面一节咱们介绍完了TCP协议,这部分,将要介绍,TCP是如何实现可靠传输的. TCP的可靠传输 1.滑动窗口 上一节我们介绍TCP报文段头部的时候说得到,"窗口"这个部分,&qu ...

  5. 蓝牙协议分析(12)_LQ和RSSI的原理及应用场景

    在蓝牙协议栈的物理层,有这样两个比较有用的参数:LQI和RSSI.它们都是通过接收端,判断当前无线环境的质量(链路质量),以指导后续的动作.但这两个数值的计算原理和使用场景又有很大的差别. LQI ( ...

  6. Where do I belong (freeCodeCamp)

    先给数组排序,然后找到指定的值在数组的位置,最后返回位置对应的索引. 举例:where([1,2,3,4], 1.5) 应该返回 1.因为1.5插入到数组[1,2,3,4]后变成[1,1.5,2,3, ...

  7. jasperreports+IReport 5.56,集成到Spring MVC4.0案例

    首先,先说一下需求,项目需要打印一些报表,也没多想,直接就在jsp页面设置了样式,前台直接调用window.print()写了打印功能,但是例会的时候,领导提出需要一些比较麻烦的打印,自己写肯定费时间 ...

  8. Some notes in Stanford CS106A(3)

    1.If ( str1==str2 ) means if str1 and str2 are refers to the same OBJECT. But when compare string , ...

  9. linux下安装jdk 详细步骤(一条命令即可安装)

    转载:https://blog.csdn.net/luochangchen/article/details/72804426 作为Java开发人员,在Linux下安装一些开发工具是必备技能,本文以安装 ...

  10. 安装mingw编译器

    1.下载地址:https://sourceforge.net/projects/mingw/files/latest/download?source=top3_dlp_t5 2. 安装下载的(ming ...