Python 3 operates MySQL database
Operating MySQL database in Python 3
To use mysql database in Python 3, you need to install the mysql Library
pip install pymysql
Operating MySQL
Guide bag
import pymysql
Step 1: open the database connection
db = pymysql.connect(host="Database address",
user="user name",
password="Password",
...
Posted by kks_krishna on Fri, 20 Dec 2019 06:16:01 -0800
Source Installation for Mysql8.0
The 8.0 version of Mysql has been around for some time. Under recent research, the first step is to install and deploy it. Here is the source installation process.
1. Environmental Preparation
OS: CentOS 7.4 DB: Mysql 8.0.18 Hardware: 40G or more space, 4G or more memory
2. Environmental Preparation
1. Download Files
Download mysql-boos ...
Posted by ahmedkl on Thu, 19 Dec 2019 17:59:18 -0800
LNMP memcached front end data cache and session session retention
Article directory
1, memcached front end data cache
1. Test the lnmp environment.
2. Download and install memcache
3. Modify php.ini configuration file
4. Restart nginx and php
5. Write php connection memcached test
2, memcached for web session retention
1. Modify the configuration file (all web environments)
2. restart
...
Posted by mostwantedunm on Thu, 19 Dec 2019 13:51:19 -0800
mysql -- implementation of multiple instances based on yum source
Implement multiple instances based on yum source
This experiment implements three examples, using port 330633073308 respectively
1. Install MariaDB server, yum
#yum install mariadb-server
2. Create a directory for each instance
#mkdir /data/mysql/{3306,3307,3308}/{etc,data,socket,log,bin,pid} -pv
3. Permission to modify ...
Posted by NottaGuru on Thu, 19 Dec 2019 11:01:25 -0800
Multi instance implementation of mysql database under Linux
Preparation environment:
centos7 install Yum install MariaDB server
Plan and implement the directory structure of multiple instances
Port: 33063307, 3308
The folder where each instance stores the database / data / MySQL {330633073308}
/data/mysql/3306/{etc,soket,log,data,pid,bin}
Create the data folder required by mysql u ...
Posted by coco777 on Wed, 18 Dec 2019 08:55:32 -0800
Docker data persistence
I. Introduction
When we use Docker to create a mysql container, the data is stored in the containerIf you accidentally execute docker rm $(docker ps -aq) to delete all container s one day, the data in mysql will also be deleted, which is not safeWe need to persist the data and store it outside the container. Even deleting the container will no ...
Posted by ryanh_106 on Wed, 18 Dec 2019 08:16:59 -0800
kratos micro service framework learning note 1 (kratos demo)
catalog
kratos micro service framework learning note 1 (kratos demo)
kratos Ontology
demo
kratos micro service framework learning note 1 (kratos demo)
Most of the time this year has passed. It's not much more extensive and github. Now the development task is almost completed, which will be easi ...
Posted by ari_aaron on Wed, 18 Dec 2019 03:43:44 -0800
LNMP environment building (PHP7.2.25)
catalog
preparation
Install wget
Install net tools
Install vim
Configure display line number
Turn off firewall
Install Nginx
Installation dependency
Compile and install Nginx
Configure environment variables
Systemd management
Instal ...
Posted by cheekychop on Wed, 18 Dec 2019 00:06:50 -0800
Notes on count function and sum function in mysql
Aggregate function
Aggregate function is a function used for vertical operation:
COUNT(): count the number of record rows whose specified column is not NULL;
SUM(): calculates the sum of values of the specified column. If the specified column type is not a numeric type, the calculation result is 0;
An expression cannot ...
Posted by Tchelo on Tue, 17 Dec 2019 14:20:45 -0800
Preliminary Practice of Using helm-v3, a Native Microservice Management Tool for k8s
Helm-v3 Application Package Manager
3.1 Why do I need Helm?The application objects on K8S consist of specific resource descriptions, including deployment, service, and so on.Save each file or write it together to a configuration file.Then deploy kubectl apply-f.
Why use helm?In k8s, when we deploy applications, we usually use yaml files to man ...
Posted by jeev on Tue, 17 Dec 2019 12:26:57 -0800