iis服务器助手广告广告
返回顶部
首页 > 资讯 > 精选 >Ubuntu下怎么安装配置MariaDB
  • 785
分享到

Ubuntu下怎么安装配置MariaDB

2023-06-28 01:06:38 785人浏览 独家记忆
摘要

本篇内容主要讲解“ubuntu下怎么安装配置MariaDB”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“Ubuntu下怎么安装配置MariaDB”吧!MariaDB数据库管理系统是 MySQL

本篇内容主要讲解“ubuntu下怎么安装配置MariaDB”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“Ubuntu下怎么安装配置MariaDB”吧!

MariaDB数据库管理系统是 MySQL 的一个分支,主要由开源社区在维护,采用GPL授权许可 MariaDB的目的是完全兼容Mysql,包括api和命令行,使之能轻松成为mysql的代替品。

Ubuntu下怎么安装配置MariaDB

安装MariaDB

wuxiangping@linuxcool:~$ sudo apt updatewuxiangping@linuxcool:~$ sudo apt install mariadb-server

安装完成后,MariaDB服务将自动启动。

验证数据库服务器运行状态

wuxiangping@linuxcool:~$ sudo systemctl status mariadb.service
Ubuntu下怎么安装配置MariaDB

查看数据库版本号

wuxiangping@linuxcool:~$ mysql --versionmysql  Ver 15.1 Distrib 10.1.44-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
Ubuntu下怎么安装配置MariaDB

MariaDB安全配置,初始化数据

MariaDB服务器软件包自带一个名为mysql_secure_installation的脚本,可以轻松提高数据库服务器的安全性。

wuxiangping@linuxcool:~$ sudo mysql_secure_installationNOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB     SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!In order to log into MariaDB to secure it, we'll need the currentpassWord for the root user.  If you've just installed MariaDB, andyou haven't set the root password yet, the password will be blank,so you should just press enter here.Enter current password for root (enter for none):OK, successfully used password, moving on...Setting the root password ensures that nobody can log into the MariaDBroot user without the proper authorisation.You already have a root password set, so you can safely answer 'n'.Change the root password? [Y/n] yNew password:Re-enter new password:Password updated successfully!Reloading privilege tables..... Success!By default, a MariaDB installation has an anonymous user, allowing anyoneto log into MariaDB without having to have a user account created forthem.  This is intended only for testing, and to make the installationGo a bit smoother.  You should remove them before moving into aproduction environment.Remove anonymous users? [Y/n] y... Success!NORMally, root should only be allowed to connect from 'localhost'.  Thisensures that someone cannot guess at the root password from the network.Disallow root login remotely? [Y/n] y... Success!By default, MariaDB comes with a database named 'test' that anyone canaccess.  This is also intended only for testing, and should be removedbefore moving into a production environment.Remove test database and access to it? [Y/n] y- Dropping test database...... Success!- Removing privileges on test database...... Success!Reloading the privilege tables will ensure that all changes made so farwill take effect immediately.Reload privilege tables now? [Y/n] y... Success!Cleaning up...All done!  If you've completed all of the above steps, your MariaDBinstallation should now be secure.Thanks for using MariaDB!
Ubuntu下怎么安装配置MariaDB

本地root用户登录

shell与MariaDB交互操作,运行时会提示输入系统用户名的密码

wuxiangping@linuxcool:~$ sudo mysql[sudo] wuxiangping 的密码:Welcome to the MariaDB monitor.  Commands end with ; or \g.Your MariaDB connection id is 49Server version: 10.1.44-MariaDB-0ubuntu0.18.04.1 Ubuntu 18.04Copyright (c) 2000, 2018, oracle, MariaDB Corporation Ab and others.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.MariaDB [(none)]>

授权MariaDB指定主机远程访问

默认监听端口是127.0.0.1,需要修改为主机IP

wuxiangping@linuxcool:~$ sudo vim /etc/mysql/mariadb.conf.d/50-server.cnfbind-address=192.168.3.22
Ubuntu下怎么安装配置MariaDB

MariaDB [(none)]> use mysql;Reading table information for completion of table and column namesYou can turn off this feature to get a quicker startup with -ADatabase changedMariaDB [mysql]> GRANT ALL PRIVILEGES ON *.* TO 'root'@'192.168.3.8' IDENTIFIED BY 'password' WITH GRANT OPTION;Query OK, 0 rows affected (0.00 sec)MariaDB [mysql]> flush privileges;Query OK, 0 rows affected (0.00 sec)MariaDB [mysql]> select host, user from user;
Ubuntu下怎么安装配置MariaDB

重启mariadb服务

wuxiangping@linuxcool:~$ sudo systemctl restart mariadb.service

远程主机连接测试

Ubuntu下怎么安装配置MariaDB

Ubuntu下怎么安装配置MariaDB

到此,相信大家对“Ubuntu下怎么安装配置MariaDB”有了更深的了解,不妨来实际操作一番吧!这里是编程网网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!

--结束END--

本文标题: Ubuntu下怎么安装配置MariaDB

本文链接: https://www.lsjlt.com/news/315233.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • Ubuntu下怎么安装配置MariaDB
    本篇内容主要讲解“Ubuntu下怎么安装配置MariaDB”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“Ubuntu下怎么安装配置MariaDB”吧!MariaDB数据库管理系统是 MySQL ...
    99+
    2023-06-28
  • MariaDB怎么安装与配置
    本篇内容介绍了“MariaDB怎么安装与配置”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!MariaDB的安装与配置MariaDB是MySQ...
    99+
    2023-07-02
  • 安装配置mariadb
    记录下安装配置mariadb的经历。 环境:ubuntu22 一、apt在线安装 apt代理配置  APT是Ubuntu系统中用于安装和升级软件包的工具,如果本地没有可用的软件包,APT将会连接到远程软件包服务器下载软件包。在某些情况下,用...
    99+
    2023-10-09
    mariadb 数据库
  • ubuntu下CLion怎么安装配置ROS
    这篇文章主要介绍“ubuntu下CLion怎么安装配置ROS”的相关知识,小编通过实际案例向大家展示操作过程,操作方法简单快捷,实用性强,希望这篇“ubuntu下CLion怎么安装配置ROS”文章能帮助大家解决问题。一 下载安装激活clio...
    99+
    2023-07-04
  • ubuntu下mysql 8.0.28怎么安装配置
    这篇文章主要介绍“ubuntu下mysql 8.0.28怎么安装配置”的相关知识,小编通过实际案例向大家展示操作过程,操作方法简单快捷,实用性强,希望这篇“ubuntu下mysql 8.0.28怎么安装配置”文章能帮助大...
    99+
    2023-06-30
  • Ubuntu中怎么安装MariaDB
    Ubuntu中怎么安装MariaDB,很多新手对此不是很清楚,为了帮助大家解决这个难题,下面小编将为大家详细讲解,有这方面需求的人可以来学习下,希望你能有所收获。安装MariaDBwuxiangping@linuxcool:~$ ...
    99+
    2023-06-05
  • Ubuntu下怎么安装配置SSH服务
    本文小编为大家详细介绍“Ubuntu下怎么安装配置SSH服务”,内容详细,步骤清晰,细节处理妥当,希望这篇“Ubuntu下怎么安装配置SSH服务”文章能帮助大家解决疑惑,下面跟着小编的思路慢慢深入,一起来学习新知识吧。安装ssh工具1.打开...
    99+
    2023-07-04
  • Linux怎么安装配置MariaDB数据库
    本篇内容介绍了“Linux怎么安装配置MariaDB数据库”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!  MariaDB是采用Maria存...
    99+
    2023-06-13
  • Ubuntu下MySQL怎么安装与配置文件
    本篇内容主要讲解“Ubuntu下MySQL怎么安装与配置文件”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“Ubuntu下MySQL怎么安装与配置文件”吧!Ubuntu MySQL系统的特性,并结...
    99+
    2023-06-16
  • 怎么在CentOS7.37上安装和安全配置MariaDB
    这篇文章主要介绍“怎么在CentOS7.37上安装和安全配置MariaDB ”,在日常操作中,相信很多人在怎么在CentOS7.37上安装和安全配置MariaDB 问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答...
    99+
    2023-06-16
  • ubuntu下如何安装配置AndroidStudio4
    本篇内容主要讲解“ubuntu下如何安装配置AndroidStudio4”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“ubuntu下如何安装配置AndroidStudio4”吧!1.下载安装的压...
    99+
    2023-07-04
  • Ubuntu下怎么安装和配置FTP服务器
    这篇“Ubuntu下怎么安装和配置FTP服务器”文章的知识点大部分人都不太理解,所以小编给大家总结了以下内容,内容详细,步骤清晰,具有一定的借鉴价值,希望大家阅读完这篇文章能有所收获,下面我们一起来看看这篇“Ubuntu下怎么安装和配置FT...
    99+
    2023-06-28
  • ubuntu安装eclipse怎么配置
    1. 下载eclipse安装包并解压缩到指定目录;2. 安装JDK,并配置环境变量;3. 打开eclipse,在“Window”菜单...
    99+
    2023-06-03
    ubuntu安装eclipse ubuntu eclipse
  • Ubuntu怎么安装配置Memcached
    本篇内容介绍了“Ubuntu怎么安装配置Memcached”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!Memcached 是一个高性能的分...
    99+
    2023-06-27
  • Linux中怎么安装配置MariaDB数据库
    这期内容当中小编将会给大家带来有关Linux中怎么安装配置MariaDB数据库,文章内容丰富且以专业的角度为大家分析和叙述,阅读完这篇文章希望大家可以有所收获。准备篇:一、配置好IP、DNS 、网关,确保使用远程连接工具能够连接服务器,服务...
    99+
    2023-06-13
  • Ubuntu下安装和配置JDK7教程
    这篇文章主要介绍“Ubuntu下安装和配置JDK7教程”,在日常操作中,相信很多人在Ubuntu下安装和配置JDK7教程问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”Ubuntu下安装和配置JDK7教程”的疑...
    99+
    2023-06-13
  • ubuntu中怎么安装配置MYSQL
    今天就跟大家聊聊有关ubuntu中怎么安装配置MYSQL,可能很多人都不太了解,为了让大家更加了解,小编给大家总结了以下内容,希望大家根据这篇文章可以有所收获。配置MySQL注意,MySQL缺省是只允许本地...
    99+
    2024-04-02
  • CentOS7下怎么快速配置MariaDB
    本篇内容主要讲解“CentOS7下怎么快速配置MariaDB”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“CentOS7下怎么快速配置MariaDB”吧!MariaDB数据库管理系统是 MySQ...
    99+
    2023-06-27
  • Ubuntu上如何安装MariaDB
    今天小编给大家分享一下Ubuntu上如何安装MariaDB的相关知识点,内容详细,逻辑清晰,相信大部分人都还太了解这方面的知识,所以分享这篇文章给大家参考一下,希望大家阅读完这篇文章后有所收获,下面我们一起来了解一下吧。一、前提条件你需要拥...
    99+
    2023-07-04
  • ubuntu安装miniconda后怎么配置
    安装miniconda后,可以按照以下步骤进行配置: 打开终端,输入以下命令来激活miniconda环境: source ~/m...
    99+
    2024-03-02
    ubuntu
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作