import pymysql
from pymysql import Error
def create_table(connection):
create_table_sql = """
CREATE TABLE IF NOT EXISTS `auth_group_permissions` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`group_id` INT(11) NOT NULL,
`permission_id` INT(11) NOT NULL,
PRIMARY KEY (`id`),
CONSTRAINT `auth_group_permissions_group_id_permission_id_0cd325b0_uniq` UNIQUE KEY (`group_id`, `permission_id`),
CONSTRAINT `auth_group_permissions_group_id_b120cbf9_fk_auth_group_id` FOREIGN KEY (`group_id`) REFERENCES `auth_group` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
CONSTRAINT `auth_group_permissio_permission_id_84c5c92e_fk_auth_perm` FOREIGN KEY (`permission_id`) REFERENCES `auth_permission` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
"""
try:
with connection.cursor() as cursor:
cursor.execute(create_table_sql)
connection.commit()
print("Table created successfully")
except Error as e:
print(f"Error: '{e}' occurred")
connection.rollback()
def main():
connection_config_dict = {
'host': '172.23.119.14',
'port': 2883,
'user': 'cap@AIPro_test#obtest00',
'password': 'capCAP12!@',
'database': 'ai_admin',
}
try:
connection = pymysql.connect(**connection_config_dict)
print("Connected to MySQL database 'ai_admin'")
create_table(connection)
except Error as e:
print(f"Error: '{e}' occurred")
finally:
connection.close()
print("MySQL connection is closed")
if name == "__main__":
main()
16 条评论
《十方武圣》国产动漫高清在线免费观看:https://www.jgz518.com/xingkong/12479.html
《颜色》剧情片高清在线免费观看:https://www.jgz518.com/xingkong/124789.html
《似曾相识》喜剧片高清在线免费观看:https://www.jgz518.com/xingkong/50952.html
你的才华让人惊叹,你是我的榜样。 https://www.4006400989.com/qyvideo/45438.html
你的才华让人惊叹,你是我的榜样。 https://www.yonboz.com/video/70710.html
《凌晨四点》欧美剧高清在线免费观看:https://www.jgz518.com/xingkong/149561.html
你的文章充满了创意,真是让人惊喜。 https://www.yonboz.com/video/40112.html
你的才华让人惊叹,你是我的榜样。 https://www.4006400989.com/qyvideo/58748.html
jinjinpeng.com
你的文章让我感受到了快乐,每天都要来看一看。 https://www.yonboz.com/video/69859.html
《档案X杀人犯》动作片高清在线免费观看:https://www.jgz518.com/xingkong/47376.html
你的文章让我感受到了快乐,每天都要来看一看。 https://www.yonboz.com/video/69859.html
《反诈风暴之情爱迷局》剧情片高清在线免费观看:https://www.jgz518.com/xingkong/66627.html
文章的确不错啊https://www.cscnn.com/
看的我热血沸腾啊www.jiwenlaw.com
叼茂SEO.bfbikes.com