centos7 安装 mariadb 的正确命令

mariaDB简单安装与操作 mysql被oracle收购之后也难逃收费和各种使用场景的限制。为了提前防范这里介绍一种开源的mysql分支版本的开源社区维护采用GPL授权许可完全兼容MySQL的API和命令行的替代方案--mariaDB。 官网地址:mariaDB官网地址 注意:本操作是在centos8上完成,其它操作系统可能操作稍微有所不同。 操作 centos8默认安装了mariaDB的客户端只需要安装mariaDB-server就可以 //通过yum查询mariaDB可用版本 root@node1 /]# yum l 阅读详情

使用的是linode的centos7系统,安装mysql发现已经默认的是mariadb。

但是不管是使用linode官网说明还是百度搜索到的的根本安装方法无法安装成功。

总是提示这一句:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)



最后通过google 搜索 install mariadb on centos 7得到了安装的关键一步。

现在安装成功,特此备注一下整个安装过程:

mysql:[root@localhost ~]# yum -y install mariadb*
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.linode.com
 * extras: mirrors.linode.com
 * updates: mirrors.linode.com
Resolving Dependencies
--> Running transaction check
---> Package mariadb.x86_64 1:5.5.37-1.el7_0 will be installed
---> Package mariadb-bench.x86_64 1:5.5.37-1.el7_0 will be installed
---> Package mariadb-devel.x86_64 1:5.5.37-1.el7_0 will be installed
---> Package mariadb-embedded.x86_64 1:5.5.37-1.el7_0 will be installed
---> Package mariadb-embedded-devel.x86_64 1:5.5.37-1.el7_0 will be installed
---> Package mariadb-libs.x86_64 1:5.5.37-1.el7_0 will be installed
---> Package mariadb-server.x86_64 1:5.5.37-1.el7_0 will be installed
--> Processing Dependency: perl-DBD-MySQL for package: 1:mariadb-server-5.5.37-1.el7_0.x86_64
---> Package mariadb-test.x86_64 1:5.5.37-1.el7_0 will be installed
--> Running transaction check
---> Package perl-DBD-MySQL.x86_64 0:4.023-5.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==========================================================================================================
 Package                           Arch              Version                     Repository          Size
==========================================================================================================
Installing:
 mariadb                           x86_64            1:5.5.37-1.el7_0            updates            8.9 M
 mariadb-bench                     x86_64            1:5.5.37-1.el7_0            updates            385 k
 mariadb-devel                     x86_64            1:5.5.37-1.el7_0            updates            744 k
 mariadb-embedded                  x86_64            1:5.5.37-1.el7_0            updates            3.6 M
 mariadb-embedded-devel            x86_64            1:5.5.37-1.el7_0            updates            7.4 M
 mariadb-libs                      x86_64            1:5.5.37-1.el7_0            updates            752 k
 mariadb-server                    x86_64            1:5.5.37-1.el7_0            updates             11 M
 mariadb-test                      x86_64            1:5.5.37-1.el7_0            updates            7.9 M
Installing for dependencies:
 perl-DBD-MySQL                    x86_64            4.023-5.el7                 base               140 k

Transaction Summary
==========================================================================================================
Install  8 Packages (+1 Dependent package)

Total download size: 40 M
Installed size: 279 M
Downloading packages:
(1/9): mariadb-bench-5.5.37-1.el7_0.x86_64.rpm                                     | 385 kB  00:00:00
(2/9): mariadb-devel-5.5.37-1.el7_0.x86_64.rpm                                     | 744 kB  00:00:00
(3/9): mariadb-embedded-5.5.37-1.el7_0.x86_64.rpm                                  | 3.6 MB  00:00:00
(4/9): mariadb-5.5.37-1.el7_0.x86_64.rpm                                           | 8.9 MB  00:00:00
(5/9): mariadb-libs-5.5.37-1.el7_0.x86_64.rpm                                      | 752 kB  00:00:00
(6/9): mariadb-server-5.5.37-1.el7_0.x86_64.rpm                                    |  11 MB  00:00:00
(7/9): mariadb-embedded-devel-5.5.37-1.el7_0.x86_64.rpm                            | 7.4 MB  00:00:00
(8/9): mariadb-test-5.5.37-1.el7_0.x86_64.rpm                                      | 7.9 MB  00:00:00
(9/9): perl-DBD-MySQL-4.023-5.el7.x86_64.rpm                                       | 140 kB  00:00:00
----------------------------------------------------------------------------------------------------------
Total                                                                      36 MB/s |  40 MB  00:00:01
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : 1:mariadb-libs-5.5.37-1.el7_0.x86_64                                                   1/9
  Installing : 1:mariadb-5.5.37-1.el7_0.x86_64                                                        2/9
  Installing : perl-DBD-MySQL-4.023-5.el7.x86_64                                                      3/9
  Installing : 1:mariadb-server-5.5.37-1.el7_0.x86_64                                                 4/9
  Installing : 1:mariadb-devel-5.5.37-1.el7_0.x86_64                                                  5/9
  Installing : 1:mariadb-embedded-5.5.37-1.el7_0.x86_64                                               6/9
  Installing : 1:mariadb-embedded-devel-5.5.37-1.el7_0.x86_64                                         7/9
  Installing : 1:mariadb-test-5.5.37-1.el7_0.x86_64                                                   8/9
  Installing : 1:mariadb-bench-5.5.37-1.el7_0.x86_64                                                  9/9
  Verifying  : 1:mariadb-test-5.5.37-1.el7_0.x86_64                                                   1/9
  Verifying  : 1:mariadb-embedded-devel-5.5.37-1.el7_0.x86_64                                         2/9
  Verifying  : 1:mariadb-embedded-5.5.37-1.el7_0.x86_64                                               3/9
  Verifying  : 1:mariadb-libs-5.5.37-1.el7_0.x86_64                                                   4/9
  Verifying  : 1:mariadb-bench-5.5.37-1.el7_0.x86_64                                                  5/9
  Verifying  : 1:mariadb-5.5.37-1.el7_0.x86_64                                                        6/9
  Verifying  : 1:mariadb-server-5.5.37-1.el7_0.x86_64                                                 7/9
  Verifying  : perl-DBD-MySQL-4.023-5.el7.x86_64                                                      8/9
  Verifying  : 1:mariadb-devel-5.5.37-1.el7_0.x86_64                                                  9/9

Installed:
  mariadb.x86_64 1:5.5.37-1.el7_0                        mariadb-bench.x86_64 1:5.5.37-1.el7_0
  mariadb-devel.x86_64 1:5.5.37-1.el7_0                  mariadb-embedded.x86_64 1:5.5.37-1.el7_0
  mariadb-embedded-devel.x86_64 1:5.5.37-1.el7_0         mariadb-libs.x86_64 1:5.5.37-1.el7_0
  mariadb-server.x86_64 1:5.5.37-1.el7_0                 mariadb-test.x86_64 1:5.5.37-1.el7_0

Dependency Installed:
  perl-DBD-MySQL.x86_64 0:4.023-5.el7

Complete!
[root@localhost ~]# systemctl start mariadb.service
[root@localhost ~]# systemctl enable mariadb.service
ln -s '/usr/lib/systemd/system/mariadb.service' '/etc/systemd/system/multi-user.target.wants/mariadb.servi                     
ce'
[root@localhost ~]# mysql
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 2
Server version: 5.5.37-MariaDB MariaDB Server

Copyright (c) 2000, 2014, Oracle, Monty Program Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> logout
    -> exit
    ->
    -> ;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaD                     
B server version for the right syntax to use near 'logout
exit' at line 1
MariaDB [(none)]> exit
Bye
[root@localhost ~]# systemctl enable mariadb.service
[root@localhost ~]# mysql
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 5.5.37-MariaDB MariaDB Server

Copyright (c) 2000, 2014, Oracle, Monty Program Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| test               |
+--------------------+
4 rows in set (0.00 sec)

MariaDB [(none)]> use test
Database changed
MariaDB [test]> show tables;
Empty set (0.00 sec)

MariaDB [test]> exit
Bye
[root@localhost ~]# mysql_secure_installation
/usr/bin/mysql_secure_installation: line 379: find_mysql_client: command not found

NOTE: 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 current
password for the root user.  If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
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 MariaDB
root user without the proper authorisation.

Set root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
 ... Success!


By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] y
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures 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 can
access.  This is also intended only for testing, and should be removed
before 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 far
will 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 MariaDB
installation should now be secure.

Thanks for using MariaDB!
[root@localhost ~]# mysql -uroot -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 15
Server version: 5.5.37-MariaDB MariaDB Server

Copyright (c) 2000, 2014, Oracle, Monty Program Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| zbphp.com 		 |
+--------------------+
4 rows in set (0.00 sec)

MariaDB [(none)]>

文章 by default7#zbphp.com



========================2014-12-17 00:24 补充=================

最新正确的安装命令在:http://blog.youkuaiyun.com/default7/article/details/41973887


微信小程序-如何根据缩放屏幕大小自适应icon图标更改marker 微信小程序如何根据用户的缩放屏幕来改变marker图标icon的大小,实现icon自适应屏幕缩放的效果 阅读详情

相关推荐

基于Zemax的干涉仪仿真——Fizeau球面干涉仪

最近在用Zemax仿真干涉仪,在这之前查资料都是关于一些平面干涉仪的仿真,很少有关于Fizeau型的,尤其是球面干涉仪的仿真,看到很多关于这方面的问题回复都说利用多重结构仿照Zemax马赫-泽德干涉仪去做,但是也没有具体的过程,因此在这里分享一下我仿真的干涉仪步骤方法,具体是利用多重结构完成的仿真。

weixin_46657737的博客 6407

开源推荐:MariaDB4j —— 轻松集成数据库的利器

在众多的开源库中,MariaDB4j 犹如一颗璀璨的明珠,它提供了从 Java 启动 MariaDB 数据库的能力,而无需任何外部依赖或安装过程。这不仅极大简化了开发者的操作流程,也极大地增强了应用的灵活性和可移植性。 MariaDB4j 是一个创新性的 Java “启动器” 库,允许开发者无需系统级的 MariaDB 安装即可在其应用程序中使用 MariaDB(以及兼容的 MySQL)。自20...

gitblog_00039的博客 550

[特殊字符] 智能补货(AI-driven Replenishment)完整实施方案

补货量=预测需求+安全库存−当前库存补货量 = 预测需求 + 安全库存 - 当前库存补货量=预测需求+安全库存−当前库存。:基于 LSTM/Transformer 预测未来 30/60/90 天的销量。

nbsaas-boot基于Request-Response的企业级快速开发框架 967

CentOS 7 部署 MariaDB 的 2 种方法

有两种安装 MariaDB 服务器的方法。您可以安装 CentOS 7 存储库中可用的默认版本,也可以通过手动添加 MariaDB 存储库来安装最新版本。

justlpf的专栏 4179

深度伪造检测实战:轻量级频域特征 pipeline 部署指南

深度伪造检测(deepfake detection)是多媒体内容安全的核心技术,其本质是通过建模生成式篡改在像素与频域留下的微弱异常痕迹。传统端到端大模型虽在标准数据集上表现优异,却因训练域与真实场景失配、计算开销高、缺乏可解释性而难以落地。本文聚焦于工程可复现的实践路径,提出‘人脸定位→频域伪造特征提取(Xception-FCN + Frequency-Aware Masking)→轻量分类决策’三段式解耦架构,兼顾精度、延迟与可解释性。该方案已在边缘设备(Jetson Orin NX)实现单帧<48ms

weixin_33437929的博客 304

从Low Byte解析DTC故障类型:系统开发中的诊断精细化实践

本文深入解析DTC故障诊断中Low Byte的关键作用,详细介绍了其在系统开发中的精细化应用实践。通过分析Low Byte的编码规则和故障分类设计,帮助开发者优化诊断数据库和解码方案,提升汽车电子系统的故障诊断效率和准确性。

weixin_28312391的博客 263

探索MariaDB4j:轻量级、可移植的数据库解决方案

是一个独特且创新的Java库,它允许你在任何Java应用程序中直接运行MariaDB数据库,无需安装或管理服务器。这个项目旨在简化开发过程,使得在内存数据库测试和嵌入式应用中的数据存储变得更加便捷。 ## 项目简介 MariaDB4j提供了完全的MariaDB功能,包括SQL支持,与标准MariaDB服务器兼容的连接协议,以及所有相关的JDBC驱动程序。由于它是基于Java实现的,所以可以无缝...

gitblog_00064的博客 771

国内用户稳定开通ChatGPT Plus会员的完整实操指南

ChatGPT作为当前最先进的AI对话模型,其技术原理基于Transformer架构和大规模语言预训练。通过深度学习技术,ChatGPT能够理解自然语言并生成高质量回复,在代码生成、文档分析等场景具有重要技术价值。对于需要高频使用的开发者而言,ChatGPT Plus会员提供了优先访问权和GPT-4模型支持等核心功能。在实际应用场景中,国内用户常面临支付限制和区域封锁等挑战。本文针对这些痛点,重点解析如何通过可靠的支付渠道和账号安全策略,实现稳定的会员开通方案,帮助用户突破技术使用壁垒,充分发挥AI助手在开

weixin_29042035的博客 952

yum方式安装Mariadb多主集群安装和配置-centos9stream-mariadb10.5.16(实战建议配置)

mariadb是mysql的另外一个选择了,具体就不再介绍,这里主要介绍主主集群的配置方式,大家要注意,尽管为主主集群,

zrc_xiaoguo的博客 2770

新手避坑指南:HT7036计量芯片SPI读取电压的完整流程(从复位到校准)

本文详细介绍了HT7036计量芯片的SPI读取电压完整流程,从硬件准备到校准设置,重点解析了复位引脚处理、SPI通信配置、芯片初始化及数据处理等关键步骤。针对常见问题如晶振焊接、SPI时序错误等提供实用解决方案,帮助开发者高效完成电压测量与校准。

weixin_30070339的博客 326

2026年软件测试职业院校技能大赛—ERP管理平台-采购入库模块Bug定位与查找

竞赛对接软件测试相关标准,以“ERP管理平台” 为被测系统,围绕软件测试领域的主流技术及工具,考查选手面 对实际问题的综合分析能力,对测试文档、测试用例的设计能力, 对单元测试、自动化测试、性能测试、接口测试等测试工具及方 法的掌握程度,检验选手团队协作能力、组织规划能力、方法运用能力等。

我是网络安全兼技能大赛工程师,专注网络安全技术学习与技能大赛实战!持续分享最新的技术文章,帮你少走弯路,一起在技术赛道上进步~ 194

centos7 mariadb mysql_centos7 安装 mariadb 的正确命令

使用的是linode的centos7系统,安装mysql发现已经默认的是mariadb。但是不管是使用linode官网说明还是百度搜索到的的根本安装方法无法安装成功。总是提示这一句:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)最后通过goo...

weixin_29323365的博客 337

Claude Code Skills 入门:内置技能与自定义技能开发

│ Skill 的特点 │1. 封装性:把复杂操作封装成简单命令2. 可复用:一次定义,随处使用3. 可定制:支持参数传入4. 可发现:通过 /skill-name 方式调用打个比方,如果说 Claude Code 的基础工具是「原材料」,那 Skills 就是「预制菜」——只需要简单加热(调用),就能得到成品(结果)。你可以创建自己的 Skill 来封装常用操作。Skill 支持参数,通过。

gaoxiang_120的专栏 670

centos 7安装mysql5.5和安装 mariadb 的正确命令

以前的Linux系统中数据库大部分是mysql,不过自从被sun收购之后,就没用集成在centos这些开源Linux系统中了,那么如果想用的话就需要自己安装了,首先centos7 已经不支持mysql,因为收费了你懂得,所以内部集成了mariadb,而安装mysql的话会和mariadb的文件冲突,所以需要先卸载掉mariadb,以下为卸载mariadb,安装mysql的步骤。 #列

qilongpingchuan的专栏 3316

文档:亲测可用解决vnc灰屏,黑屏,鼠标大黑叉情况

主要解决vnc-viewer灰屏,黑屏,鼠标大黑叉等现象,详细见文档。

温度PID控制PLC程序

温度PID稳定控制程序,适用于欧姆龙PLC,对其他PLC也具有很大参考价值

centos7 安装 mariadb(mysq的一种) 的正确命令

centos7系统,安装MySQL发现默认的是mariadb。百度搜索到的的根本安装方法无法安装成功。总是提示这一句:ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)1、使用rpm -qa | grep mariadb搜索 MariaDB 现有的

境界の彼方 414

LinePhone3.2.7(android端最新版本) sip客户端

SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/

centos 7.0 如何安装php环境 centos7安装mariadb的正确命令

http://www.cnblogs.com/apro-abra/p/4862285.html 安装sql http://www.it165.net/os/html/201409/9234.html  install mariadb on centos 7 如何搭建lamp(CentOS7+Apache+MySQL+PHP)环境 在网上搜资料,自己在

qq906786621的专栏 575

蓝牙模块HM-10手册

蓝牙模块HM-10手册,该手册对蓝牙模块HM-10进行了详细的介绍和使用方法以及一些AT指令。

centos安装mysql5.5_centos 7安装mysql5.5和安装 mariadb 的正确命令

腾讯Tencentos系统20150428 官方最新版类型:手机工具大小:120.6M语言:中文 评分:10.0标签:立即下载以前的Linux系统中数据库大部分是mysql,不过自从被sun收购之后,就没用集成在centos这些开源Linux系统中了,那么如果想用的话就需要自己安装了,首先centos7 已经不支持mysql,因为收费了你懂得,所以内部集成了mariadb,而安装mysql的话会和...

weixin_32246721的博客 257

centos7 安装 mariadb(mysql的一个分支) 的正确命令

今天在centos上安装mysql, 各种不对。。。 首先是这样的,[root@VM_177_92_centos ~]# yum install mysql 已加载插件:fastestmirror, langpacks Loading mirror speeds from cached hostfile 正在解决依赖关系 --> 正在检查事务 ---> 软件包 mariadb.x86_64.1.5

果汁华的博客 525

mariadb mysql.sock_CentOS通过yum安装MariaDB(MySQL)无法启动服务或者找不到mysql.sock

转载自:http://www.linuxidc.com/Linux/2016-03/129396.htm今天在Linux主机(CentOS7)安装(yum install方式)Mariadb(即开源MySQL)后,无法启动mariadb,其实是安装不完整,当然启动不了,更不用说输入"mysql -u root"提示Can‘t connect to local MySQL server throu...

weixin_39947521的博客 236

mariadb 没有mysql_centos – mariadb-server安装后没有mysqld或mysql.server

所以…很可能我是个白痴,但我被困住了.我刚刚在Digial Ocean上设置了CentOS 7,我似乎无法运行MariaDB /MySQL服务器.一些输出[[emailprotected] ~]# yum list installed |grep mariamariadb.x86_64 1:5.5.37-1.el7_0 ...

weixin_31256683的博客 228

CentOS7安装后配置MariaDB

安装后,优先推荐先对安全设置进行配置,键入命令 sudo mysql_secure_installation 键入当前密码,当前没有,直接回车,之后跟随提示会问几个问题:设置 root 密码? / 移除匿名用户? / 禁止远程登录? / 移除 test 数据库? / 重新载入权限表? 一路下来,直到显示 "Thanks for using MariaDB"安全部分设...

dianyoulian8756的博客 189

别再搞混了!详解 CentOS 7 下 yum 安装 MySQL 5.7 与 MariaDB 的那些坑

本文详细解析了在CentOS 7系统下使用yum安装MySQL 5.7时可能遇到的常见问题,特别是与MariaDB的混淆问题。通过配置MySQL官方yum仓库、禁用MariaDB、正确安装MySQL 5.7以及解决常见问题,帮助用户避开安装过程中的各种坑。文章还提供了生产环境优化建议和性能监控方法,确保MySQL数据库的稳定运行。

weixin_30897233的博客 379

CentOS 7 安装mariadb

新手,以前完全没玩过,走了很多弯路,感觉有必要做个笔记备忘 开发互联网项目首先想到的数据库一般就会是mysql,以及他的衍生数据库,包括很多有经验的朋友也会给你推荐使用mysql (以下内容中部分图片来自网友提供,感谢无私奉献的朋友们!) 坑一:CentOS 7不能再用开源的MySql了,应该安装Mariadb 解决办法: 一顿操作猛如虎,发现我是250,买了个华为云服务器(CentOS 7),直接下载mysql包,解压,安装,按照网上的帖子一步步操作,直到最后卸载了mysql,因...

xueren_83的博客 1万+
上一篇: 腾讯QQ疑泄露用户身份证姓名!!(QQ推荐备注)
下一篇: centos7 配置 vsftpd 多主机多用户登录FTP的方法
评论 4
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值