Mysql installation and configuration tutorial (graphic explanation)

Source: Internet
Author: User
Tags php file upload

Many of my friends on the Internet asked me how to install mysql and how to configure it. So the author sorted out a tutorial document on mysql installation and configuration and shared it with you, we provide detailed text and text explanations to help you. If you encounter any problems during the operation, please leave a message below to correct them.

The first step is to download mysql. Here we take the most stable mysql 5.0.91 as an example to illustrate that other versions are basically the same.

Mysql http://www.kuaipan.cn/file/id_5653027365061370.htm

After downloading, you can install MySQL. The following describes how to install and configure MySQL.

Open the downloaded mysql Installation File mysql-5.0.27-win32.zip, decompress and run the setup.exe file, the following prompt page appears:

Start the mysql Installation Wizard and press "Next" to continue.

Select the installation type, which has three options: "Typical (default)", "Complete (Complete)", and "Custom (Custom)". Choose "Custom ", there will be more installation options that you can choose on your own:

Click "Developer Components (Developer part)" and select "This feature, and all subfeatures, will be installed on local hard drive. ", that is," This part and its sub-parts are all installed on the local hard disk ". The above "MySQL Server (mysql Server)", "Client Programs (mysql Client program)", and "Documentation (document)" are also installed on the local hard disk, to ensure that all files are installed. Select "Change..." to manually specify the installation directory.

Select the installation directory. The author installed the directory "F: \ Server \ MySQL Server 5.0". We recommend that you do not place it in the same partition as the operating system, this prevents data from being cleared during system backup and restoration, and reduces the space used by the system disk to a certain extent. Press "OK" to continue.

Press "Next" to continue.

Check whether the selected settings are correct. If yes, press "Back" to return redo. Otherwise, press "Install" to start installation.

After installing mysql, the following prompt page appears.

This is to ask if you want to register an account for mysql.com or use an existing account to log on to mysql.com. Generally, this is not required. Select "Skip Sign-Up ", click "Next" to skip this step.

OK. After the above steps, mysql has been installed. Note that in the above interface, check "Configure the Mysql Server now" and click "Finish" to end software installation, in this way, you can start the mysql Configuration Wizard. This is because mysql runs properly if it is not configured after installation.

Start the mysql Configuration Wizard and press "Next" to continue.

Here is the Configuration method, "Detailed Configuration (manual precise Configuration)", "Standard Configuration (Standard Configuration)", we choose "Detailed Configuration ", to help us get familiar with the mysql database configuration process.

Here we select the Server type, "Developer Machine (development and testing class, mysql occupies a small amount of resources)", "Server Machine (Server type, mysql occupies a large amount of resources) "," Dedicated MySQL Server Machine (Dedicated database Server, mysql occupies all available resources) ", here you can choose according to your own situation, generally choose" Server Machine ", not too little, it will not be full.

Here is the general usage of the mysql Database, "Multifunctional Database (Universal multi-function type, good)", "Transactional Database Only (server type, focus on transaction processing, General) "," Non-Transactional Database Only (non-transaction processing type, relatively simple, mainly used for monitoring and recording, the support for MyISAM data types is limited to Non-transactional ), select here based on your own purposes. Here I will select "Transactional Database Only" and press "Next" to continue.

The configuration is related to the InnoDB Tablespace, that is, to select a bucket for the InnoDB database file. If you modify it, remember the location and select the same place during reinstallation, otherwise, the database may be damaged. Of course, it is okay to back up the database. We will not detail it here. I have not modified it here. Use the default position and press "Next" to continue.

Here is the general mysql access volume and connection count of your website, "demo-support (DSS)/OLAP (about 20)" and "Online Transaction Processing (OLTP) (about 500) "," Manual Setting (manually set, enter a number by yourself) ", here I choose" Online Transaction Processing (OLTP) ", my server, it should be enough. Press "Next" to continue.

Whether to enable the TCP/IP connection and set the Port. If the Port is not enabled, you can only access the mysql database on your machine. I enable it here and tick the Port Number: 3306. on this page, you can also select Enable Strict Mode, so that MySQL will not allow small syntax errors. If you are a newbie, I suggest you cancel the standard mode to reduce the trouble. However, if you are familiar with MySQL, try to use the standard mode because it can reduce the possibility of harmful data entering the database. Press "Next" to continue.

Here we select database encoding, and the second is multi-byte universal utf8 encoding, which is not our general encoding. Here we select the third encoding, and then select or enter "gbk" in Character Set ", of course, you can also use "gb2312", the difference is that the gbk font capacity is large, including all the Chinese characters of gb2312, and added traditional Chinese characters, and other messy words. The setting here is equivalent to executing the data operation command "set names gbk;" when using mysql (just run it once. You can replace GBK with other values, depending on the settings here), you can use Chinese characters (or other texts) normally. Otherwise, Chinese characters cannot be displayed normally. Press "Next" to continue.

Here is whether to install mysql as a windows Service, you can also specify the Service Name (Service ID Name), whether to add the mysql bin directory to Windows PATH (after adding, you can directly use the file in bin without specifying the directory name, such as connection, "mysql.exe-uusername-ppassword;". Then, you can refer to the complete address of mysql.exe, which is very convenient ), I have checked all of them here, and the Service Name remains unchanged. Press "Next" to continue.

In this step, check whether you want to change the password of the default root user (Super Management) (empty by default). If you want to change the "New root password, enter the new password here (if you have already set a new password, changing the password may cause an error. leave it blank and remove the check mark before "Modify Security Settings, after the installation and configuration are complete, change the password.) enter the password again in "Confirm (re-enter)" to prevent errors. "Enable root access from remote machines (whether to allow root users to log on to other machines. If you want security, do not check it. If you want convenience, check it )". Finally, "Create An Anonymous Account (Create An Anonymous user, and the Anonymous user can connect to the database, and cannot operate data, including queries)". Generally, you do not need to check the settings, press "Next" to continue.

Confirm that the settings are correct. If any error occurs, press "Back" to return for the check. Press "Execute" to make the settings take effect.

After the configuration is complete, press "Finish" to end mysql installation and configuration. Here is a common error, that is, the "Start service" is not allowed, which usually appears on a server where mysql was previously installed, to solve this problem, first ensure that the previously installed mysql server is completely uninstalled. If not, check whether the previous password has been modified as mentioned above; if not, back up the data folder under the mysql installation directory and delete it. After the installation is complete, delete the data folder generated by the installation and remove the backed up data folder, restart the mysql service. In this case, you may need to check the database and fix it once to prevent data errors.

So far, the installation and configuration of the mysql database is over, and your database should have been successfully run.

Articles you may be interested in
  • Install and configure memcache in windows
  • How to install and configure the PHP runtime environment in Windows 7
  • PHP File Upload configuration tutorial
  • Detailed description of the role and installation configuration of Xdebug
  • Methods for resetting the auto-increment start value of various MySQL Data Table types
  • Install and use Sphinx in windows [Chinese full-text search is supported]
  • Windows cannot start the hardware device because its configuration information (in the Registry) is incomplete or damaged. (Code 19) Solution
  • Mysql Server master-slave Database Synchronization Configuration

Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.