Because the default value of the current MySQL field does not support functions, it is impossible to set the default value in the form of create_time datetime default now () . the alternative solution is to use the timestamp type instead of the
ArticleContent 1. Installation Method 2. Pay special attention to the file directory 3. Upgrade nginx and perform nginx module development
It took four days to install the lnmp development environment. As a result, the MySQL module has not
insert operation If (! Isset ($ _ post ['submit ']) { // if no form is submitted, a form is displayed. ?> country: animal name (English ): animal name (Chinese ): } else { // If a form is submitted // database connection parameters
From MySQL performance optimization and optimization:1. Minimize the total number of nested loop cycles in a join statement: A small result set is used to drive a large result set;2. Optimize the inner loop of the nested loop: that is, the number of
MyISAM uses table-level locks by default. Generally, table-level locks in Web applications can meet the requirements. InnoDB uses row-level locks by default, but it also supports table-level locks. Row-level locks are more accurate and consume the
Method 1:
In the running box, enter: Net start MySQL
Method 2:
Enter mysqld -- standalone in cmd (ensure that the bin path of MySQL is added to the environment variable of the system)
If MySQL does not use the default installation directory, the
Business scenario:The background supports online mobile phone update system, 16 gb db Server Memory, 8-core, Dell PC server.QPS:About 200TPS:1 minute or so
Sort_buffer_size = 32 m, 8 m
Read_buffer_size = 32 m, 8 m
Read_rnd_buffer_size = 16 m, 8 m
It is important to use a data volume in your program. If you already have an available MySQL server, you can use the following method in the VC to implement data migration.
1. Find the include file category under MySQL (win32) Security Program, and
Recently, many posts have been posted about garbled Chinese characters, so I also summarized them as follows:
For more information, see Yang taotao's summary of various gibberish issues.Http://topic.csdn.net/u/20071124/08/3b7eae69-ed1d-4a77-8895-9930
Check whether event is enabled
Show variables like '% sche % ';
Enable the event plan
Set global event_scheduler = 1;
Create a stored procedure Test
Create procedure Test ()
Begin
Update examinfo set endtime = now () Where id = 14;
End;
Create event
Step 1: Install apache2
@ Liang: Show Code
01
sudo apt-get install apache2
Installation is complete.Run the following command to restart the instance:
@ Liang: Show Code
01
sudo /etc/init.d/apache2
It took about half a day to learn how to use powerdesigner. When I generated an SQL statement, I found that the generated SQL statement could not be executed in MySQL, of course, MySQL is configured for my DBMS.
There is no good solution for
The following operations are tested in MySQL 5 on Windows XP
Now I have changed the storage engine MyISAM to InnoDB and renamed the encoding utf8 as an example.
1. Open the MySQL configuration file named my. ini.
Add the following content under
I. Index1. Create an index:(1). ALTER TABLEAlter table is used to create a common index, a unique index, or a primary key index.Alter table table_name add index index_name (column_list)Alter table table_name add unique (column_list)Alter table table_
0. Check the database version SQL> status;1. Net start MySQL // start the MySQL Service2. net stop MySQL // stop MySQL Service3. mysql-H host address-u user name-P User Password // enter the MySQL database4. Quit // exit MySQL5. mysqladmin-u
Back up database
# Mysqldump Database Name> Database Backup name # mysqldump-a-u username-P Password Database Name> Database Backup name # mysqldump-D-A -- add-drop-table-uroot-P> XXX. SQL
1. the exported structure does not export data
# Mysqldump --
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