We all know that there are two main types of MySQL Databases: one is the traditional data table format) and the other is the data table format that supports transaction processing, the following describes how to install and use MySQL for MySQL (the best combination with PHP) Transaction processing database.
Download the MySQL installation program for MySQL (the best combination with PHP) max, www. MySQL (the best combination with PHP). com
Install as usual
After installing MySQL, start MySQL (the best combination with PHP) binWinMySQL (the best combination with PHP) admin
Exit again
Run
MySQL (the best combination with PHP) binmydqld-nt -- remove
MySQL (the best combination with PHP) binMySQL (the best combination with PHP) d-max-nt -- install
The above two lines remove the MySQL (the best combination with PHP) service that does not support transaction processing, and change to the service that supports MySQL (the best combination with PHP) transaction processing.
Then, create an ibdata directory and an iblogs directory under c:. Of course, the names can be different. Remember these two names and drive letters and they will be used later. You can also choose not to create a c disk. Then, open my. ini, add at the end: the following content is the program code:
- innodb_data_file_path = ibdata1:2000M;ibdata2:2000M
- innodb_data_home_dir = c:ibdata
- set-variable = innodb_mirrored_log_groups=1
- innodb_log_group_home_dir = c:iblogs
- set-variable = innodb_log_files_in_group=3
- set-variable = innodb_log_file_size=30M
- set-variable = innodb_log_buffer_size=8M
- innodb_flush_log_at_trx_commit=1
- innodb_log_arch_dir = c:iblogs
- innodb_log_archive=0
- set-variable = innodb_buffer_pool_size=80M
- set-variable = innodb_additional_mem_pool_size=10M
- set-variable = innodb_file_io_threads=4
- set-variable = innodb_lock_wait_timeout=50
Where
- innodb_data_file_path = ibdata1:2000M;ibdata2:2000M
You can change the 200 m in this line to m, depending on the capacity of your disk. MySQL (the best combination with PHP) recommends that you use this setting for hard disk space of 10 Gb or more;
The following line
- innodb_data_home_dir = c:ibdata
You can also change it to your own directory, mainly to see where the directory you just created is
According to the above method, you have installed MySQL (the best combination with PHP) transaction database, but if you follow MySQL (the best combination with PHP) install the method in the manual and put the above section into my. if cnf is used, errors may occur.
Now, let's see if the installation is complete. Start apache (the most popular WEB server platform on Unix), or iis, and start MySQL (the best combination with PHP) in the service) open phpmyadmin and enter: SHOW variables like "have _ %"
If you see the following results, it indicates that you have successfully installed MySQL.
The following content is the program code
- Variable_nameValue
- have_bdbYES
- have_innodb YES
- have_isam YES
- have_raid NO
- have_symlink YES
- have_openssl NO
- have_query_cacheYES
-
Note: The use of MySQL (the best combination with PHP) Transaction processing methods is similar to the syntax of other databases. I will not talk about it here. In addition, mySQL (the best combination with PHP) will implement foreign keys and subqueries in MySQL 4.3. Simple Foreign keys have been implemented in MySQL 4.0, but they are not very convenient, I believe it will be better in the future.
The use of transaction tables has been successfully implemented in my online order management system. The effect is good, but it has not gone through the practice of large data volumes.
I wrote the above article based on my own practice. If you want to repost it, please indicate the source and author. You are also welcome to discuss with me about MySQL (the best combination of PHP and MySQL) transaction table Problems
The above content is an introduction to the installation of MySQL transaction database (InnoDB). I hope you will have some gains.