Commit 7be38d8c authored by lixiaofang's avatar lixiaofang

update mysql

parent 691d1d3e
This diff is collapsed.
......@@ -128,7 +128,7 @@ def time_conv():
def get_topic_id(numtime):
try:
db = pymysql.connect(host="rm-2ze5k2we69904787l.mysql.rds.aliyuncs.com", user='work', passwd='Gengmei123',
db = pymysql.connect(host="rm-2zej7rzxnj036zxt3.mysql.rds.aliyuncs.com", user='work', passwd='oars152!traipseize738',
db="alpha", port=3306)
cursor = db.cursor()
cursor.execute("SELECT id FROM topic WHERE is_online =1 and create_time >= %s" ,(numtime))
......
......@@ -108,7 +108,8 @@ def time_conv(numtime):
def get_data(numtime):
try:
db = pymysql.connect(host="rm-2ze5k2we69904787l.mysql.rds.aliyuncs.com", user='work', passwd='Gengmei123',
db = pymysql.connect(host="rm-2zej7rzxnj036zxt3.mysql.rds.aliyuncs.com", user='work',
passwd='oars152!traipseize738',
db="alpha", port=3306)
cursor = db.cursor()
cursor.execute("SELECT user_id,id FROM topic WHERE is_online=1 and create_time LIKE '%%%%%s%%%%'" % numtime)
......
......@@ -107,7 +107,8 @@ def time_conv(numtime):
def get_data(numtime):
try:
db = pymysql.connect(host="rm-2ze5k2we69904787l.mysql.rds.aliyuncs.com", user='work', passwd='Gengmei123',
db = pymysql.connect(host="rm-2zej7rzxnj036zxt3.mysql.rds.aliyuncs.com", user='work',
passwd='oars152!traipseize738',
db="alpha", port=3306)
cursor = db.cursor()
print("---------")
......
......@@ -110,7 +110,9 @@ def time_conv(numtime):
def get_topic_id(numtime):
try:
db = pymysql.connect(host="rm-2ze5k2we69904787l.mysql.rds.aliyuncs.com", user='work', passwd='Gengmei123', db="alpha", port=3306)
db = pymysql.connect(host="rm-2zej7rzxnj036zxt3.mysql.rds.aliyuncs.com", user='work',
passwd='oars152!traipseize738',
db="alpha", port=3306)
cursor = db.cursor()
cursor.execute("SELECT id FROM topic WHERE is_online=1 and create_time LIKE '%%%%%s%%%%' " %numtime)
data = cursor.fetchall()
......
......@@ -110,7 +110,8 @@ def time_conv(numtime):
def get_topic_new_user(numtime):
try:
db = pymysql.connect(host="rm-2ze5k2we69904787l.mysql.rds.aliyuncs.com", user='work', passwd='Gengmei123',
db = pymysql.connect(host="rm-2zej7rzxnj036zxt3.mysql.rds.aliyuncs.com", user='work',
passwd='oars152!traipseize738',
db="alpha", port=3306)
cursor = db.cursor()
cursor.execute("SELECT user_id FROM topic WHERE is_online=1 and create_time LIKE '%%%%%s%%%%'" % numtime)
......
......@@ -107,7 +107,8 @@ def time_conv(numtime):
def get_data(numtime):
try:
db = pymysql.connect(host="rm-2ze5k2we69904787l.mysql.rds.aliyuncs.com", user='work', passwd='Gengmei123',
db = pymysql.connect(host="rm-2zej7rzxnj036zxt3.mysql.rds.aliyuncs.com", user='work',
passwd='oars152!traipseize738',
db="alpha", port=3306)
cursor = db.cursor()
cursor.execute("SELECT distinct(user_id) FROM topic WHERE is_online=1 and create_time LIKE '%%%%%s%%%%'" % numtime)
......
......@@ -88,7 +88,8 @@ def time_conv():
def get_follw_majia(numtime):
try:
db = pymysql.connect(host="rm-2ze5k2we69904787l.mysql.rds.aliyuncs.com", user='work', passwd='Gengmei123',
db = pymysql.connect(host="rm-2zej7rzxnj036zxt3.mysql.rds.aliyuncs.com", user='work',
passwd='oars152!traipseize738',
db="alpha", port=3306)
cursor = db.cursor()
cursor.execute("select temp1.user_id,temp1.email,temp2.user_id from account_user_auth temp1 left join (select user_id,follow_id,create_time from user_follow) temp2 on temp1.user_id = temp2.follow_id where temp1.email in ('s_05tmwu@shadow.com','s_07CRHt@shadow.com','s_0bdxxU@shadow.com','s_0mfxcO@shadow.com','s_0u6eaV@shadow.com','s_0UudEr@shadow.com','s_1b3v5V@shadow.com','s_ZVuLyC@shadow.com','s_1dbAoA@shadow.com','s_1dholX@shadow.com','s_1EpLlt@shadow.com') and temp2.create_time like '%%%%%s%%%%' "%(numtime))
......
......@@ -106,8 +106,8 @@ def time_conv(numtime):
return None
def get_commnet_id(numtime):
db = pymysql.connect(host="rm-2ze5k2we69904787l.mysql.rds.aliyuncs.com", user='work', passwd='Gengmei123',
db = pymysql.connect(host="rm-2zej7rzxnj036zxt3.mysql.rds.aliyuncs.com", user='work',
passwd='oars152!traipseize738',
db="alpha", port=3306)
cursor = db.cursor()
......
......@@ -107,7 +107,8 @@ def time_conv(numtime):
def get_data(numtime):
try:
db = pymysql.connect(host="rm-2ze5k2we69904787l.mysql.rds.aliyuncs.com", user='work', passwd='Gengmei123',
db = pymysql.connect(host="rm-2zej7rzxnj036zxt3.mysql.rds.aliyuncs.com", user='work',
passwd='oars152!traipseize738',
db="alpha", port=3306)
cursor = db.cursor()
cursor.execute("select user_id from account_user_auth where user_id not in (select user_id from pv_maidian where page_name ='home' and partiton_date >= %s )" ,(numtime))
......
......@@ -106,7 +106,8 @@ def time_conv(numtime):
def get_data(numtime):
try:
db = pymysql.connect(host="rm-2ze5k2we69904787l.mysql.rds.aliyuncs.com", user='work', passwd='Gengmei123',
db = pymysql.connect(host="rm-2zej7rzxnj036zxt3.mysql.rds.aliyuncs.com", user='work',
passwd='oars152!traipseize738',
db="alpha", port=3306)
cursor = db.cursor()
cursor.execute("select user_id from pv_maidian where page_name ='home' and partiton_date like '%%%%%s%%%%' " % numtime)
......
......@@ -130,7 +130,8 @@ def time_conv(numtime):
def get_star_user_id(numtime):
try:
db = pymysql.connect(host="rm-2ze5k2we69904787l.mysql.rds.aliyuncs.com", user='work', passwd='Gengmei123',
db = pymysql.connect(host="rm-2zej7rzxnj036zxt3.mysql.rds.aliyuncs.com", user='work',
passwd='oars152!traipseize738',
db="alpha", port=3306)
cursor = db.cursor()
cursor.execute(
......@@ -146,7 +147,8 @@ def get_star_user_id(numtime):
def get_star_topic_id(numtime):
try:
db = pymysql.connect(host="rm-2ze5k2we69904787l.mysql.rds.aliyuncs.com", user='work', passwd='Gengmei123',
db = pymysql.connect(host="rm-2zej7rzxnj036zxt3.mysql.rds.aliyuncs.com", user='work',
passwd='oars152!traipseize738',
db="alpha", port=3306)
cursor = db.cursor()
cursor.execute(
......
......@@ -110,7 +110,8 @@ def time_conv(numtime):
def get_star_useid(numtime):
try:
db = pymysql.connect(host="rm-2ze5k2we69904787l.mysql.rds.aliyuncs.com", user='work', passwd='Gengmei123',
db = pymysql.connect(host="rm-2zej7rzxnj036zxt3.mysql.rds.aliyuncs.com", user='work',
passwd='oars152!traipseize738',
db="alpha", port=3306)
cursor = db.cursor()
cursor.execute(
......
......@@ -108,7 +108,8 @@ def time_conv(numtime):
def get_data(numtime):
try:
db = pymysql.connect(host="rm-2ze5k2we69904787l.mysql.rds.aliyuncs.com", user='work', passwd='Gengmei123',
db = pymysql.connect(host="rm-2zej7rzxnj036zxt3.mysql.rds.aliyuncs.com", user='work',
passwd='oars152!traipseize738',
db="alpha", port=3306)
cursor = db.cursor()
cursor.execute("SELECT distinct(user_id) FROM topic WHERE is_online=1 and create_time LIKE '%%%%%s%%%%'" % numtime)
......@@ -124,7 +125,8 @@ def get_data(numtime):
def get_star_useid(numtime):
try:
db = pymysql.connect(host="rm-2ze5k2we69904787l.mysql.rds.aliyuncs.com", user='work', passwd='Gengmei123',
db = pymysql.connect(host="rm-2zej7rzxnj036zxt3.mysql.rds.aliyuncs.com", user='work',
passwd='oars152!traipseize738',
db="alpha", port=3306)
cursor = db.cursor()
cursor.execute(
......
......@@ -107,7 +107,8 @@ def time_conv(numtime):
def get_data(numtime):
try:
db = pymysql.connect(host="rm-2ze5k2we69904787l.mysql.rds.aliyuncs.com", user='work', passwd='Gengmei123',
db = pymysql.connect(host="rm-2zej7rzxnj036zxt3.mysql.rds.aliyuncs.com", user='work',
passwd='oars152!traipseize738',
db="alpha", port=3306)
cursor = db.cursor()
cursor.execute("select user_id from account_user_auth where user_id not in (select user_id from pv_maidian where page_name ='home' and partiton_date >= %s) ", (numtime))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment