At the beginning of the study, Baidu to check, but found a lot of said too complex and difficult to understand, combined with each article summed up (suggest probably read the text, do not understand it does not matter, then look at the diagram of
Below we use MYSQLDB to implement and operate the MySQL database.#!/usr/bin/env python#-*-coding:utf-8-*-import mysqldbdef connetmysql (): Conn=mysqldb.connect (user= "admin", Passwd= "123456", host= "XXX", db= "test") cursor = Conn.cursor ()
MySQL binary log is often said to be the Bin-log, is the MySQL implementation of the changes produced by the binary logging file, its main role is two:* Data reply* Master-slave database. For the slave side to perform additions and deletions to
Process of using the database:1. Registration drive;2. Use the Drivermanager.getconnection method to obtain the Connection object con;A method:3. Use the Createstatement () method of the Connection object to get the object stmt that can execute the
Delete from table name ; TRUNCATE TABLE Table name ; not with where of the parameter Delete statement can be deleted MySQL all the contents of the table, using TRUNCATE TABLE can also be emptied MySQL all the contents of the table. Efficiency
Colloquial business : refers to a set of operations that are either executed successfully or not executed .----> atomicity Other sessions are not able to see the process of intermediate changes until all operations have been completed--
MySQL Backup and Bin-log logsBackup data: Mysqldimp-uroot-p test-l-F '/tmp/test.sql '-L Read lock-F that is flush logs, you can regenerate the log files, including, of course, log-bin logs.View Bin-log logs with mysql>show master status;Clear table
The home computer uses the Linux operating system, the recently collected data needs to be stored to MySQL, originally uses the web.py the time to use the MySQL is all normal, results now directly uses the MYSQLDB to connect the database the
http://zhangzhaoaaa.iteye.com/blog/1689412 reference: "MySQL Technology insider SQL Programming"SELECT DISTINCT From lefttablejoin On WhereGroup Bywith{cube| ROLLUP}HavingOrder byLimitProcessing order
From
On
Join
where
GROUP BY
1, installation Nodejs2. Install MySQL NPM packageAddress: Https://github.com/felixge/node-mysqlNPM install MySQL3, the corresponding API view and call:var mysql = require (' mysql '); var connection = mysql.createconnection ({ host '
Create a new user under 1,mysqlGrammar:1.create user username identified by ' password ';Example: Create user Xiaogang identified by ' 123456 ';The newly created user, by default, does not have any permissions.2. How to assign permissions to
http://www.jzxue.com/shujuku/mysql/201109/06-8742.html MySQL The syntax for establishing foreign KEY constraints is too obscure to understand, and has to write down notes.1. Create a foreign key when building a tableCREATE TABLE table_s ( ' id '
Syntax Description:Way One:Case value when [compare_value] and then result [when [compare_value] then result ...] [ELSE result] ENDWay two:case is [condition] then result [when [condition] then result ...] [ELSE result] ENDUse the Demo sample:Mysql>
http://hi.baidu.com/wylinux/item/cbc458c2984381300831c651 View Index CommandsMysql> Show index from Tblname;Mysql> show keys from Tblname;· TableThe name of the table.· Non_unique0 if the index cannot include a repeating word. 1 if it is possible.·
http://blog.chinaacc.com/garfiled606/blog/20100119-1909060539272.html Client connections:Go to command line, Windows cmd, connect:Mysql-u User name-p password-H server IP address-P server-side MySQL port number-D database nameAttention:(1) Server
Optimization of MySQL Databases on VPS hosts
Overview:Configure the mysql database on the linux vps host. Because the InnoDB engine is started using the database installed in yum by default, ITS/etc/my. cnf configuration is not very suitable for our
MySQL floating point representation
MySQL floating-point and fixed-point types can be expressed by the type name plus (M, D). M indicates the total length of the value, and D indicates the length after the decimal point, M and D are also called
MySQL Database Study Notes (12) ---- use of the open-source tool DbUtils (Database addition, deletion, modification, and query), mysqldbutils
[Statement]
Reprinted, but keep the original source of the article → _ →
Life One:
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service