通知设置 新通知
腾讯云轻量服务器使用mysqldump导出数据 导致进程被杀
李魔佛 发表了文章 • 0 个评论 • 192 次浏览 • 2022-05-18 19:43
稍微密集一点,直接被杀掉。
在方面放mysql服务,简直就是煞笔行为。
稍微密集一点,直接被杀掉。
在方面放mysql服务,简直就是煞笔行为。
centos yum安装mysql client 客户端
我是一个新兵 发表了文章 • 0 个评论 • 208 次浏览 • 2022-05-17 11:51
这时需要从官网下载
1.安装rpm源
rpm -ivh https://repo.mysql.com//mysql57-community-release-el7-11.noarch.rpm
2.安装客户端
#可以通过yum搜索yum search mysql
#若是64位的话直接安装yum install mysql-community-client.x86_64
结果报错
报以下密钥错误:The GPG keys listed for the "MySQL 5.7 Community Server" repository are already installed but they are not correct for this package.
Check that the correct key URLs are configured for this repository.
则先执行以下命令再安装:rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022
wget -q -O - https://repo.mysql.com/RPM-GPG-KEY-mysql-2022|yum install然后重新安装 yum install mysql-community-client.x86_64
操作:
连到数据库:mysql -h 数据库地址 -u数据库用户名 -p数据库密码 -D 数据库名称
mysql -h 88.88.19.252 -utravelplat -pHdkj1234 -D etravel
数据库导出(表结构):mysqldump -h 数据库地址 -u数据库用户名 -p数据库密码 -d 数据库名称 > 文件名.sql
mysqldump -h 88.88.19.252 -utravelplat -pHdkj1234 -d etravel > db20190713.sql
数据库导出(表结构 + 表数据):mysqldump -h 数据库地址 -u数据库用户名 -p数据库密码 数据库名称 > 文件名.sql
mysqldump -h 88.88.19.252 -utravelplat -pHdkj1234 etravel > db20190713.sql
数据库表导出(表结构 + 表数据):
mysqldump -h 88.88.19.252 -utravelplat -pHdkj1234 etravel doc > doc.sql
导入到数据库:source 文件名.sql
source db20190713.sql
查看全部
这时需要从官网下载
1.安装rpm源
rpm -ivh https://repo.mysql.com//mysql57-community-release-el7-11.noarch.rpm
2.安装客户端
#可以通过yum搜索
yum search mysql
#若是64位的话直接安装
yum install mysql-community-client.x86_64
结果报错
报以下密钥错误:
The GPG keys listed for the "MySQL 5.7 Community Server" repository are already installed but they are not correct for this package.
Check that the correct key URLs are configured for this repository.
则先执行以下命令再安装:
rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022然后重新安装 yum install mysql-community-client.x86_64
wget -q -O - https://repo.mysql.com/RPM-GPG-KEY-mysql-2022|yum install
操作:
连到数据库:mysql -h 数据库地址 -u数据库用户名 -p数据库密码 -D 数据库名称
mysql -h 88.88.19.252 -utravelplat -pHdkj1234 -D etravel
数据库导出(表结构):mysqldump -h 数据库地址 -u数据库用户名 -p数据库密码 -d 数据库名称 > 文件名.sql
mysqldump -h 88.88.19.252 -utravelplat -pHdkj1234 -d etravel > db20190713.sql
数据库导出(表结构 + 表数据):mysqldump -h 数据库地址 -u数据库用户名 -p数据库密码 数据库名称 > 文件名.sql
mysqldump -h 88.88.19.252 -utravelplat -pHdkj1234 etravel > db20190713.sql
数据库表导出(表结构 + 表数据):
mysqldump -h 88.88.19.252 -utravelplat -pHdkj1234 etravel doc > doc.sql
导入到数据库:source 文件名.sql
source db20190713.sql
cronsun 数据备份与恢复
李魔佛 发表了文章 • 0 个评论 • 246 次浏览 • 2022-04-09 18:10
cronsun提供的csctl工具可以备份和恢复cronsun的任务数据。
备份数据:
# 请将 --conf 修改为你自己保存的 base.json 文件的路径
# --file 为备份文件路径,会自动加上 .zip 后缀,这里不需要写后缀
csctl backup --conf={/path/to/base.json} --dir=./ --file=cronsun_data
恢复数据# 请将 --conf 修改为你自己保存的 base.json 文件的路径
# --file 为备份文件路径
csctl restore --conf={/path/to/base.json} --file=./cronsun_data.zip
把数据导入之后,还需要在新的机器上,web登录,把运行的节点逐个改为新节点。 这个有点不智能,不过,相比每一个都要手动更新全部内容,也很好很多,节省很多时间了。 查看全部
cronsun提供的csctl工具可以备份和恢复cronsun的任务数据。
备份数据:
# 请将 --conf 修改为你自己保存的 base.json 文件的路径
# --file 为备份文件路径,会自动加上 .zip 后缀,这里不需要写后缀
csctl backup --conf={/path/to/base.json} --dir=./ --file=cronsun_data
恢复数据
# 请将 --conf 修改为你自己保存的 base.json 文件的路径
# --file 为备份文件路径
csctl restore --conf={/path/to/base.json} --file=./cronsun_data.zip
把数据导入之后,还需要在新的机器上,web登录,把运行的节点逐个改为新节点。 这个有点不智能,不过,相比每一个都要手动更新全部内容,也很好很多,节省很多时间了。
etcd连接带用户名与密码
李魔佛 发表了文章 • 0 个评论 • 729 次浏览 • 2022-04-09 00:57
ENDPOINT = http://127.0.0.1:2379
./etcdctl --endpoints=$ENDPOINT put foo "Hello World" --user="root" --password="password"
这样就把foo的值设为 "Hello World"
同理,如果要读取foo的值,只需要
ENDPOINT = http://127.0.0.1:2379
./etcdctl --endpoints=$ENDPOINT get foo --user="root" --password="password"
就可以把你上一个设置的值读取出来。
查看全部
ENDPOINT = http://127.0.0.1:2379
./etcdctl --endpoints=$ENDPOINT put foo "Hello World" --user="root" --password="password"
这样就把foo的值设为 "Hello World"
同理,如果要读取foo的值,只需要
ENDPOINT = http://127.0.0.1:2379
./etcdctl --endpoints=$ENDPOINT get foo --user="root" --password="password"
就可以把你上一个设置的值读取出来。
折腾了半天,结果发现windows上无法使用redis 布隆过滤器插件
李魔佛 发表了文章 • 0 个评论 • 1324 次浏览 • 2021-05-16 06:09
# Using Bloom Filter from redisbloom.client import Client rb = Client() rb.bfCreate('bloom', 0.01, 1000) rb.bfAdd('bloom', 'foo') # returns 1 rb.bfAdd('bloom', 'foo') # returns 0 rb.bfExists('bloom', 'foo') # returns 1 rb.bfExists('bloom', 'noexist') # returns 0
报错:
redis.exceptions.ResponseError: unknown command BF.RESERVE, with args beginning with: bloom, 0.01, 1000
连docker上得镜像也不支持。
更别说windows版本上的redis按照插件了。
只好用linux的docker了。
docker run -p 6379:6379 --name redis-redisbloom redislabs/rebloom:latest
查看全部
# Using Bloom Filter from redisbloom.client import Client rb = Client() rb.bfCreate('bloom', 0.01, 1000) rb.bfAdd('bloom', 'foo') # returns 1 rb.bfAdd('bloom', 'foo') # returns 0 rb.bfExists('bloom', 'foo') # returns 1 rb.bfExists('bloom', 'noexist') # returns 0
报错:
redis.exceptions.ResponseError: unknown command BF.RESERVE, with args beginning with: bloom, 0.01, 1000
连docker上得镜像也不支持。
更别说windows版本上的redis按照插件了。
只好用linux的docker了。
docker run -p 6379:6379 --name redis-redisbloom redislabs/rebloom:latest
redis启动报错
李魔佛 发表了文章 • 0 个评论 • 1065 次浏览 • 2021-02-21 14:50
Failed to start Advanced key-value store
csdn查出来的全是垃圾。
后面再stackoverflow看了下,尝试其中一个方案:
使用命令启动
/usr/bin/redis-server /etc/redis/redis-conf
然后一起就又正常了, 如果还是报错,把bind的ip地址后面那截改为127.0.0.1,后面那个ipv6格式的不要 查看全部
Failed to start Advanced key-value store
csdn查出来的全是垃圾。
后面再stackoverflow看了下,尝试其中一个方案:
使用命令启动
/usr/bin/redis-server /etc/redis/redis-conf
然后一起就又正常了, 如果还是报错,把bind的ip地址后面那截改为127.0.0.1,后面那个ipv6格式的不要
mysql存储过程学习
李魔佛 发表了文章 • 0 个评论 • 1241 次浏览 • 2020-10-18 16:38
环境 : MySQL8 + Navicat
1 .创建一个存储过程:
在navicat的查询窗口执行:
delimiter $$
create procedure hello_procedure ()
begin
select 'hello world';
END $$
call hello_procedure();
查看全部
环境 : MySQL8 + Navicat
1 .创建一个存储过程:
在navicat的查询窗口执行:
delimiter $$
create procedure hello_procedure ()
begin
select 'hello world';
END $$
call hello_procedure();
DBUtils 包名更新为dbutils,居然大部分包名都由驼峰命名改为下划线了
李魔佛 发表了文章 • 0 个评论 • 1832 次浏览 • 2020-10-04 17:01
from DBUtils.PooledDB import PooledDB, SharedDBConnection
POOL = PooledDB
现在是这样的了:
from dbutils.persistent_db import PersistentDB至于使用方法还是和原来的差不多。
原创文章,转载请注明出处
http://30daydo.com/article/611
查看全部
from DBUtils.PooledDB import PooledDB, SharedDBConnection
POOL = PooledDB
现在是这样的了:
from dbutils.persistent_db import PersistentDB至于使用方法还是和原来的差不多。
原创文章,转载请注明出处
http://30daydo.com/article/611
在Docker中配置Kibana连接ElasticSearch的一些小坑
李魔佛 发表了文章 • 0 个评论 • 6740 次浏览 • 2020-08-09 01:49
elasticseacrh.user='elastic'
elasticsearch.password='xxxxxx' # 你之前配置ES时设置的密码
BUT, 上面的配置在docker环境下无法正常启动使用kibana, 通过docker logs 容器ID, 查看的日志信息:
log [17:39:09.057] [warning][data][elasticsearch] No living connections
log [17:39:09.058] [warning][licensing][plugins] License information could not be obtained from Elasticsearch due to Error: No Living connections error
log [17:39:09.635] [warning][admin][elasticsearch] Unable to revive connection: http://127.0.0.1:9200/
log [17:39:09.636] [warning][admin][elasticsearch] No living connections
log [17:39:12.137] [warning][admin][elasticsearch] Unable to revive connection: http://127.0.0.1:9200/
log [17:39:12.138] [warning][admin][elasticsearch] No living connections
log [17:39:14.640] [warning][admin][elasticsearch] Unable to revive connection: http://127.0.0.1:9200/
log [17:39:14.640] [warning][admin][elasticsearch] No living connections
log [17:39:17.143] [warning][admin][elasticsearch] Unable to revive connection: http://127.0.0.1:9200/
log [17:39:17.143] [warning][admin][elasticsearch] No living connections
log [17:39:19.645] [warning][admin][elasticsearch] Unable to revive connection: http://127.0.0.1:9200/使用curl访问127.0.0.1:920也是正常的,后来想到docker貌似没有配置桥接网络,两个docker可能无法互通,故把kibana.yaml里面的host改为主机的真实IP(内网172网段ip),然后问题就得到解决了。 查看全部
elasticseacrh.user='elastic'
elasticsearch.password='xxxxxx' # 你之前配置ES时设置的密码
BUT, 上面的配置在docker环境下无法正常启动使用kibana, 通过docker logs 容器ID, 查看的日志信息:
log [17:39:09.057] [warning][data][elasticsearch] No living connections使用curl访问127.0.0.1:920也是正常的,后来想到docker貌似没有配置桥接网络,两个docker可能无法互通,故把kibana.yaml里面的host改为主机的真实IP(内网172网段ip),然后问题就得到解决了。
log [17:39:09.058] [warning][licensing][plugins] License information could not be obtained from Elasticsearch due to Error: No Living connections error
log [17:39:09.635] [warning][admin][elasticsearch] Unable to revive connection: http://127.0.0.1:9200/
log [17:39:09.636] [warning][admin][elasticsearch] No living connections
log [17:39:12.137] [warning][admin][elasticsearch] Unable to revive connection: http://127.0.0.1:9200/
log [17:39:12.138] [warning][admin][elasticsearch] No living connections
log [17:39:14.640] [warning][admin][elasticsearch] Unable to revive connection: http://127.0.0.1:9200/
log [17:39:14.640] [warning][admin][elasticsearch] No living connections
log [17:39:17.143] [warning][admin][elasticsearch] Unable to revive connection: http://127.0.0.1:9200/
log [17:39:17.143] [warning][admin][elasticsearch] No living connections
log [17:39:19.645] [warning][admin][elasticsearch] Unable to revive connection: http://127.0.0.1:9200/
(1412, 'Table definition has changed, please retry transaction')
李魔佛 发表了文章 • 0 个评论 • 2875 次浏览 • 2020-06-13 23:20
(1412, 'Table definition has changed, please retry transaction')
一个原因是因为多个线程操作数据库,当前的cursor对应的数据库被切换到其他库了。
比如 cursor在数据库A,正在不断query一条语句,然后另一个线程在在切换cursor到另外一个数据库B。
查看全部
(1412, 'Table definition has changed, please retry transaction')
一个原因是因为多个线程操作数据库,当前的cursor对应的数据库被切换到其他库了。
比如 cursor在数据库A,正在不断query一条语句,然后另一个线程在在切换cursor到另外一个数据库B。
redis desktop manager windows客户端
李魔佛 发表了文章 • 0 个评论 • 1539 次浏览 • 2020-05-07 20:37
怪不得这么垃圾。。。。。
怪不得这么垃圾。。。。。
windows下logstash6.5安装配置 网上的教程是linux,有坑
李魔佛 发表了文章 • 2 个评论 • 2203 次浏览 • 2020-02-28 10:05
百度里搜到的logstash安装配置教程 千篇一律都是这样子。
启动服务测试一下是否安装成功:
cd bin
./logstash -e 'input { stdin { } } output { stdout {} }'
上面的是linux运行的。
windows下把logstash改为logstash.bat 然后运行。
报错:
ERROR: Unknown command '{'
See: 'bin/logstash --help'
[ERROR] 2020-02-28 10:04:29.307 [main] Logstash - java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit
后来搜了下国外的网站。原来问题出在那个单引号上,把单引号改为双引号就可以了。
查看全部
百度里搜到的logstash安装配置教程 千篇一律都是这样子。
启动服务测试一下是否安装成功:
cd bin
./logstash -e 'input { stdin { } } output { stdout {} }'
上面的是linux运行的。
windows下把logstash改为logstash.bat 然后运行。
报错:
ERROR: Unknown command '{'
See: 'bin/logstash --help'
[ERROR] 2020-02-28 10:04:29.307 [main] Logstash - java.lang.IllegalStateException: Logstash stopped processing because of an error: (SystemExit) exit
后来搜了下国外的网站。原来问题出在那个单引号上,把单引号改为双引号就可以了。
bandcamp移动开发更简单
linxiaojue 发表了文章 • 0 个评论 • 1812 次浏览 • 2019-12-14 05:12
http://TalkingData.bandcamp.com/
http://Bugly.bandcamp.com/
http://Box2D.bandcamp.com/
http://aineice.bandcamp.com/
http://wyyp.bandcamp.com/
http://Prepo.bandcamp.com/
http://Chipmunk.bandcamp.com/
http://openinstall.bandcamp.com/
http://MobileInsight.bandcamp.com/
http://zhugelo.bandcamp.com/
http://CobubRazor.bandcamp.com/
http://Testin.bandcamp.com/
http://crashlytics.bandcamp.com/
http://APKProtect.bandcamp.com/
http://Ucloud.bandcamp.com/
http://ydkfpgj.bandcamp.com/releases
http://TalkingData.bandcamp.com/releases
http://Bugly.bandcamp.com/releases
http://Box2D.bandcamp.com/releases
http://aineice.bandcamp.com/releases
http://wyyp.bandcamp.com/releases
http://Prepo.bandcamp.com/releases
http://Chipmunk.bandcamp.com/releases
http://openinstall.bandcamp.com/releases
http://MobileInsight.bandcamp.com/releases
http://zhugelo.bandcamp.com/releases
http://CobubRazor.bandcamp.com/releases
http://Testin.bandcamp.com/releases
http://crashlytics.bandcamp.com/releases
http://APKProtect.bandcamp.com/releases
http://Ucloud.bandcamp.com/releases 查看全部
http://TalkingData.bandcamp.com/
http://Bugly.bandcamp.com/
http://Box2D.bandcamp.com/
http://aineice.bandcamp.com/
http://wyyp.bandcamp.com/
http://Prepo.bandcamp.com/
http://Chipmunk.bandcamp.com/
http://openinstall.bandcamp.com/
http://MobileInsight.bandcamp.com/
http://zhugelo.bandcamp.com/
http://CobubRazor.bandcamp.com/
http://Testin.bandcamp.com/
http://crashlytics.bandcamp.com/
http://APKProtect.bandcamp.com/
http://Ucloud.bandcamp.com/
http://ydkfpgj.bandcamp.com/releases
http://TalkingData.bandcamp.com/releases
http://Bugly.bandcamp.com/releases
http://Box2D.bandcamp.com/releases
http://aineice.bandcamp.com/releases
http://wyyp.bandcamp.com/releases
http://Prepo.bandcamp.com/releases
http://Chipmunk.bandcamp.com/releases
http://openinstall.bandcamp.com/releases
http://MobileInsight.bandcamp.com/releases
http://zhugelo.bandcamp.com/releases
http://CobubRazor.bandcamp.com/releases
http://Testin.bandcamp.com/releases
http://crashlytics.bandcamp.com/releases
http://APKProtect.bandcamp.com/releases
http://Ucloud.bandcamp.com/releases
python redis.StrictRedis.from_url 连接redis
李魔佛 发表了文章 • 0 个评论 • 4622 次浏览 • 2019-08-23 16:43
用url的方式连接redis
r=redis.StrictRedis.from_url(url)
url为以下的格式:
redis://[:password]@localhost:6379/0
rediss://[:password]@localhost:6379/0
unix://[:password]@/path/to/socket.sock?db=0
原创文章,转载请注明出处:
http://30daydo.com/article/527
查看全部
用url的方式连接redis
r=redis.StrictRedis.from_url(url)
url为以下的格式:
redis://[:password]@localhost:6379/0
rediss://[:password]@localhost:6379/0
unix://[:password]@/path/to/socket.sock?db=0
原创文章,转载请注明出处:
http://30daydo.com/article/527