Today in doing experiments using MySQL database, the user password forgotten, let me also looking for a half-day: now to introduce my own method: the use of MySQL itself to test the function.
Copy Code code as follows:
Mysql> select
Installed a 5.5 version of MySQL, the character set appears to be a problem, the previous MySQL server is through the MY.CNF configuration file in the configuration can be, but today how do not always error:
There was also no error log configured
Today, I saw a very representative of the optimization case, here is a note to make a mark, to commemorate the casual field definition of the problem.
Recall that in the design of the table many people used to design the structure of the table into
Cat/dev/urandom | Lc_all=c TR-DC "[: Alnum:]" | Fold-w |head-10
Si1n9kuyuzDdzsrxfgxaCadrbrt4pxBugk6lkx4dN5xod1toyr1645cBxAjlKrjwjr2txuNhQedXagL9RradezgfhyQxcurm5ezf
Parameter description:
If you need a particularly complex password, try
Before tuning:
Select COUNT (t.id) from Test t where T.status = 1 and T.id not in (select distinct a.app_id from Test2 a where A.type = 1 and a.rule_id in (152, 153, 154)) 17:20:57 laojiu> @plan PLAN_TABLE_OUTP UT ————————————————————————————
To display a database or table:
Copy Code code as follows:
Show databases;//can then use database_name;
Show tables;
Change table name:
Copy Code code as follows:
ALTER TABLE table_name rename new_t;
This paper illustrates the method of Php+mysql to realize the column without limit classification. Share to everyone for your reference, specific as follows:
A very simple and simple example of No limit classification, with indentation effect, just
MySQL's date function. Current date in Example:Curdate () is June 24, 2013.Year (): Show yearsMysql> Select Year (Curdate ()); +-----------------+ | Year (Curdate ()) | +-----------------+ | 2013 | +-----------------+ 1 row in Set (0.01 sec)MONTH ():
What is a collection operation?
Generally, a join operation is considered a horizontal operation between tables because the operation generates a virtual table that contains columns from two tables. And I've summarized the set operations here, and
First, the installation of MySQL
Running the MySQL installer (mysql-essential-5.1.40-win32.msi)
Select Install type is Custom
Click the Change button to modify the installation directory
Change installation directory to D disk (can be
(Reference self >)Suppose there is such a requirement: Write a union query whose first subquery executes as a branch, and if a matching row is found, the second branch of the query is no longer executed.
In general, we can write a union query like
Copy Code code as follows:
SELECT * FROM _test a LEFT join _test B on a.id=b.id where a.level= ' and a.month= ' and b.level= ' 03 ' ;
Select a.*,b.* from (SELECT * to _test where level= ' and month= ') as a LEFT join (SELECT * from _test
Reason Analysis:
The reason that MySQL cannot create an automatically incremented field is that it adds several sql_mode to the Server SQL Mode in the MySQL5.0.2 version, and that the Sql-mode in the SQL My.ini file adds two of them by default. One
Today's classmate asked me about this SQL statement, I deliberately remember, after all, this is also more common
Copy Code code as follows:
SELECT * FROM Member_payment
ORDER BY id DESC] T GROUP by member_id limit 10
The
Indexes do not always take effect, such as the following situations, which will result in index invalidation:
If there is an or in the condition, it will not be used even if there is a conditional index (which is why the use of or is as little as
If you use varchar stubbornly every time you build a datasheet, you may experience the following problems:
Now the Saleusername field type is varchar (50)
Update Tablenameset saleusername= ' Xiao Qin wish you ⑭ happy ' where id=87
SELECT * FROM
Problem Description:
Ordinary desktop, collect data, the table already has >1000 million data quantity.
The data collected is slow to insert into the table, 100 milliseconds per treaty.
Workaround:
1, enlarge the MySQL configuration in the
One day, two people do not know the MySQL kernel to understand the MySQL kernel code, two people are not to debug the code, find information, but over there to think. Because you do not understand the kernel, so think side to verify.The MySQL code
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