Open Mysql.exe1. Select database ();2. Status;3. Show Table;4. Show databases;5. Use DatabaseName;6. Show Colomns from Tabename;7. Drop database databaseName;8. Back up the database:Mysqldump-u User name (root user)-p password databaseName >
Reference "MySQL database development, optimization and management Maintenance", the main purpose is to remember important content and study notesQuery status statement: Show [Session|global] status, default is session.Com_xxx represents the number
SQL: Structured Query LanguageSub-query:
Subqueries are nested inside a query and must always appear inside parentheses
A subquery can contain multiple keywords or conditions, such as distinct, GROUP by, ORDER by, LIMIT, function, and so on.
Index type: Primary key index, unique index, federated Index, normal index, full-text index1. After indexing on a column, if you are using a like query, the percent semicolon is not indexed on the left. such as select a from t where BB like '%hehe ';
Long time no write.1:show columns from table, the same as describe table shows the structure of the table. The SELECT * FROM table displays the data inserted in the entire table.2:select distinct c1,c2 from table unless the columns are different,
First check to see if an older version of the installation package is already installedInput Rpm-qa | grep mysql*We found 4 installation files in there.Now we're one by one deleteEnter the following commandRpm-e mysql-connector-odbc-5.1.5r1144-7.el6.
The following parameters are used in mysql-5.6.27, and may not be the same as the MySQL version.1. Thread ParametersInnodb_read_io_threads=6--INNODB Storage Engine reads the number of threads for the client to read data, the default value is 4Innodb_
MySQL failure:[Email protected]_m ~]#/etc/init.d/mysqld restartStarting MySQL ..... error! Manager of Pid-file quit without updating file.[[Email Protected]_m ~]#Possible one:The Basedir and DataDir directories in the boot profile/etc/init.d/mysqld
A data table (or table) is one of the most important components of a database and is the basis for other objects.Relational database is actually a two-dimensional table, more rigorous refers to the data table, two-dimensional table row called
In the process of database porting, the problem of recursive query to tree is encountered.In SQL Server, it is easy to implement. Such as: with Tree as (SELECTfrom asWHERE=@EnergyItemCodeUNIONall SELECTfrom asINNERJOINon= Tree.f_energyitemcode)and
constraints:
The constraint is to ensure the integrity and consistency of the data.
Constraints are table-level constraints and column-level constraints
Constraints are used only for a single field, called Column-level
I. Type of indexB-tree Index:B-tree usually means that later values are stored sequentially, and each leaf page is the same distance from the root.B-tree indexed columns are stored sequentially, so it's good to look for range data.The B-tree index
MySQL string intercept1. Intercept string from leftLeft (str,length) truncated field, intercept lengthSelect Left (' admin1213 ', 5) from table2, starting from the right to intercept the stringRight (str,length) truncated field, intercept
In such as Peng Online see how to connect MySQL with C, solved the sophomore has been confused, exultation!First step DownloadInstalled database is like Peng Network Mysql:http://pan.baidu.com/s/1c0m3xiw extract code: M9SN)Save in My network disk
80 mid-year marriage four pieces: watches, bicycles, sewing machine, radio (three Turn One Ring). It takes four things to get a business home, so the business is mean (ACID), four-piece list: atomicity ( Atom), consistency (Consistent), Isolation
Modified via MySQL command line:Set Character_set_client=utf8;Set Character_set_connection=utf8;
Set Character_set_database=utf8;Set Character_set_results=utf8;Set Character_set_server=utf8;Set Character_set_system=utf8;Set Collation_connection=utf8
Mysql Description of space type:MySQL supports spatial expansion, allowing the generation, preservation, and analysis of geographic features. These features are available for the MyISAM, InnoDB, NDB, BDB, and archive tables (however, the archive
1, calculate the distance formula is long (on-line search), build a MySQL function: Delimiter $ $CREATE FUNCTION fun_jw_dist (lng1 double (15,9), LAT1 double (9), Lng2 double (15,9), Lat2 double (15,9)) RETURNS double (15,9) BEGIN DECLARE Dist
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.