1、安装MariaDB
安装命令
yum -y install mariadb mariadb-server
-- 仅下载
yum -y install mariadb mariadb-server --downloadonly --downloaddir=/down
-- 手动安装
rpm -Uvih *.rpm
安装完成MariaDB,首先启动MariaDB
systemctl start mariadb
设置开机启动
systemctl enable mariadb
初次运行,直接回车
mysql -uroot -p
设置密码为 ‘123’
use mysql;
update user set password=password("123")where user='root';
flush privileges;
quit;
退出进入重新进入;
mysql -uroot -p
mysql开放远程连接权限
-- 开放远程登录权限
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION;
-- 刷新权限
FLUSH PRIVILEGES;
2.端口开放
2.1安装netstat工具
yum install net-tools
2.2防火墙操作
firewall-cmd --zone=public --add-port=80/tcp --permanent (--permanent永久生效,没有此参数重启后失效)
service firewalld restart
3、配置MariaDB的字符集
文件/etc/my.cnf
vi /etc/my.cnf
在[mysqld]标签下添加
init_connect='SET collation_connection = utf8_unicode_ci'
init_connect='SET NAMES utf8'
character-set-server=utf8
collation-server=utf8_unicode_ci
skip-character-set-client-handshake
文件/etc/my.cnf.d/client.cnf
vi /etc/my.cnf.d/client.cnf
在[client]中添加
default-character-set=utf8
文件/etc/my.cnf.d/mysql-clients.cnf
vi /etc/my.cnf.d/mysql-clients.cnf
在[mysql]中添加
default-character-set=utf8
全部配置完成,重启mariadb
systemctl restart mariadb
之后进入MariaDB查看字符集
mysql> show variables like "%character%";show variables like "%collation%";
显示为
+--------------------------+----------------------------+
| Variable_name | Value |
+--------------------------+----------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
8 rows in set (0.00 sec)
+----------------------+-----------------+
| Variable_name | Value |
+----------------------+-----------------+
| collation_connection | utf8_unicode_ci |
| collation_database | utf8_unicode_ci |
| collation_server | utf8_unicode_ci |
+----------------------+-----------------+
3 rows in set (0.00 sec)
字符集配置完成。
4、添加用户,设置权限
创建用户命令
mysql>create user root@localhost identified by '123';
直接创建用户并授权的命令
mysql>grant all on *.* to root@localhost indentified by '123';
授予外网登陆权限
mysql>grant all privileges on *.* to root@'%' identified by '123';
授予权限并且可以授权
mysql>grant all privileges on *.* to root@'hostname' identified by 'password' with grant option;
简单的用户和权限配置基本就这样了。
grant all privileges on *.* to 'root'@'%' with grant option;
相关推荐
WSL2离线安装Ubuntu终极指南:绕过Microsoft Store慢速下载(附最新22.04 LTS离线包)
本文提供WSL2离线安装Ubuntu 22.04 LTS的完整指南,帮助开发者绕过Microsoft Store下载慢的问题。通过PowerShell命令配置环境、获取离线安装包并完成安装,同时包含初始配置、资源优化及常见问题解决方案,助您快速搭建高效的Linux开发环境。
mariaDB(mysql数据库)-安装配置和使用
登陆mysql语法:mysql -u用户名 -p当前密码 -h服务器的ip【登陆当前服务器,不需要-h】记住:选项和后面的值是没有空格的mysqladmin是操作系统命令。mysql 进入子系统后。
EDA的未来:当AI与Cadence Virtuoso相遇
本文探讨了AI技术与Cadence Virtuoso在EDA领域的融合,展示了如何通过生成式AI提升芯片设计效率。文章详细分析了Virtuoso设计环境的智能化演进、AI驱动的设计辅助功能实现路径,以及SKILL语言的进化方向,为工程师提供了未来EDA工具的发展趋势和实用案例。
【运维工程师学习五】数据库之MariaDB
数据库的软件体系结构是C/S(Client/Server,客户端/服务端),要访问或管理数据库必须通过对应的客户端。如果脚本中只有表结构,则只会在数据库中创建表,如果脚本中既有表结构又有数据内容,则都会导入。关于表的操作命令还有很多,如增(INSERT)、删(DELETE)、改(UPDATE)、查(SELECT)不再演示,请自行搜索,如搜索“mysql常用命令”123456为密码,上述命令的意思是:允许密码为123456的root用户具有数据库中所有数据库的所有权限。本次安装使用“软件仓库安装法”。
LVGL在嵌入式Linux系统上的高效移植与优化实践
本文详细介绍了在嵌入式Linux系统(特别是ARM平台)上移植和优化LVGL图形库的完整实践流程。内容涵盖从开发环境搭建、代码获取、CMake工程配置,到关键配置文件定制、显示与输入设备端口移植,以及内存、渲染等核心性能优化技巧,旨在帮助开发者高效构建流畅的嵌入式UI应用。
HMC5883L磁力计在STM32F4上的I2C驱动与数据校准实战
本文详细介绍了HMC5883L磁力计在STM32F4平台上的I2C驱动开发与数据校准实战。通过解析寄存器配置、数据读取处理和椭圆拟合校准算法,帮助开发者实现精准的地磁测量,特别适用于无人机导航和机器人系统中的航向确定与陀螺仪漂移修正。
博客acm1
这段时间主要学习递归和贪心。贪心不会,还在搞递归。 周日,补充了一下STL应用,其中string的应用很实用,在这里总结一下。 “这个东西好使吗,好使,非常好使” STL :C++数据的标准模板库 缩短编码时间 string 字符串 一段文字(字符数组同) 字符串对象 初始化赋值比较连接判断是否空做数组 字符串常见含义 os<<a 将a写到输出流os中,返回os is>>...
手把手教你用GNU Radio和PlutoSDR搭建FM收音机(附完整流程图)
本文提供了一份详细的实践指南,教你如何使用GNU Radio和PlutoSDR搭建一个功能完整的FM收音机。从软硬件环境准备、核心流程图构建,到运行调试与效果优化,手把手带你完成从射频信号接收、下变频、FM解调到音频输出的全过程,是入门软件定义无线电(SDR)的绝佳实践项目。
mariadb数据库入门手册
mysql/mariadb数据库的基础命令使用
3年爬虫老狗亲测2026最新OpenClaw:熬3天的DOM+反爬+存储,现在18分钟零核心代码搞定!
本文分享了跨境电商竞品监控系统的技术升级历程。作者通过对比传统爬虫技术(Selenium+Scrapy)与OpenClaw 2026的实践应用,展示了AI驱动的自动化爬虫变革。传统方案需3000+行代码维护DOM结构、反爬策略,耗时3天完成2000个SKU监控;而采用基于GPT-5o-mini的OpenClaw 2026后,仅需自然语言描述需求,18分钟即可完成全流程,效率提升240倍。重点介绍了四大核心功能:动态验证码自动识别
禾赛激光雷达AT128P/海康相机(1):ROS环境设备驱动
sudo cp *.so /opt/MVS/lib/64/ # 复制当前文件夹中所有.so文件 到 “/opt/MVS/lib/64/” 文件中。将相应的.so文件复制到 /opt/MVS/lib/64/。我解压的是x86_64的,解压之后,打开,再解压MVS。然后在上一层,也就是选择x86_64那一层打开终端。新建一个工作空间,或者打开自己的工作空间。)包放在src内,并解压,然后编译。MVS V2.1.2下载之后解压,// 驱动代码下载到src文件里面。// 特定文件夹中打开终端。
在CentOS7下,安装MariaDB
安装mariadb yum install mariadb-server -y 启动 systemctl start mariadb 数据库设置开机启动 systemctl enable mariadb
C#操作MySQL从入门到精通(1)——安装MySQL数据库
我们使用C#操作MySQL数据库第一步要做的就是安装MySQL数据库,本文就是详细讲解如何安装MySQL数据库。
CentOS 7卸载mariadb安装mysql
CentOS 7已经将默认集成mariadb而不是mysql,这对于多数还是依赖于mysql的应用来说,需要手动的进行更新。error 2002 (hy000) mysql.sock /var/lib/mysql/mysql.sock首先查看都安装了哪些的mariadb相关的模块。枫竹梦自己安装过mariadb,所有模块较多。rpm -qa | grep mariadb然后进行卸载。rpm -e m
深度学习工具包 DeepLearningToolbox
深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[](https://bitdeli.com/free "Bitdeli Badge")
数学建模模型总结
这是本人在两年内准备参加数学建模竞赛搜集到的模型资料,已经经过了本人的筛选和整理,希望能够对准备参加数学建模竞赛的学弟学妹们提供一些帮助!
CentOS7下卸载默认的MariaDb
1 查找安装包 [root@localhost mysql-cluster-gpl-7.4.11-linux-glibc2.5-x86_64]# rpm -qa|grep mariadb 2 卸载 [root@localhost mysql-cluster-gpl-7.4.11-linux-glibc2.5-x86_64]# yum -y remove mariadb-libs-5.5
jre9下载 jdk9
(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】
MariaDB的简单入门
1.什么是mariadb? mariadb:MariaDB数据库管理系统是MySQL的一个分支,主要由开源社区在维护,采用GPL授权许可 MariaDB的目的是完全兼容MySQL,包括API和命令行,使之能轻松成为MySQL的代替品。在存储引擎方面,使用XtraDB(英语:XtraDB)来代替MySQL的InnoDB。 2.环境配置 3.mariadb的安装 安装mariadb yum ins...
大中型超市收银系统(可直接运行)
光步前台收银系统系统功能:商品销售、商品退货、挂单、收银员权限、会员销售、单品取消、整单取消、商品查询、脱机销售、脱机数据上传,基本资料下载,开钱箱、小票打印、收款结算,支持多币种付款方式(现金、储值卡、礼券、微信等),支持多种促销。运行环境:.net 4.0登陆信息用户名:1001 密码:123456内置商品信息,商品编码可输入00001000 - 00010000,测试效果相关功能键F5 结算 F9挂单 F11商品查询 F8退货 Insert单品取消 Del整单取消 F12开钱箱F2 会员 Ctrl+Z退出系统 Home 锁屏 相关源码待公开
MySQL和MariaDB,它们有什么区别?
MySQL是一个基于结构化查询语言(SQL)的开源关系型数据库管理系统(RDBMS)。它是由oracle公司开发和管理的,最初于1995年5月23日发布。它被广泛用于许多小型和大型的工业应用,能够处理大量的数据。在甲骨文公司收购MySQL之后,数据库的使用出现了一些问题,因此MariaDB被开发出来。MySQL是由瑞典公司MySQL AB在1995年创建的。该平台的开发者是Michael Widenius(Monty)、David Axmark和Allan Larsson。
MySQL和MariaDB的对比和选型
MySQL和MariaDB最大的不同应该是MySQL目前是Oracle公司的产品,虽然开源但开源协议对于免费商业化不好,在国内使用可能大家习惯了,但要出海就要考虑合规的问题了。而MariaDB的开源协议相对商业化友好,更适合需要全球化的或是商业合规的企业使用。
Linux上mariadb的安装与配置
yum源安装MySQL和开启设置服务 首先,我们来看看使用yum源安装MySQL的优缺点: 优点:安装方便快捷,安装方式简单 缺点:太过于死板,定死了各个文件的位置 1、打开官方网站,上边有各种版本的yum源,找到自己想要的版本设置yum源 官网:https://downloads.mariadb.org/mariadb/repositories/ 2、如果我们使用官网...
mariadb数据库基本使用
mariadb数据库简介 自甲骨文公司收购MySQL后,其在商业数据库与开源数据库领域市场的占有份额都跃居第一,这样的格局引起了业内很多的人士的担忧,因为商业数据库的老大有可能将MySQL闭源。为了避免Oracle将MySQL闭源,而无开源的类MySQL数据库可用,MySQL社区采用分支的方式来避开这个风险。MariaDB数据库就这样诞生了,MariaDB是一个向后兼容,可能在以后替代MySQL的数据库产品,其官方地址为:https://mariadb.org/ 。mariadb和mysql几乎是一样的。首
Linux 数据库的安装(mariadb)及基础操作
mariadb、安装mariadb、启动、停止mariadb服务、查看有哪些数据库命令、使用数据库、查看当前库里面有哪些表、建库、建表、查看表结构、插入、删除数据、查询指定数据等操作
Linux环境下安装MySQL
Linux下安装MySQL-超简洁版本-亲测可用
MySQL数据库基本操作
1.information_schema:虚拟库,主要储存系统的一些数据库对象的信息 2.performance_schema:主要存储数据库服务器的性能参数 3.mysql:授权库,主要存储系统用户的权限信息 4.sys:主要存储数据库服务器的性能参数 创建业务数据库 create database 数据库名字; 删除数据库 drop database 数据库名字; 数据类型 数值类型: 整数类...
Linux系统之安装mariadb方法
Linux系统之安装mariadb方法
Linux安装MariaDB数据库
目录 1. 下载MariaDB数据库 2 确认下载 3 安装完成提示 4 数据库启动 5. 数据库初始化操作 6. 测试数据库用户名和密码是否有效 7.Mysql数据库远程访问配置 7.1 关于链接数据库的说明 7.2 配置数据库权限配置说明 7.3 配置Linux数据库权限 7.3.1 切换数据库mysql 7.3.2 修改数据库表 8. 配置Linux防火墙策略 8.1 检查防火墙状态 8.2 防火墙配置 8.3 手动关闭防火墙 8.4 手动开放防火墙端口 8.5 数
Linux 安装 MariaDB
Linux 安装 MariaDB 检查是否安装过 MariaDB 或 MySQL yum 安装 MariaDB 数据库 Navicat 连接 MariaDB 错误:2003 -Can't connect to MySQL server on '192.168.150.129' (10060 "Unknown error")
903



被折叠的 条评论
为什么被折叠?



