![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据库
想努力的人
世界很好
展开
-
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 · 438 阅读 · 0 评论 -
python3 连接 mysql 遇到乱码问题解决方案
今天准备用python3连接mysql 处理一些数据,发现从数据库中取出的数据放到Python3中进行输出都是乱码利用sql语句SHOW VARIABLES LIKE '%char%'; 检查了数据库,确实显示是utf8编码,按理来python3已经规避掉中文编码问题了,所以连decode函数都没有了,这让我很疑惑最后检查出原因:在连接数据库转载 2017-12-21 17:55:18 · 379 阅读 · 0 评论 -
python MySQL 批量插入
# coding:utf-8import pymysql# 打开数据库连接db = pymysql.connect(host='localhost', port=3306, user='username', passwd='password', db='database_name', charset='utf8')# 使用cursor()方法获转载 2017-12-23 10:48:17 · 8793 阅读 · 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 · 5310 阅读 · 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 · 432 阅读 · 0 评论