
数据库
想努力的人
世界很好
展开
-
ES数据库相关命令
查看数据库索引的setting和mapping :curl -X GET http://ip:port/my_index?pretty 查看mapping:curl 172.18.8.118:9200/my_index/_mapping 删除索引:curl -XDELETE 172.18.8.118:9200/My_index 查看索引数据总量:curl -X GET http://172.18.8.118:9200/fugang_test/_count 查看所有索引:curl -X GET htt原创 2020-11-11 20:42:26 · 540 阅读 · 0 评论 -
python3 连接 mysql 遇到乱码问题解决方案
今天准备用python3连接mysql 处理一些数据,发现从数据库中取出的数据放到Python3中进行输出都是乱码 利用sql语句 SHOW VARIABLES LIKE '%char%'; 检查了数据库,确实显示是utf8编码,按理来python3已经规避掉中文编码问题了,所以连decode函数都没有了,这让我很疑惑 最后检查出原因: 在连接数据库转载 2017-12-21 17:55:18 · 423 阅读 · 0 评论 -
python MySQL 批量插入
# coding:utf-8 import pymysql # 打开数据库连接 db = pymysql.connect(host='localhost', port=3306, user='username', passwd='password', db='database_name', charset='utf8') # 使用cursor()方法获转载 2017-12-23 10:48:17 · 8865 阅读 · 0 评论 -
centos7安装mongodb 及开机自动启动
1,下载安装包 下载mongoDB的安装文件 地址:https://www.mongodb.org/downloads#production 选择Linux 64-bit legacy 版本,下载到目标服务器上。 解压文件 tar -zxvf mongodb-linux-x86_64-3.0.2.tgz 进入解压后的目录,把bin文件夹内的文件都置为可执行权限转载 2017-12-28 17:10:46 · 5449 阅读 · 0 评论 -
解决输入的安全模式
【MySQL笔记】解除输入的安全模式,Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column To disable safe mode, toggle the option in Preferences -> S转载 2018-01-08 14:55:35 · 474 阅读 · 0 评论