The use of pymysql module

I. Connecting to MySQL Server import pymysql # Connect to the database and call the Connect function (the Connect function returns an object of Connection) conn = pymysql.Connect(host='localhost', #Host ip port=3306, #port user='user', #User name ...

Posted on Thu, 03 Oct 2019 15:28:03 -0400 by phpdood

Binary installation mysql script

Article directory Define variable items #!/bin/bash directory=/usr/local defines tar package decompression directory storage=/opt/data define database storage directory Curdate=$(date'+%Y%m%d%H%M%S') defines the variable of acquisition time decompression cd packages / enter tar storage ...

Posted on Thu, 03 Oct 2019 13:55:21 -0400 by waylon999

django builds an asset management system 2. login system

Most of this article is copied from http://liujiangblog.com/course/django/102, stealth! Idea: First create the project locally, then transplant it to the Server. The local environment is as same as the Server environment as possible. python3.6 django2.2.0 Development software pycharm First create the project sams (Server assets management s ...

Posted on Thu, 03 Oct 2019 11:41:39 -0400 by alexjb

centos server deploys flask project.

Installed environments nginx, Python 3, mysql, uwsgi, virtualenv 1. Create a virtual environment virtualenv -p python3 myblog 2. Enter the Virtual Environment source myblog/bin/activate 3. Install flask and uwsgi in virtual environment pip install flask pip install uwsgi 4. Configure uwsgi, create the configuration file uwsg ...

Posted on Thu, 03 Oct 2019 10:08:07 -0400 by A3aan

Mysql Specifies Partial Data Synchronization

I. Demand Background A friend's company needs to synchronize part of the data from the source to the target at regular intervals every day. There are tables of company_id column in the library, which only import the specified company_id column into the target database; there are tables of company_id column, which import all the data from the t ...

Posted on Thu, 03 Oct 2019 04:48:46 -0400 by aaronhall

Flink batch writing mysql

1. Refer to Flink to write mysql https://blog.csdn.net/weixin_43291055/article/details/100972694 2. New batch write function xml <insert id="insertBatch" parameterType="java.util.List"> insert into sku_info (sku,num) values <foreach collection="list" item="info" index="index" sep ...

Posted on Thu, 03 Oct 2019 03:58:40 -0400 by Highlander

Set the Mysql character set to UTF-8 to solve Chinese garbled.

Article directory When the public number is developed, the user nickname is garbled. The result of the investigation is the encoding problem of the default character set of the Mysql database. To solve the Chinese garbled, the default character set must be set to UTF-8. Login to mysql and view the c ...

Posted on Thu, 03 Oct 2019 02:33:04 -0400 by rdbdba

MYSQL Initial Operations and Conventional DML, DDL, DQL Use

Refresh privileges to refresh certain privileges from hard disk to memory (implicit refresh privilege operation with root password modification) mysql> flush privileges; Query OK, 0 rows affected (0.00 sec) mysql> View Service Port mysql> show variables like 'port'; +---------------+-------+ | Variable_name | Value | +-- ...

Posted on Wed, 02 Oct 2019 22:17:11 -0400 by bing_crosby

EF Data Migration

  EF automatic data migration is always a failure. At the beginning, it is all right. It can migrate automatically and fail to know why it always fails. I can only move it manually. ----------------------------------------------------------------------------- This time, attributes are added to a ...

Posted on Wed, 02 Oct 2019 18:30:21 -0400 by metalblend

python interacts with database mysql

Operate mysql through pycharm's concise code block to help us understand The concrete steps can be divided into five steps. 1. Install and install the pymysql Library pip install pymysql Import pymysql Library import pymysql 2. Link to the database. Here we use a dictionary to receive it. db_conf ...

Posted on Wed, 02 Oct 2019 09:46:37 -0400 by Tomatron