mariadb

MariaDb数据库的入门使用--学习笔记

倾然丶 夕夏残阳落幕 提交于 2020-02-25 22:18:33
MariaDb简介,由于Oracle公司在2009年收购了myql的母公司Sun,因此mysql数据项目也随之纳入了Oracle公司,逐渐演变为保持着开源软件的身份,但是又申请了多项商业专利的软件系统。所以mysql项目创始者重新研发了一款为maridb的全新数据库管理系统,几乎完全兼容mysql,在使用上几乎一致。 1.1 安装mariadb服务 # yum安装 [root@localhost ~]# yum install mariadb mariadb-server -y # 设置开机自启动 [root@localhost ~]# systemctl enable mariadb ln -s '/usr/lib/systemd/system/mariadb.service' '/etc/systemd/system/multi-user.target.wants/mariadb.service' [root@localhost ~]# systemctl start mariadb 1.2 设置防火墙 [root@localhost Desktop]# firewall-cmd --permanent --add-service=mysql success [root@localhost Desktop]# firewall-cmd --reload success 1.3

MySQL安装——Linux

放肆的年华 提交于 2020-02-25 21:07:01
MySQL安装——Linux MySQL下载链接 : http://downloads.mysql.com/archives/community/ mysql安装(5.5) (1)查询是否安装过 #查看系统是否安装了mysql rpm -qa | grep mysql #查看系统是否安装了mariadb,MariaDB是MySQL关系数据库管理系统的一个复刻 rpm -qa | grep mariadb 如果已经安装过,将已经安装过的删除,删除命令如下 : #--nodeps rpm在安装/卸载时,不检查依赖关系 rpm -e --nodeps mysql-community-common-5.7.16-1.el7.x86_64 rpm -e --nodeps mysql-community-client-5.7.16-1.el7.x86_64 rpm -e --nodeps mysql-community-server-5.7.16-1.el7.x86_64 rpm -e --nodeps mysql-community-libs-5.7.16-1.el7.x86_64 #如果系统有mariadb,可以卸载 rpm -e --nodeps mariadb-libs-5.5.56-2.el7.x86_64 (2)安装 安装服务端 rpm -ivh MySQL-server-5.5

安装部署zabbix+garafana

情到浓时终转凉″ 提交于 2020-02-25 20:01:38
rpm -ivh http://repo.zabbix.com/zabbix/4.2/rhel/7/x86_64/zabbix-release-4.2-2.el7.noarch.rpm yum -y install zabbix-get yum -y install httpd mariadb mariadb-server zabbix-server-mysql zabbix-web-mysql zabbix-agent 来源: CSDN 作者: aaronszm 链接: https://blog.csdn.net/aaronszm/article/details/104494728

compose文件在swarm中创建集群

丶灬走出姿态 提交于 2020-02-25 18:29:27
简介 一、与上面环境不一致之处: 1.使用了etcd集群 集群地址为:10.0.102.214:2379,10.0.102.175:2379,10.0.102.191:2379 2.解决网络通信问题: 让docker stack 共用同一网络:因stack部署时会以stack名称创建网络,所以保持相同stack名字在同一网络中。如下所示: docker stack deploy -c compose_swarm_1.yaml stack名 docker stack deploy -c compose_swarm_2.yaml stack名 docker stack deploy -c compose_swarm_3.yamlstack名 准备工作 各个节点创建需要挂载的目录及准备挂载的文件(如开启binlog的Mariadb配置文件) #mkdir /data1/ #mkdir /etc/my.cnf.d 在k8s-node-3节点上创建开启binlog的mariadb配置文件 # vim /etc/my.cnf.d/bin-log.cnf [mysqld] log-bin= mysql-bin log_slave_updates = 1 expire_logs_days = 20 server-id = 211 master节点部署操作 [root@node-1 ~]#

mariadb server: I can't stop the server with `mysql.server stop`

孤者浪人 提交于 2020-02-25 08:17:52
问题 OSX 10.13.6 I installed mariadb sever with homebrew a few years ago, and I use it infrequently. Today, I tried to start mariadb using the command: $ mysql.server start and I got a bunch of errors. So, I did: $ brew update then: $ brew uprade mariadb That completed fine, and now I can start mariadb with: $ mysql.server start and I can access all my old db's. The problem I'm having is that I cannot stop mysql. Both these commands hang: $ mysql.server stop and(in another terminal window): $

mariadb server: I can't stop the server with `mysql.server stop`

假如想象 提交于 2020-02-25 08:15:53
问题 OSX 10.13.6 I installed mariadb sever with homebrew a few years ago, and I use it infrequently. Today, I tried to start mariadb using the command: $ mysql.server start and I got a bunch of errors. So, I did: $ brew update then: $ brew uprade mariadb That completed fine, and now I can start mariadb with: $ mysql.server start and I can access all my old db's. The problem I'm having is that I cannot stop mysql. Both these commands hang: $ mysql.server stop and(in another terminal window): $

DDL语句

倖福魔咒の 提交于 2020-02-24 02:19:26
创建表 CREATE TABLE 创建表的方法: (1)直接创建 CREATE TABLE [ IF NOT EXISTS ] ‘tbl_name’ ( col1 type1 修饰符, col2 type2 修饰符, .. . ) #字段信息 col type1 PRIMARY KEY ( col1, .. . ) INDEX ( col1, .. . ) UNIQUE KEY ( col1, .. . ) #表选项: ENGINE [ = ] engine_name ROW_FORMAT [ = ] { DEFAULT | DYNAMIC | FIXED | COMPRESSED | REDUNDANT | COMPACT } 例: CREATE TABLE student ( id int UNSIGNED AUTO_INCREMENT PRIMARY KEY, name VARCHAR ( 20 ) NOT NULL, age tinyint UNSIGNED, gender ENUM ( 'M' , 'F' ) default 'M' ) ENGINE = InnoDB AUTO_INCREMENT = 10 DEFAULT CHARSET = utf8 ; #id字段以10初始值 DESC student ; +--------+---------------------

Media wiki 搭建

杀马特。学长 韩版系。学妹 提交于 2020-02-23 18:25:07
MediaWiki全球最著名的开源wiki程序,运行于PHP+MySQL环境。 MediaWiki从2002年2月25日被作为维基百科全书的系统软件,并有大量其他应用实例。MediaWiki的开发得到维基媒体基金会的支持。 MediaWiki是建立wiki网站的首选后台程序,国内的灰狐维客等站点都采用这套系统。 Media wiki 搭建 1.安装准备的软件及安装环境: 系统版本CentOS Linux release 7.5.1804 (Core) 2.软件版本: (1)httpd-2.4.6-80.el7.centos.1.x86_64 ; (2)Server version: 10.2.19-MariaDB MariaDB Server (3)PHP 7.1.23 (4)Windows-server-2008R2 AD域控制器 3.配置动态网卡 4.查看防火墙状态: 使用yum安装LAMP环境,关闭防火墙和selinux,便于顺利测试: systemctl status firewalld systemctl stop firewalld systemctl disable firewalld 关闭防火墙 5.配置MariaDB yum源安装Http和MariaDB vim /etc/yum.repos.d/Mariadb.repo(空文件里输入) 内容为: [mariadb

centos7如何安装zabbix

跟風遠走 提交于 2020-02-23 00:10:13
只需要按照第三次修改版本的内容安装就可以了(水平线内的内容),主要是执行两个脚本就可以完成自动化安装了,其他内容是以前写的,仅留下来作为参考 第三次修改:(此次为zabbix4.0版本的,进一步的自动化一键安装) 共有两个脚本 第一个脚本:mysqlpasswd.sh(放在root家目录下)修改mysql密码的脚本,无需执行 #!/usr/bin/expect spawn mysql_secure_installation expect "Enter current password for root (enter for none):" send "\r" expect "Set root password? " send "Y\r" expect "New password:" send "123456\r" expect "Re-enter new password:" send "123456\r" expect "Remove anonymous users? " send "y\r" expect "Disallow root login remotely? " send "n\r" expect "Remove test database and access to it? " send "y\r" expect "Reload privilege tables

mysql语言之SELECT

痞子三分冷 提交于 2020-02-21 03:00:58
SELECT 提供数据的查询功能 Syntax: SELECT [ALL | DISTINCT | DISTINCTROW ] [HIGH_PRIORITY] [STRAIGHT_JOIN] [SQL_SMALL_RESULT] [SQL_BIG_RESULT] [SQL_BUFFER_RESULT] [SQL_CACHE | SQL_NO_CACHE] [SQL_CALC_FOUND_ROWS] select_expr [, select_expr ...] [FROM table_references [WHERE where_condition] [GROUP BY {col_name | expr | position} [ASC | DESC], ... [WITH ROLLUP]] [HAVING where_condition] [ORDER BY {col_name | expr | position} [ASC | DESC], ...] [LIMIT {[offset,] row_count | row_count OFFSET offset}] [PROCEDURE procedure_name(argument_list)] [INTO OUTFILE 'file_name' [CHARACTER SET charset_name] export