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-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的更多相关文章
- 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 ...
- CENTOS 7 install mariadb 10.3
CENTOS install mariadb 10.3 cat >/etc/yum.repos.d/MariaDB.repo << 'EOF' [mariadb] name = Ma ...
- 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 ...
- [转]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 ...
- 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 ...
- 从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 ...
- Ubuntu 18 Kubernetes集群的安装和部署 以及Helm的安装
首先说一下我的环境, 我是在windows 10 上面建了一个ubuntu18的虚拟机,同时由于某些原因 不受网络限制, 所以安装比较顺利. Install 1.安装并启用 Docker sudo ...
- Ubuntu 18.04 Server 配置静态ip
刚在虚拟机里面状态了一个 Ubunut 18.04 Server 作为我的服务器,我习惯使用静态ip首先再virtualbox中设置虚拟机网络的连接方式为桥接模式进入ubuntu虚拟机根据我的印象直接 ...
- Ubuntu 18.04 安装、配置和美化
本文章修改自inkss的博文 为什么要修改原文? 本来我是想自己写这么一篇的,但是没想到在百度一搜,居然一篇好文.我之前没看到,真是可惜. 这篇文章主要是帮助我记录一些东西,如题. 原文虽然不错,但是 ...
随机推荐
- 小白的首个maven web项目Step1软件安装一(jdk的下载配置和eclipse的安装)
因为电脑太卡加了一个固态硬盘导致系统重装, 把之前的C盘和D盘合并成一个盘,这下之前下的杂七杂八的软件应该差不多都清干净了. 申请这个博客是想记录最近写项目学习的一些事,系统重装之后,发现自己都已经忘 ...
- Oracle提取中文字符串拼音首字母函数
通过oracle的NLSSORT函数对汉字按照拼音排序,然后根据汉字的区间返回对应的首字母. 效果1,获取拼音简码: 效果2,获取姓名首字母: 创建函数: /* 获取拼音简码函数 */ CREATE ...
- webpack 大概
entry output loader: rules: [ {test:匹配文件格式, use: 使用的loader}, {test:匹配文件格式, use: 使用的loader}, ...//l ...
- spring jpa 语法
摘自http://www.cnblogs.com/BenWong/p/3890012.html Table 2.3. Supported keywords inside method names Ke ...
- CPU-bound(计算密集型) 和I/O bound(I/O密集型) 区别 与应用
I/O密集型 (CPU-bound) I/O bound 指的是系统的CPU效能相对硬盘/内存的效能要好很多,此时,系统运作,大部分的状况是 CPU 在等 I/O (硬盘/内存) 的读/写,此时 CP ...
- angular4 富文本编辑器
使用quill富文本编辑器实现,angular项目中用到了ngx-quill插件. quill的GitHub地址:https://github.com/quilljs/quill ngx-quill的 ...
- Java语法基础学习DayTwentyOne(网络编程)
一.IP地址和端口号 1.作用 通过IP地址,唯一的定位互联网上一台主机. 端口号标识正在计算机上运行的进程,不同进程有不同的端口号,被规定为一个16位的整数0~65535,其中0~1023被预先定义 ...
- div css 图片和文字上下居中对齐
想要图片和文字水平居中对齐很容易,可今天做这个树的时候,遇到了要将图片上下居中.这下就不知道怎么搞. 拿手册看也看不出所以然来,不同的浏览器对DIV的支持不一个,目前最好的浏览器是Firefox. 这 ...
- Linux常用命令之Yum
Linux Yum命令详解Yum全称Yellow dog Updater,Modified,是一个在Fedora和RedHat以及SUSE中提供的基于RPM包的软件包管理工具,能够从指定的服务器自动下 ...
- C# array与arraylist区别及获取sql字段名
array与arraylist的区别: 1. Array 的容量是固定的,而 ArrayList 的容量是根据需要自动扩展的.如果更改了 ArrayList.Capacity 属性的值,则自动进行内 ...