/*************************************** ******************************* Author: Samson* Date: 04/01/2014* Test platform:* Linux ubuntu 3.2.0-58-generic-pae* GNU bash, version 4.2.39**************************************** ***************************
MySQL is a very popular small relational database management system. Currently, MySQL is widely used in small and medium websites on the Internet. Because of its small size, fast speed, and low total cost of ownership, especially the open source
MySQL logical architecture:
Concurrency Control: Implemented by locks
Read locks: Also known as shared locks. Read locks do not block each other. After A locks the table, A, B, c, and d can read the table but cannot write it.
Write lock: Also called
This is the first article about SQL optimization.
Here, I mainly express my point of view that if an index does not exist, it should be eliminated, leaving it in the way.
During the period from 15:39:01 to 15:55:00, we found two problems in a
Fault status: the php website fails to connect to mysql. However, you can use the mysql command in the command line to log on and operate normally.Solution:1. log on to mysql under the command line and execute the following command:Copy codeThe Code
Keyword: MySQL 5.6.17 phpmyadmin
[Download MySQL]MySQL Community Server MySQL Community edition free of charge
Note: oracle Account Login and download are required
[Install MySQL]1、unzip mysql-5.6.17-winx64.zip to the d: \ Program Files \ mysql \
If you forget the MySQL root Password, You can reset it using the following methods:
1. KILL the MySQL process in the system;
2. Run the following command to start MySQL without checking its permissions;
Mysqld_safe-skip-grant-tables &
3. Use
In mysql, If we select to directly use in command mode and switch to the database, we can select mysql_select_db for data in php. I will introduce it below.
From the command prompt, select MySQL database:
This is very easy to choose a specific
1. Aggregate functions
Aggregate functions are functions that run on a row group to calculate and return a single value.
SQL Aggregate functions
Function
Description
AVG ()
Returns the average value of a column.
This is the third article on MySQL SQL optimization. A company's business system frequently throws a problematic SQL statement. We have made fundamental statistics on such SQL statements:
These SQL statements have been executed for 12 times
In the past few days, I will share and summarize some SQL experience optimized in the past few days. The first thing to share is to optimize the limit page for MyISAM. Background: A business system provided by the company to crawlers to capture data.
There are two major steps to enable the MySQL remote login account:
1. Check whether the firewall on the server does not block port 3306.
The default port of MySQL is 3306. Make sure that the firewall does not block port 3306. Otherwise, the remote
Table Partitioning can be performed in two ways::
: Place data rows in two independent tables based on the values of one or more columns of data.Horizontal segmentation usually uses a large table in the following situations. After segmentation, the
Here, the blog simply aims to extract some common mysql operations. If you already understand this, you can ignore it. Thank you.Basic mysql operations
1. query mysql version and current time information
Select version (), current_date,
1. Fields
Fields are similar to column meanings. Database columns are generally called columns, and fields are generally calculated fields.2. Splice Fields
Join -- connect values together to form a single value
Concat () function
SELECT Concat
When updating a table using mysql workbench, the following exception is reported:
Error Code: 1175. To disable safe mode, toggle the option in Preferences-> SQL Editor-> Query Editor and reconnect.
You are using safe update mode and you tried to
Use CMD to log on to SQLPLUS
C: \ Users \ Administrator> sqlplus/nolog
SQL> conn sys/pwd as sysdba;
Import and export a database (Source Network ):
1. Export the database TEST completely, and the username system Password manager is exported to D: \
1. Fields
Fields are similar to column meanings. Database columns are generally called columns, and fields are generally calculated fields.
2. Splice Fields
Join -- connect values together to form a single value
Concat () function
?
We know that in SQL, we can use the like predicate (expression) for fuzzy search, and support % ,?, _ And Other placeholders.However, the fuzzy search function has many restrictions, which are too vague.In MySQL, The REGEXP keyword is provided to
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