One, data type
1. Integral type
Data type storage space description range of values
TINYINT1 byte very small integer with symbolic value: -128~127
Unsigned value: 0~255
SMALLINT2 byte small integer with symbolic value: -32768~32767
Unsigned
Fix it: My actual operation under Windows is as follows1. Close the running MySQL.2. Open the DOS window and go to the Mysql\bin directory.3. Enter mysqld-nt--skip-grant-tables carriage return. If you don't get a hint, that's it. 4. Open a DOS
*innodb_buffer_pool_size
If you use InnoDB, then this is an important variable. Compared to MyISAM, InnoDB is more sensitive to buffer size. Mysiam may also be fine with the default key_buffer_size for large amounts of data, but InnoDB feel like
The important thing is the above mentioned:
INSERT ... SELECT
INSERT ... On DUPLICATE KEY UPDATE
INSERT ... On DUPLICATE REPLACE
For example, to insert a piece of data into a table, if the table does not have that data inserted, if the data
1 installation. MySQL is installed in the/usr/local/mysql directory.
The code is as follows
Copy Code
Yum-y Install Perl PERL-DBIwget http://file.111cn.net/upload/2013/12/DBD-mysql-3.0002.tar.gzTar zxvf
CVS file import mysql database command:
The code is as follows
Copy Code
Set names UTF8;LOAD DATA local INFILE ' c:\\resource.csv 'into TABLE ResourceFIELDS terminated by ""LINES terminated by ' \ r \ n '(Title,singer);
1, into the MySQL directory under the Bin folder: cd MySQL to the Bin folder directory
As I entered the command line: CD C:/Program files/mysql/mysql Server 4.1/bin
(or add the directory directly to the environment variable path of Windows)2,
Reinstall Easy_install (Setuptools)1, to download Https://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11-py2.7.egg
2, to the terminal to perform sudo sh setuptools-0.6c11-py2.7.egg
3, clear the download Setuptools-0.6c11-py2.7.egg
First, preparatory work
1, respectively in master and slave implementation of the following, convenient MHA check replication:Grant all privileges in *.* to ' root ' @ ' 10.1.1.231 ' identified by ' rootpass ';Grant all privileges in *.* to ' root '
The Binlog log is used to record all statements that have updated the data or have potentially updated the data. Statement is saved as an "event," which describes the data changes. When we cause the database to fail for some reason, we can use the
A CENTOS6+NGINX+MYSQL+PHP-FPM environment was installed in the virtual machine yesterday, recording the installation process. CENTOS6 recommends installing in a netinstall manner, installing a minimized server, and configuring the site environment,
Use root from any host, password: youpassword (your root password) to connect to the MySQL server:
# mysql-u Root-prootMysql>grant all privileges in *.* to ' root ' @ '% ' identified by ' Youpassword ' with GRANT OPTION;Allow the address 202.11.10.2
The typical page-level representative engine is BDB.The typical representative engine for the table level is myisam,memory and ISAM, a long time ago.The typical line-level representative engine is InnoDB.
Many operations are read tables.Read and
The syntax for explain is as follows:
Explain [extended] select ... from ... where ...
If you use extended, you can use the show warnings statement to query the appropriate optimization information after you finish executing the explain statement.
MySQL Tutorial Database Tutorials How to connect the mysql_connect() function
Definitions and usageThe mysql_connect () function opens a non-persistent MySQL connection.
GrammarMysql_connect (Server,user,pwd,newlink,clientflag)
Resource
This tutorial to talk about the MySQL Tutorial view query and delete Oh, query view with the show view name, delete the MySQL view with drop is also very simple, but delete the view to have drop permission to do. Now let's look at the view
View the
Process with analyze and deal with them on a regular basis
ANALYZE [Local | No_write_to_binlog] TABLE tb1_name[, Tbl_name] ...
Define Tables Analyze Table table_name
CHECK TABLE Tb1_name[,tbl_name] ... [option]...option = {QUICK | FAST | MEDIUM |
MySQL password We do not often modify, but sometimes we will forget the password needs to be modified, but also change the password for their own easier to remember! Here are two ways to change the MySQL password
Method One:
This method
This is why I transferred my website from one server to another. Let's take a look at the reason.Find the confing. inc. Php file.// [CH] modify the following variables based on the account parameters provided by the space provider. If you have any
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