展开

关键词

mysql的小知识点(关于数据库的导入导出 对于windows)

Query OK, 0 rows affected (0.05 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected ( 0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec

58780

手把手教学-MySQL主从复制架构转换MGR架构(手动版)

搭建复制环境,并开启增强半同步 所有节点配置 root@localhost [(none)]>set global super_read_only=0; Query OK, 0 rows affected root@localhost [(none)]>grant replication slave on *.* to 'rep'@'192.168.188.%'; Query OK, 0 rows affected 启动复制 root@localhost [(none)]>start slave; Query OK, 0 rows affected (0.03 sec) root@localhost [(none (0.00 sec) root@localhost [kk]>start group_replication; Query OK, 0 rows affected (3.36 sec) root@ localhost [kk]>set global group_replication_bootstrap_group=off; Query OK, 0 rows affected (0.00 sec)

51521
  • 广告
    关闭

    什么是世界上最好的编程语言?丨云托管征文活动

    代金券、腾讯视频VIP、QQ音乐VIP、QB、公仔等奖励等你来拿!

  • 您找到你想要的搜索结果了吗?
    是的
    没有找到

    Mysql系列 - 第4天:DDL常见操作汇总

    -----------+ 1 row in set (0.00 sec) mysql> drop database if exists javacode2018; Query OK, 0 rows affected (0.02 sec) mysql> insert into test2(a) values (1); Query OK, 1 row affected (0.00 sec) mysql> select (0.02 sec) mysql> insert into test4(a,b) values (1,1); Query OK, 1 row affected (0.00 sec) mysql> (0.02 sec) mysql> mysql> insert into test7(a,b) VALUES (1,1); Query OK, 1 row affected (0.00 sec) table test5( -> a int not null comment '字段a' primary key -> ); Query OK, 0 rows affected (

    24420

    技术分享 | 七个实验掌握 MySQL 8.0 角色功能

    (0.02 sec) mysql> grant all on ytt_new.* to db_owner; Query OK, 0 rows affected (0.01 sec) mysql ,delete,update on ytt_new.* to db_datawriter; Query OK, 0 rows affected (0.01 sec) 创建三个普通用户,分别为 ytt1 default role db_owner to ytt1; Query OK, 0 rows affected (0.00 sec) mysql> grant db_datareader OK, 0 rows affected (0.01 sec) mysql> grant db_datawriter to ytt3; Query OK, 0 rows affected (0.01 mysql> grant db_owner,db_datareader,db_datawriter to ytt4; Query OK, 0 rows affected (0.01 sec)

    16420

    MySQL 事务的隔离级别及锁操作演示

    二、数据库服务设置 1、事务隔离级别设置 mysql> set global transaction_isolation = 'repeatable-read'; Query OK, 0 rows affected -------------------------+ 2、锁等待时间设置 mysql> set global innodb_lock_wait_timeout=5; Query OK, 0 rows affected 设置事务隔离级别: mysql> set global transaction_isolation = 'read-committed'; Query OK, 0 rows affected (0.00 (0.00 sec) mysql> update tt set name = 'ssr' where id = 2; Query OK, 1 row affected (0.01 sec) Rows (0.00 sec) mysql> update tt set name = 'ssrr' where id = 2; Query OK, 1 row affected (0.00 sec) Rows

    10140

    AWS 又瘫痪了。。。本月第三次了。。。:数据中心断电了。。。

    within the affected Availability Zone. If you are able to relaunch affected EC2 instances within the affected Availability Zone, that may help If you are able to relaunch affected EC2 instances within the affected Availability Zone, that may help path to recovery now would be to relaunch affected EC2 instances within the affected Availability Zone If you have the ability to relaunch an affected EC2 instance or recreate an affected EBS volume from

    6010

    mysql实现地理位置搜索

    (0.00 sec) mysql> set @lat=56.14262; #Search origin lat Query OK, 0 rows affected (0.00 sec) mysql> radius (km) Query OK, 0 rows affected (0.00 sec) mysql> SELECT id,lat,lng,@er*2*ASIN(SQRT(POWER(SIN( (0.00 sec) mysql> set @lat=56.14262; Query OK, 0 rows affected (0.00 sec) mysql> set @lng=37.605853; Query OK, 0 rows affected (0.00 sec) mysql> set @dist=20;#km Query OK, 0 rows affected (0.00 sec) mysql Query OK, 0 rows affected (0.00 sec) mysql> set @dist=20;#km Query OK, 0 rows affected (0.00 sec) mysql

    1.9K100

    第31期:索引设计(索引数量探讨)

    操作这 10 张表时间对比: (debian-ytt1:3500)|(ytt)>call sp_batch_write('update','t1',100000); Query OK, 0 rows affected (22.81 sec) (debian-ytt1:3500)|(ytt)>call sp_batch_write('update','t2',100000); Query OK, 0 rows affected (47.42 sec) (debian-ytt1:3500)|(ytt)>call sp_batch_write('update','t3',100000); Query OK, 0 rows affected (31.80 sec) (debian-ytt1:3500)|(ytt)>call sp_batch_write('delete','t2',100000); Query OK, 0 rows affected (59.89 sec) (debian-ytt1:3500)|(ytt)>call sp_batch_write('delete','t3',100000); Query OK, 0 rows affected

    7720

    mysql-完整性约束

    - 可空 默认值,创建列时可以指定默认值,当插入数据时如果未主动设置,则自动添加默认值 mysql> create database db1;  # 创建db1数据库 Query OK, 1 row affected mysql> create table tb1(id int not null default 2,num int not null);  # 创建tb1表并约束 Query OK, 0 rows affected (0.03 sec) mysql> insert into department values(1,'IT'),(2,'IT'); Query OK, 2 rows affected (0.01 sec (0.01 sec) mysql> insert into student values(7,'web','female'); Query OK, 1 row affected (0.00 sec) (0.02 sec) mysql> insert into student(name) values('呃呃'); Query OK, 1 row affected (0.01 sec) mysql>

    19810

    第十章《触发器》

    单条: mysql> create table log1(log varchar(255) not null); Query OK, 0 rows affected (0.01 sec) mysql> before insert on log1mysql> create trigger log_time befues(now()); Query OK, 0 rows affected (0.02 sec ) mysql> insert into log1 values('create table test3'); Query OK, 1 row affected (0.00 sec) mysql> test2; Query OK, 0 rows affected (0.01 sec) mysql> create table test2(a2 int); Query OK, 0 rows affected (0.02 sec) mysql> create table test3(a3 int auto_increment primary key); Query OK, 0 rows affected

    12630

    Apache Sentry实战之旅(一)—— Impala+Sentry整合

    (0.006 seconds) No rows affected (0.001 seconds) No rows affected (0.002 seconds) No rows affected ( ) No rows affected (0.004 seconds) No rows affected (0.004 seconds) No rows affected (0.004 seconds) affected (0.007 seconds) No rows affected (0.006 seconds) No rows affected (0.005 seconds) No rows affected affected (0.004 seconds) No rows affected (0.005 seconds) No rows affected (0.005 seconds) No rows affected affected (0.002 seconds) No rows affected (0.006 seconds) No rows affected (0.005 seconds) No rows affected

    1.3K40

    SpringCloud 2.x学习笔记:20、Nacos的数据持久化(MySQL)

    MariaDB [nacos]> source /root/nacos-mysql.sql Query OK, 0 rows affected (0.05 sec) Query OK, 0 rows affected (0.02 sec) Query OK, 0 rows affected (0.03 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.02 sec) Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.02 sec) Query OK, 0 rows affected (0.02 sec) Query OK, 0 rows affected (0.01 sec) Query OK, 0 rows affected (0.02 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 1 row affected (0.00 sec) Query OK, 1 row

    76050

    数据库MySQL-事务

    (0.05 sec) mysql> insert into bank values ('1001',1000),('1002',1); Query OK, 2 rows affected (0.00 sec) Records: 2 Duplicates: 0 Warnings: 0 -- 开启事务 mysql> begin; Query OK, 0 rows affected (0.00 sec (0.00 sec) Rows matched: 1 Changed: 1 Warnings: 0 -- 提交事务 mysql> commit // Query OK, 0 rows affected mysql> savepoint a1 // Query OK, 0 rows affected (0.00 sec) mysql> insert into bank values ('1004' ,200) // Query OK, 1 row affected (0.00 sec) -- 回滚到回滚点 mysql> rollback to a1 // Query OK, 0 rows affected

    18810

    数据库MySQL-数据类型

    stu1( -> id tinyint, # 范围要尽可能小,范围越小,占用空间越少 -> name varchar(20) -> ); Query OK, 0 rows affected (0.05 sec) mysql> insert into stu4 values (12,12); Query OK, 1 row affected (0.00 sec) mysql> select (0.05 sec) mysql> insert into stu5 values (3.1415,12.96); Query OK, 1 row affected (0.00 sec) mysql (0.03 sec) mysql> insert into stu6 values (5E2),(6E-2); # 插入科学计数法 Query OK, 2 rows affected (0.00 sec (0.00 sec) mysql> insert into stu8 values(12.999999999); Query OK, 1 row affected (0.00 sec) mysql

    30320

    关于MySQL中insert ignore,insert on duplicate和replace into,你可能没想过区别

    ------------------+1 row in set (0.00 sec)insert ignore into test_data values(4,cc);Query OK, 1 row affected +------+4 rows in set (0.00 sec)replace into场景>>replace into test_data values(1,aa);Query OK, 1 row affected (0.00 sec)replace into test_data values(4,cc);Query OK, 1 row affected (0.00 sec)select *from test_data into on duplicate场景insert into test_data values(1,aa) on duplicate key update id=id;Query OK, 0 rows affected (0.00 sec)insert into test_data values(4,cc) on duplicate key update id=id;Query OK, 1 row affected

    59731

    在K8S平台部署Spring Cloud微服务项目

    rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 1 row affected (0.01 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 0 rows affected (0.00 affected (0.00 sec) Query OK, 0 rows affected (0.00 sec) Query OK, 1 row affected (0.00 sec) Query

    3.4K31

    第09期:有关 MySQL 字符集的乱码问题

    ; Query OK, 1 row affected, 2 warnings (0.01 sec) -- 两条警告的内容, 对于字段 a1,内容不正确,但是依然写入了。 方法有两种: 1)把客户端编码设置成和表编码一致或者兼容的编码 mysql> truncate t1; Query OK, 0 rows affected (0.06 sec) -- 把客户端字符集设置为 utf8mb4 mysql> set names utf8mb4; Query OK, 0 rows affected (0.00 sec) -- 数据正常写入 mysql> insert mysql> set names default; Query OK, 0 rows affected (0.01 sec) mysql> select * from t3; +----------- OK, 0 rows affected (0.02 sec) -- 显示结果正常,问题得到解决。

    19520

    Mycat 运行与基础操作5

    (0.04 sec) mysql> insert into catworld4(name,id) values("abc",3); Query OK, 1 row affected (0.01 sec ) mysql> insert into catworld4(name,id) values("abc",4); Query OK, 1 row affected (0.00 sec) mysql> (name,id) values("abc",7); Query OK, 1 row affected (0.01 sec) mysql> insert into catworld4(name,id) values("abc",8); Query OK, 1 row affected (0.04 sec) mysql> insert into catworld4(name,id) values(" abc",9); Query OK, 1 row affected (0.01 sec) mysql> insert into catworld4(name,id) values("abc",10);

    6420

    innodb_flush_log_at_trx_commit参数对插入性能的影响测试方法

    NULL, -> PRIMARY KEY (`id`), -> KEY `a` (`a`) -> ) ENGINE=InnoDB; Query OK, 0 rows affected , 3 warnings (0.22 sec) mysql> mysql> drop procedure idata; Query OK, 0 rows affected (0.07 sec) mysql (0.01 sec) mysql> delimiter ; mysql> call idata(); Query OK, 1 row affected (8.05 sec) ---------- (0.01 sec) mysql> delimiter ; mysql> call idata(); Query OK, 1 row affected (5.76 sec) ----------- (0.01 sec) mysql> delimiter ; mysql> call idata(); Query OK, 1 row affected (3.88 sec) 可以看到: 该参数设置为

    21820

    新特性解读 | MySQL 8.0 新密码策略(中)

    管理员用户登录,设置全局参数: mysql:(none)>set persist password_history=3; Query OK, 0 rows affected (0.00 sec) 退出重连 mysql:(none)>create user ytt_dev identified by 'root123'; Query OK, 0 rows affected (0.15 sec) 退出连接, mysql:(none)> mysql:(none)>alter user ytt_dev identified by 'root456'; Query OK, 0 rows affected (0.03 sec) mysql:(none)>alter user ytt_dev identified by 'root789'; Query OK, 0 rows affected (0.17 sec) (0.00 sec) mysql:(none)>set persist password_history=default; Query OK, 0 rows affected (0.00 sec)

    10110

    扫码关注云+社区

    领取腾讯云代金券