I. Demand
Implement a simple Web query page with bootstrap (Ajax) + flask + MySQL. When the ID information is output, you can query for the corresponding result. The final effect figure is as follows:
Flask_mysql_query
Second, create the
Free 500MB php/mysql/ftp Personal homepage SpaceFree Space md02Model: Free PHP space 500M (MD02)Current: 999 yuan/yearOriginal Price: 0 yuan/yearContent: 500M Web Space
Support Php+mysql, complimentary 50M MYSQL, support 50 simultaneous connections,
Super Host 100M (asp-100 type) Web space 100M Database space complimentary MySQL database 20M (independent of web space) Access database free (share database size with web space) Bundle Professional Post Office √ Specification limit
Export Database command:
The following specific usage of the command line is as follows: Mysqldump-u user name-p password-d database Name table name Script name;
Mysqldump-h host Address-u user name-p password database name >sql.txt
Mysqldump-h
Recently encountered some egg pain, all the business processing to the MySQL function to deal with, resulting in the MySQL CPU usage is a tiger. SQL speech is also a language, including some processing functions for connection strings, such as
Basic concepts
Defined:
The binary log contains all the statements that have updated the data or have potentially updated the data (for example, a delete that does not match any of the rows).
Role:
1. The primary purpose of the binary log is to
1. Brief description of the restoration principleBecause of the more detailed description in the document, here is a simple description. All INNODB data is organized in an indexed manner, and all data is stored in a 16KB block of data. The recovery
Cases
The code is as follows
Copy Code
SELECT cat. ' Name ', class. ' Title 'From ' Cat ', ' class 'WHERE cat. ' id ' = class. ' Cat 'and cat. ' ID ' =2LIMIT 0, 30DELETE cat, class from Cat, Class WHERE cat. ' ID '
MySQL uses a number of different data types to break down into three broad categories: numbers, dates and times, and string types.
Numeric data type:
MySQL uses all the standard ANSI SQL numeric data types, so if you have a different database
First, unpack the kettle package1. Copy the package to the Linux systemAnd the MySQL driver pack.2, unpack the zip suffix packageInput command:unzip/software/pdi-ce-7.0.0.0-25.zipYou can delete the original package.Input command:rm-f pdi-ce-7.0.0.0-2
Backup restore or data import error 1153:got a packet bigger than ' Max_allowed_packet ' bytes problemThere are 2 ways to solve this problem:1. Temporary modification:mysql>set global max_allowed_packet=524288000; #修改 512M2. Modify MY.CNF (under
Lu Fei
Source: Dodba (Mysqlcode)
0. Guidance
This article covers almost all of the knowledge points of MySQL Replication (master-slave replication), including the Replication principle, binlog format, how to ensure data consistency
/* We sometimes encounter the need to traverse and do some operations (such as insertions) of the records s_s from the result set queried by the a table, and the data required for these operations may be partially from the s_s collection *//*
Turn from:datetime vs. timestamp in MySQLSame1. DisplayThe timestamp column is displayed in the same format as the datetime column. In other words, the display width is fixed at 19 characters, and the format is Yyyy-mm-dd HH:MM:SS.Different1.
The following commands can be used when connecting to the MySQL database remotelyMysql-h 192.168.1.104-u Root-pIf you are installing MySQL for the first time, you need to comment all the bind-address=127.0.0.1 of all configuration files in
1.mysql database, forget the root user login password.Resolved as follows:A. Reset Password#/etc/init.d/--user=mysql--skip-grant-tables--skip-networking &-u root mysqlmysql > UPDATE User SET password=password ('newpassword'where user=' Root'; MySQL>
MySQL database basic commands (favorites), mysql commands
I sorted out the basic mysql commands and shared them.
# Start, stop, and restart MySql service mysql start | stop | restart/etc/init. d/mysql restart | start | restart # connect to MySQL
SQL paging query Stored Procedure Code sharing, SQL stored procedure
For more information, see the code.
---------------------------------------- Author: Zhang Xinyu ----- time: 2013-06-28 ----- Introduction: query by parameters and conditions by
Common mysql commands and basic mysql commands
Mysql database usage Summary
This article mainly records some mysql commands for future query.
1. Change the root password
Mysqladmin-uroot password 'yourpassword'
2. remotely log on to the mysql server
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