MySQL as the most commonly used database, often encountered a variety of problems. What we're going to say today is the changes to the table storage engine. There are three ways, the list is as follows.
1. True connection modification. It is slower
For MySQL databases, you must use the InnoDB engine if you want to use transactions and row-level locks. If you want to use Full-text indexing, you must use MyISAM. InnoDB's practicality, security, stability is higher but the efficiency than myisam
Modify Password:
Copy Code code as follows:
Select Database
Use MySQL;
Modify password
Update user set Password=password (' New password ') where user= ' root ';
Take effect immediately
Flush Privileges
Forget administrator
Features of several common storage engines
Here we focus on several common storage engines and compare the differences between each storage engine and how they are recommended for use.
features
Myisam
BDB
Memory
InnoDB
Fristpinyin: This function converts the first character of a Chinese string into a pinyin (for example, "Chinese"->z)
Copy Code code as follows:
CREATE FUNCTION ' Fristpinyin ' (p_name VARCHAR (255)) RETURNS VARCHAR (255) CHARSET UTF8
A stored procedure is a collection of user-defined sets of SQL statements that involve tasks for a particular table or other object, and a user can invoke a stored procedure, which is usually a method defined by the database, receives parameters and
Just at the beginning, according to my idea, this is very simple, on the SQL statement
Delete from ZQZRDP where is tel in (select min (dpxx_id) from ZQZRDP GROUP BY Tel has count (tel) >1);
Execute, Error!! ~! ~
The exception means:
Table_cache is a very important MySQL performance parameter, which is called Table_open_cache in the 5.1.3 version. Table_cache is primarily used to set the number of table caches. Because each client connection accesses at least one table, the
For large web sites such as Facebook,ebay, if there is no memcache as an intermediate cache layer, data access is not possible do, for the general web site, as long as the independent server, can be configured memcache improve the speed of Web site
The mysql max_connections parameter is used to set the maximum number of connections (users). Each user connected to MySQL counts as a connection, and the default value of Max_connections is 100. This article will explain the detailed action and
Programme I:
1. Enter the:mysql> state
2. Choose MySQL database:mysql> use MySQL;
3. Change user table Data:mysql> Update user set Password=password (' New password ') where user= ' root ';
4. Activation permission:mysql> FLUSH privileges;
5. Exit
I'll just say a few things about the MySQL database after the installation of the individual problems encountered
I have previously installed MySQL does not seem to have to start the service manually, but also forgotten, but I last to the company
Create a ViewSQL code
CREATE VIEW view_name
as SELECT t1.xxx, t2.xxx, t3.xxx from table1 T1
-INNER
JOIN table2 on t2 = T1.fid )
INNER JOIN table3 t3 on t1.mid = T3.mid;
3 table associations are used here, and there is a trick to
We know that inserts support multiple statements when inserting more than one piece of data:
Copy Code code as follows:
INSERT into T_member (ID, name, email) VALUES
(1, ' Nick ', ' nick@126.com '),
(4, ' Angel ', ' angel@163.com '
Quite a few friends who have just come in contact with MySQL have the same problem with the storage and display of milliseconds. Since the MySQL data type only provides DateTime, TIMESTAMP, Time, DATE and year of these types of times, and the
A lot of developers in the operation of the MySQL database has been a misuse of the situation, such as updating the database when the UPDATE statement forgot to add where conditions, it will cause extremely tragic results. This article in order to
This error occurred in the Web site event log:
Event Type: ErrorEvent Source: MySQLEvent Type: NoneEvent id:100Date: 2012-8-14Event: 8:07:59Users: N/AComputer: AbcserverDescribe:
Copy Code code as follows:
Cannot find or open table
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