码迷,mamicode.com
首页 > 数据库 > 详细

install MariaDB 10.2 on Ubuntu 18

时间:2018-10-21 10:15:07      阅读:229      评论:0      收藏:0      [点我收藏+]

标签:use   status   apt-get   repos   mct   counter   system   amp   ppc   

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>
and then reset root user of mariadb‘s password  refer to this
+-----------+------+-------------------------------------------+
| host      | user | password                                  |
+-----------+------+-------------------------------------------+
| localhost | root | *C61A1C944BC7AXXXXXXXXXXXXXX4B81A462D9CB3 |
| 127.0.0.1 | root | *C61A1C944BC7A3XXXXXXXXXXXXX4B81A462D9CB3 |
| ::1       | root | *C61A1C944BC7A3XXXXXXXXXXXXX4B81A462D9CB3 |
| %         | root | *81F5E21E35407DXXXXXXXXXXXXXEBFB6AF209E1B |   wrong password made me facing 1045 error
+-----------+------+-------------------------------------------+

restar the db service
service mysql restart

 

then connect to the db via Navicat or mariadb CLI command

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

 

 

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

标签:use   status   apt-get   repos   mct   counter   system   amp   ppc   

原文地址:https://www.cnblogs.com/guoapeng/p/9823844.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!