mariadb

Linux 安装JDK Tomcat MySQL(使用Mac远程访问)

陌路散爱 提交于 2020-05-01 07:06:51
阅读本文需要一定的 Linux基础 一 环境 阿里云服务器: CentOS 7.4 64位(基于RedHat) 本机: macOS High Sierra 二 压缩包 JDK http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html Tomcat https://tomcat.apache.org/download-80.cgi#8.5.31 MySQL https://dev.mysql.com/downloads/mysql/ 三 文件传输 输入SFTP命令连接 -> 输入实例登录密码   sftp root@公网IP 上传   put 本地文件 服务器路径 下载   get 服务器文件 本地路径 四 远程访问 输入SSH命令连接 -> 输入实例登录密码   ssh root@公网IP 五 关闭防火墙 关闭防火墙   systemctl stop firewalld.service 关闭防火墙开机自启动功能   systemctl disable firewalld.service 查看防火墙状态   firewall-cmd --state 六 安装JDK 查看当前Linux系统是否已安装java   rpm -qa | grep java 卸载已安装java  

Linux实战教学笔记29:MySQL数据库企业级应用实践

≡放荡痞女 提交于 2020-05-01 06:28:54
第二十九节 MySQL数据库企业级应用实践 一,概述 1.1 MySQL介绍 MySQL属于传统关系型数据库产品,它开放式的架构使得用户选择性很强,同时社区开发与维护人数众多。其功能稳定,性能卓越,且在遵守GPL协议的前提下,可以免费使用与修改,也为MySQL的推广与使用带来了更多的利好。在MySQL成长与发展过程中,支持的功能逐渐增多,性能也不断提高,对平台的支持也越来越多。 MySQL是一种关系型数据库管理系统,关系型数据库的特点是将数据保存在不同的表中,再将这些表放入不同的数据库中,而不是将所有数据统一放在一个大仓库里,这样的设计增加了MySQL的读取速度,而且灵活性和可管理性也得到了很大提高。访问及管理MySQL数据库的最常用标准化语言为SQL结构化查询语言。 1.2 MariaDB 数据库的诞生背景介绍 自甲骨文公司收购MySQL后,其在商业数据库与开源数据库领域市场的占有份额都跃居第一,这样的格局引起了业内很多的人士的担忧,因为商业数据库的老大有可能将MySQL闭源。为了避免Oracle将MySQL闭源,而无开源的类MySQL数据库可用,MySQL社区采用分支的方式来避开这个风险。MariaDB数据库就这样诞生了,MariaDB是一个向后兼容,可能在以后替代MySQL的数据库产品,其官方地址为:https://mariadb.org/ 。不过,这里还是建议大家选择更稳定

MySQL 8.0 Docker使用注解

核能气质少年 提交于 2020-05-01 05:11:30
PUBLIC | AUTOMATED BUILD cytopia / mysql-8.0 Last pushed: 8 months ago Repo Info Tags Dockerfile Build Details Short Description MySQL 8.0 on CentOS 7 Full Description MySQL 8.0 Docker <small>Latest build: 2017-08-30</small> mysql 5.5 | mysql 5.6 | mysql 5.7 | mysql 8.0 | mariadb 5.5 | mariadb 10.0 | mariadb 10.1 | mariadb 10.2 | mariadb 10.3 | percona 5.5 | percona 5.6 | percona 5.7 MySQL 8.0 Docker on CentOS 7 <sub>This docker image is part of the devilbox </sub> Options Environmental variables Required environmental variables Variable Type Description MYSQL_ROOT_PASSWORD string MySQL root

django+centos+mariadb读写分离完美实现(上)-mysql主从备份实现

 ̄綄美尐妖づ 提交于 2020-05-01 05:04:10
首先画图一张,用来展示今天要做的事情,读写分离,个人理解就是使用mysql主从备份的原理,让两个数据库同时为自己提供服务。其中主库负责数据保存,从库负责数据展示,可以一主一从,也可以一主多从。从而降低数据库同时处理读写的压力。 1、环境如下 master 10.10.101.83 slave 10.10.101.184 2、接着搭建数据库备份,使用的是centos7.4+mariadb   2-1-两台服务器安装Mariadb数据库   (ps:mariadb是免费版的mysql,操作很相似,注意,两台服务器都安装)   yum install mariadb mariadb-server -y 2-2-两台服务器启动mariadb服务 systemctl start mariadb    mariadb默认处于一种类似调试模式的模式当中,不用密码也可以登录,所以现在两台服务器的mariadb要使用工作模式 mysql_secure_installation    master端操作   进行授权 grant replication slave on *.* to "root"@"%" identified by "123" with grant option;       刷新授权表 flush privileges;       创建要备份的数据库和表    导出数据库

MariaDB 5.5 到 10.2

﹥>﹥吖頭↗ 提交于 2020-05-01 05:03:42
博客本地数据库版本mariadb 10.2,而服务器是5.5,在查询列表数据统计总数的sql里,服务器上count(1) over()报错。sql拎出来在窗口查询也报错。错误说明‘You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near...’,大概是版本问题,遂升级mariadb版本,问题解决。 备份等 # 备份数据库,如果升级顺利是不要实施备份还原的 mysqldump -u root -p --all-databases > alldb.sql # 如果想保留自己的 my.cof 配置,则备份一下这个文件 cp /etc/my.cnf /etc/my.cnf.bak # 停止数据库运行 systemctl stop mariadb # 卸载 MariaDB 老版本 yum remove mariadb mariadb-server 添加 MariaDB Yum 库 # 添加 MariaDB 官方源 vi /etc/yum.repos.d/MariaDB.repo # MariaDB 10.2 CentOS repository list # http:/

centos7 Mariadb5.5升级到Mariadb10.2

痞子三分冷 提交于 2020-05-01 05:02:43
一次升级过程,在此记录下。 原因:新的项目需要新的数据库版本支持。 升级主要步骤: 备份原数据库 --- 》卸载 mariadb --- 》添加 mariadb 国内 yum 源 --- 》安装 mariadb--- 》初始化数据库 --- 》导入数据。 1. 备份原数据库 由于是对测试环境的数据库进行升级,数据量不多,我直接导出需要迁移的数据库的数据到sql文件里。 mysqldump -uroot -p --database database_name >name.sql 2. 卸载 mariadb 由于是在同一台服务器进行安装新的Mariadb10.2,所以我们需要将老的版本卸载。 卸载 mariadb : yum remove mariadb 删除配置文件: rm -f /etc/my.cnf 删除数据目录 : rm -rf /var/lib/mysql/ 3. 添加 mariadb10.2 的国内 yum 源 之前我添加的是国外的源,安装很耗时,所以我找到 国内 yum 源 ,通过这个源安装较快。 vim /etc/ yum .repos.d/Mariadb.repo 添加以下内容: [mariadb] name = MariaDB baseurl = https: // mirrors.ustc.edu.cn/mariadb/yum/10.2/centos7-amd64

MySQL mysqlbinlog 读取mysql-bin文件出错

喜你入骨 提交于 2020-05-01 00:05:37
问题 mysqlbinlog -v -v --base64-output=DECODE-ROWS mysql-bin.000166 | less ERROR: Error in Log_event::read_log_event(): 'Found invalid event in binary log', data_len: 111, event_type: 35 /*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/; /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; # at 4 #190408 18:15:19 server id 311948559 end_log_pos 123 CRC32 0x56e12e5d Start: binlog v 4, server v 5.7.21-log created 190408 18:15:19 # Warning: this binlog is either in use or was not closed properly. BINLOG ' Nx

How can I change the type of database in phpmyadmin from mariadb to mysql?

强颜欢笑 提交于 2020-04-30 15:03:35
问题 I'm using phpmyadmin with xampp on both of my home and work machines. Some queries didn't work for me when I was working on one computer, but it worked on another. I checked it and the only difference is in the database server type. My queries don't work on: Server type: MariaDB They do work on: Server type: Mysql How can I change it from MariaDB to Mysql then? 回答1: The answer to this difference is here: https://mariadb.com/kb/en/mariadb/mariadb-vs-mysql-compatibility/ I don't quite know what

How can I change the type of database in phpmyadmin from mariadb to mysql?

假装没事ソ 提交于 2020-04-30 15:03:22
问题 I'm using phpmyadmin with xampp on both of my home and work machines. Some queries didn't work for me when I was working on one computer, but it worked on another. I checked it and the only difference is in the database server type. My queries don't work on: Server type: MariaDB They do work on: Server type: Mysql How can I change it from MariaDB to Mysql then? 回答1: The answer to this difference is here: https://mariadb.com/kb/en/mariadb/mariadb-vs-mysql-compatibility/ I don't quite know what

How can I change the type of database in phpmyadmin from mariadb to mysql?

别说谁变了你拦得住时间么 提交于 2020-04-30 15:02:51
问题 I'm using phpmyadmin with xampp on both of my home and work machines. Some queries didn't work for me when I was working on one computer, but it worked on another. I checked it and the only difference is in the database server type. My queries don't work on: Server type: MariaDB They do work on: Server type: Mysql How can I change it from MariaDB to Mysql then? 回答1: The answer to this difference is here: https://mariadb.com/kb/en/mariadb/mariadb-vs-mysql-compatibility/ I don't quite know what