Home Database Mysql Tutorial 安装MySQL事务数据库需要哪些步骤?

安装MySQL事务数据库需要哪些步骤?

Jun 07, 2016 pm 04:11 PM
mysql affairs Which Install us database step need

我们大家都知道MySQL数据库主要有2种类型,一是数据表格式(传统),二是支持事务处理的数据表格式,以下我们就像大家介绍一下关于MySQL(和PHP搭配之最佳组合)事务处理数据库的安装MySQL及使用方法。 你先要去下载一下MySQL(和PHP搭配之最佳组合) max版的安

我们大家都知道MySQL数据库主要有2种类型,一是数据表格式(传统),二是支持事务处理的数据表格式,以下我们就像大家介绍一下关于MySQL(和PHP搭配之最佳组合)事务处理数据库的安装MySQL及使用方法。

你先要去下载一下MySQL(和PHP搭配之最佳组合) max版的安装MySQL程序,下载地址:www.MySQL(和PHP搭配之最佳组合).com

按常规的方法进行安装

安装MySQL完成后,启动MySQL(和PHP搭配之最佳组合)binWinMySQL(和PHP搭配之最佳组合)admin

再退出

运行

MySQL(和PHP搭配之最佳组合)binmydqld-nt --remove

MySQL(和PHP搭配之最佳组合)binMySQL(和PHP搭配之最佳组合)d-max-nt --install

以上二行是去掉不支持事务处理的MySQL(和PHP搭配之最佳组合)服务,改成支持MySQL(和PHP搭配之最佳组合)事务处理的服务

然后在c:下建一个ibdata目录及iblogs目录,当然名字可以不一样,记住这二个名字及盘符,以后要用到,你也可以不建在C盘,然后,打开c:winnt或c:windows目录下的my.ini,在最后添加:以下内容为程序代码:

<ol class="dp-xml">
<li class="alt"><span><span>innodb_data_file_path = ibdata1:2000M;ibdata2:2000M  </span></span></li>
<li><span>innodb_data_home_dir = c:ibdata  </span></li>
<li class="alt">
<span>set-variable = </span><span class="attribute">innodb_mirrored_log_groups</span><span>=</span><span class="attribute-value">1</span><span> </span>
</li>
<li><span>innodb_log_group_home_dir = c:iblogs  </span></li>
<li class="alt">
<span>set-variable = </span><span class="attribute">innodb_log_files_in_group</span><span>=</span><span class="attribute-value">3</span><span> </span>
</li>
<li>
<span>set-variable = </span><span class="attribute">innodb_log_file_size</span><span>=</span><span class="attribute-value">30M</span><span> </span>
</li>
<li class="alt">
<span>set-variable = </span><span class="attribute">innodb_log_buffer_size</span><span>=</span><span class="attribute-value">8M</span><span> </span>
</li>
<li>
<span class="attribute">innodb_flush_log_at_trx_commit</span><span>=</span><span class="attribute-value">1</span><span> </span>
</li>
<li class="alt"><span>innodb_log_arch_dir = c:iblogs  </span></li>
<li>
<span class="attribute">innodb_log_archive</span><span>=</span><span class="attribute-value">0</span><span> </span>
</li>
<li class="alt">
<span>set-variable = </span><span class="attribute">innodb_buffer_pool_size</span><span>=</span><span class="attribute-value">80M</span><span> </span>
</li>
<li>
<span>set-variable = </span><span class="attribute">innodb_additional_mem_pool_size</span><span>=</span><span class="attribute-value">10M</span><span> </span>
</li>
<li class="alt">
<span>set-variable = </span><span class="attribute">innodb_file_io_threads</span><span>=</span><span class="attribute-value">4</span><span> </span>
</li>
<li>
<span>set-variable = </span><span class="attribute">innodb_lock_wait_timeout</span><span>=</span><span class="attribute-value">50</span><span> </span>
</li>
</ol>
Copy after login

其中

<ol class="dp-xml"><li class="alt"><span><span>innodb_data_file_path = ibdata1:2000M;ibdata2:2000M </span></span></li></ol>
Copy after login

这一行中的2000M可以自己改成200m,看你盘的容量大小,MySQL(和PHP搭配之最佳组合)推荐10G及以上的硬盘空间最好用这样的设置;

以下这一行

<ol class="dp-xml"><li class="alt"><span><span>innodb_data_home_dir = c:ibdata </span></span></li></ol>
Copy after login

也可以改成你自己起的目录,主要是看你自己在刚才建的目录在哪里啦

按照以上的方法,你已经安装MySQL好了MySQL(和PHP搭配之最佳组合)的事务数据库,不过你要是按照MySQL(和PHP搭配之最佳组合)手册上的方法安装,把上面的一段配制放到my.cnf是去的话,可是会出错哦

好了,现在让我们试试看是不是安装完成了,启动apache(Unix平台最流行的WEB服务器平台),或iis,在服务里启动MySQL(和PHP搭配之最佳组合)的服务,打开phpmyadmin,输入:SHOW variables like "have_%" 

你要是看到下面的结果,那说明你安装MySQL成功了

以下内容为程序代码

<ol class="dp-xml">
<li class="alt"><span><span>Variable_nameValue  </span></span></li>
<li><span>have_bdbYES  </span></li>
<li class="alt"><span>have_innodb YES  </span></li>
<li><span>have_isam YES  </span></li>
<li class="alt"><span>have_raid NO  </span></li>
<li><span>have_symlink YES  </span></li>
<li class="alt"><span>have_openssl NO  </span></li>
<li><span>have_query_cacheYES  </span></li>
<li class="alt"><span> </span></li>
</ol>
Copy after login

注:MySQL(和PHP搭配之最佳组合)的事务处理方法的使用同其它数据库语法相似,在这里我就不多说了,另外,MySQL(和PHP搭配之最佳组合)将在4.3中实现外键及子查询,简单的外键已经在4.0中都已经实现了,只是不怎么方便,相信以后会做得更好些。

关于事务表的使用,我已经成功地在我的网上订单管理系统中实现,效果还不错,只是还没有经过大数据量的实践

以上文章是本人自己根据实践写出来的,如要转载,请注明出处及作者,也欢迎大家和我一起讨论关于MySQL(和PHP搭配之最佳组合)事务表的一些问题

以上的相关内容就是对安装MySQL事务数据库(InnoDB)的介绍,望你能有所收获。


Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

This Apple ID is not yet in use in the iTunes Store: Fix This Apple ID is not yet in use in the iTunes Store: Fix Jun 10, 2024 pm 05:42 PM

When logging into iTunesStore using AppleID, this error saying "This AppleID has not been used in iTunesStore" may be thrown on the screen. There are no error messages to worry about, you can fix them by following these solution sets. Fix 1 – Change Shipping Address The main reason why this prompt appears in iTunes Store is that you don’t have the correct address in your AppleID profile. Step 1 – First, open iPhone Settings on your iPhone. Step 2 – AppleID should be on top of all other settings. So, open it. Step 3 – Once there, open the “Payment & Shipping” option. Step 4 – Verify your access using Face ID. step

Shazam app not working in iPhone: Fix Shazam app not working in iPhone: Fix Jun 08, 2024 pm 12:36 PM

Having issues with the Shazam app on iPhone? Shazam helps you find songs by listening to them. However, if Shazam isn't working properly or doesn't recognize the song, you'll have to troubleshoot it manually. Repairing the Shazam app won't take long. So, without wasting any more time, follow the steps below to resolve issues with Shazam app. Fix 1 – Disable Bold Text Feature Bold text on iPhone may be the reason why Shazam is not working properly. Step 1 – You can only do this from your iPhone settings. So, open it. Step 2 – Next, open the “Display & Brightness” settings there. Step 3 – If you find that “Bold Text” is enabled

WiFi calling not working on iPhone: Fix WiFi calling not working on iPhone: Fix Jun 03, 2024 am 11:16 AM

Can't enable Wi-Fi calling on iPhone? Call quality is improved and you can communicate even from remote locations where cellular networks are not as strong. Wi-Fi Calling also improves standard call and video call quality. So, if you can't use Wi-Fi calling on your phone, these solutions might help you fix the problem. Fix 1 – Enable Wi-Fi Calling Manually You must enable the Wi-Fi Calling feature in your iPhone settings. Step 1 – For this, you have to open Settings. Step 2 – Next, just scroll down to find and open the “Phone” settings Step 3 – In the phone settings, scroll down and open the “Wi-Fi Calling” setting. Step 4 – In the Wi-Fi Calling page, change “This iPhone

How to use MySQL backup and restore in PHP? How to use MySQL backup and restore in PHP? Jun 03, 2024 pm 12:19 PM

Backing up and restoring a MySQL database in PHP can be achieved by following these steps: Back up the database: Use the mysqldump command to dump the database into a SQL file. Restore database: Use the mysql command to restore the database from SQL files.

How to optimize MySQL query performance in PHP? How to optimize MySQL query performance in PHP? Jun 03, 2024 pm 08:11 PM

MySQL query performance can be optimized by building indexes that reduce lookup time from linear complexity to logarithmic complexity. Use PreparedStatements to prevent SQL injection and improve query performance. Limit query results and reduce the amount of data processed by the server. Optimize join queries, including using appropriate join types, creating indexes, and considering using subqueries. Analyze queries to identify bottlenecks; use caching to reduce database load; optimize PHP code to minimize overhead.

Clear gray Safari history in iPhone: Fixes Clear gray Safari history in iPhone: Fixes Jun 08, 2024 pm 06:44 PM

Is the Clear History button gray in Safari on iPhone? If this is the case, you won't be able to clear history in Safari at all. Stored cookies and website data may cause unsolicited events in your browser. However, if you follow the steps below, you can easily resolve the issue and delete stored user history from Safari. Fix 1 – Disable Content Restrictions Content restrictions on iPhone may limit the correct use of Safari browser. Step 1 – Open iPhone settings. Step 2 – Next, go to Screen Time settings. Step 3 – In Screen Time settings, turn on Content & Privacy Restrictions

iPhone stuck in airplane mode: How to fix it iPhone stuck in airplane mode: How to fix it Jun 15, 2024 pm 02:16 PM

Airplane mode is very convenient in some situations. However, the same airplane mode may give you a headache if your iPhone suddenly gets stuck on it. In this article, we have designed this set of solutions to get your iPhone out of airplane mode. Quick fix – 1. Try disabling Airplane Mode directly from Control Center. 2. If you are unable to disable Airplane Mode from Control Center, you can disable Airplane Mode directly from the Settings tab – If these tips don’t work, follow the fixes below to resolve the issue. Fix 1 – Force Restart Your Device The process of force restarting your device is very simple. All you have to do is follow these step-by-step instructions. Step 1 – You can start the process by pressing and releasing the Volume Up button. step

How to create a MySQL table using PHP? How to create a MySQL table using PHP? Jun 04, 2024 pm 01:57 PM

Creating a MySQL table using PHP requires the following steps: Connect to the database. Create the database if it does not exist. Select a database. Create table. Execute the query. Close the connection.

See all articles