随笔分类 -  mysql

摘要:一、Mysql数据库安装 #安装 yum install -y mysql-server #开启mysqld服务 systemctl start mysqld #设置服务开机自启 systemctl enable mysqld #修改默认密码,并创建用户datax及数据库datax-web mysq 阅读全文
posted @ 2023-10-09 17:32 小糊涂90 阅读(152) 评论(0) 推荐(0) 编辑
摘要:#实现主从复制配置,官网参考 https://dev.mysql.com/doc/refman/8.0/en/replication-configuration.html https://dev.mysql.com/doc/refman/5.7/en/replication-configuratio 阅读全文
posted @ 2023-10-08 09:51 小糊涂90 阅读(15) 评论(0) 推荐(0) 编辑
摘要:Mysql的日志分类: 事务日志:transaction log 错误日志:error log 通用日志:general log 慢查询日志:show query log 二进制日志:binary log 中继日志 reley log 1)事务日志的写入类型为"追加",因此其操作为“顺序IO”;通常 阅读全文
posted @ 2023-10-08 09:51 小糊涂90 阅读(16) 评论(0) 推荐(0) 编辑
摘要:常见的mysql存储引擎有MyISAM和InnoDB。 myISAM引擎特点: 1.不支持事务 2.表级锁定 3.读写相互堵塞,写入不能读,读时不能写 4.只缓存索引 5.不支持外键约束 6.不支持聚簇索引 7.读数据较快,占用资源较少 8.不支持MVCC(多版本并发控制)高并发 9.崩溃恢复性较差 阅读全文
posted @ 2023-10-08 09:50 小糊涂90 阅读(38) 评论(0) 推荐(0) 编辑
摘要:#三台服务器 centos7 mycat-server 10.0.0.152 内存2G以上 centos8 mysql-master 10.0.0.150 mariadb 10.3 centos8 mysql-master 10.0.0.160 mariadb 10.3 #1)创建数据库主从 [ro 阅读全文
posted @ 2023-10-08 09:48 小糊涂90 阅读(7) 评论(0) 推荐(0) 编辑
摘要:#三台服务器 centos7 mycat-server 10.0.0.152 内存2G以上 centos8 mysql-master 10.0.0.150 mariadb 10.3 centos8 mysql-master 10.0.0.160 mariadb 10.3 #关闭防火墙 systemc 阅读全文
posted @ 2023-10-07 15:03 小糊涂90 阅读(72) 评论(0) 推荐(0) 编辑
摘要:#实现主从复制配置,官网参考 https://dev.mysql.com/doc/refman/8.0/en/replication-configuration.html https://dev.mysql.com/doc/refman/5.7/en/replication-configuratio 阅读全文
posted @ 2023-10-07 15:01 小糊涂90 阅读(176) 评论(0) 推荐(0) 编辑
摘要:导入hellodb.sql生成数据库 MariaDB [hellodb]> source /root/hellodb_innodb.sql (1) 在students表中,查询年龄大于25岁,且为男性的同学的名字和年龄 MariaDB [hellodb]> select name,age from 阅读全文
posted @ 2023-10-07 14:59 小糊涂90 阅读(8) 评论(0) 推荐(0) 编辑
摘要:#配置说明​ Linux版本:Centos7 MySQL版本:mysql-5.7.26 该文档适用于MySQL版本>=5.7.6 数据库源码存放目录:/apps/mysql_source #存储空间要大一些 数据库安装目录:/usr/local/web/mysql 数据库的数据目录:/home/my 阅读全文
posted @ 2023-10-07 14:58 小糊涂90 阅读(73) 评论(0) 推荐(0) 编辑
摘要:MariaDB [hellodb]> create user 'magedu'@'192.168.1.%' ;Query OK, 0 rows affected (0.011 sec)​MariaDB [hellodb]> grant all privileges on hellodb.* to ' 阅读全文
posted @ 2021-11-04 15:54 小糊涂90 阅读(55) 评论(0) 推荐(0) 编辑
摘要:#下载二进制安装包(centos7系统):[root@localhost ~]#wget http://mirrors.dotsrc.org/mariadb/mariadb-10.4.21/bintar-linux-x86_64/mariadb-10.4.21-linux-x86_64.tar.gz 阅读全文
posted @ 2021-11-03 15:42 小糊涂90 阅读(91) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示