I. Connecting to MySQL Server
# Connect to the database and call the Connect function (the Connect function returns an object of Connection)
conn = pymysql.Connect(host='localhost', #Host ip
user='user', #User name
Posted on Thu, 03 Oct 2019 15:28:03 -0400 by phpdood
Define variable items
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
cd packages / enter tar storage ...
Posted on Thu, 03 Oct 2019 13:55:21 -0400 by waylon999
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.
Development software pycharm
First create the project sams (Server assets management s ...
Posted on Thu, 03 Oct 2019 11:41:39 -0400 by alexjb
Installed environments nginx, Python 3, mysql, uwsgi, virtualenv
1. Create a virtual environment
virtualenv -p python3 myblog
2. Enter the Virtual Environment
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
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
1. Refer to Flink to write mysql
2. New batch write function
<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
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
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)
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 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
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
2. Link to the database. Here we use a dictionary to receive it.
Posted on Wed, 02 Oct 2019 09:46:37 -0400 by Tomatron