Apache + php + mysql + phpmyadmin Configuration

Source: Internet
Author: User
Tags apache php root access
First, provide the APACHEPHPphpMyadminMYSQL12 of each package. If you do not want to install the configuration, there are also many integrated packages that are being updated on the Internet. xamppappservwamp 2 installation 1. install apache image and text refer to hi. baidu.

First give each package of apache php phpMyadmin MYSQL 1 2 if you do not want to install configuration online there are also a lot of Integrated Package update xampp appserv wamp 2 installation 1. install apache graphics reference http://hi.baidu.

First, give

APACHE

PHP

PhpMyadmin

MYSQL 1 2


If you do not want to install the configuration, there are also many integration packages being updated on the Internet.

Xampp

Appserv

Wamp

Installation 2

1. install apache Graphic reference http://hi.baidu.com/chchyuexia/item/0f10521db1c660f565eabff8

@ 1

Network Domain: enter your Domain name. Set localhost locally

Server Name: enter your Server Name, that is, the complete host Name and domain Name. Set localhost locally

Administrator's Email Address: Enter the Administrator's email Address. Example localhost@admin.com

Or All Users, on Port 80, as a Service -- Recommended.
The default port 80 is used for installation for all users of the system and is automatically started as a system service.
Only for the Current User, on Port 8080, when started Manually.
It is only installed by the current user. Use port 8080 to start it manually.
(I have already installed IIS and IIS has used port 80, so here I select the second option and set apache to use port 8080 .)


@ 2 proceed to the next step

Typical is a Typical installation by default, and M is a Custom installation. Here I select Typical. Press "Next" to continue.

@ 3 next, set the installation path.

Do not directly install the C disk, in case you need to reconfigure the system. You can also set the installation path based on your preferences. For example, if I install it on G:/apache/
Note: do not include spaces in the directory name. Otherwise, an error occurs when php is set below.

After installation, the small icon is red. Do not be nervous. After installation, this step is very important. Otherwise, it is a small red icon.

@4. After installationTo manually start apache. Right-click my computer> Manage> open services and applications> services on the desktop. Find apache on the right and click Start.

Test whether the installation is successful. Enter http: // localhost/in the address bar. it works appears, indicating that the installation is successful.

@ 5 configure apache find conf/httpd. conf in the installation directory of apache to open and edit

About 182 of apache website directories are configured: DocumentRoot "G:/apache/htdocs"


2. install and configure php(Note: If the downloaded php Directory contains a. dll file is downloaded the installation package does not reference files if Download windows under the official website to download vc6-x86)

Create a new php Directory on the G drive and decompress the downloaded php package,

Find php. ini-development in the extracted root directory, which is the configuration file used for the development environment. There is also a php. ini-production, which is the configuration file used for the production environment. Use php. in-development to copy a copy and rename it to php. ini. Start editing. File Reference

3. Configure php in apache

About 244 rows


DirectoryIndex index. php index.html

About 127 rows

(1) Add a row to 130 rows (the end of a bunch of LoadModule **. so rows:

LoadModule php5_module "g:/php/php5apache2_2.dll"

PHPIniDir "g:/php"

(2) Search for AddType and add the following information in the blank line of the last field:

AddType application/x-httpd-php. php: About 417 lines

(3) Save and disable httpd. conf.


4. Configure phpmyadmin

Create a new phpmyadmin directory in the G drive and decompress the file. Copy config. default. php under libraries to the external directory and rename it config. inc. php.

About 223 $ cfg ['servers'] [$ I] ['user'] = 'root'; configure the user name and password

Configure phpmyadmin in apache and find conf/httpd. conf in the apache installation directory. Open and edit the following code in about 316 lines (search for filesystem/path ):

Alias/phpmyadmin "G:/phpmyadmin"

AllowOverride None
Options None
Order allow, deny
Allow from all

Illustration


5. install and configure mysql



There are three options: "Typical (default)", "Complete (Complete)", and "Custom (Custom)". We select "Custom" and there are more options, you can also familiarize yourself with the installation process. Press "Next" to continue. The following window is displayed:



Click "Change..." to manually specify the installation directory. Fill in the installation directory. My name is "G: \ mysql"

Then press "Install" to start installation.

Start installation. Please wait until the following interface is displayed:



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. Click "Skip Sign-Up ", click "Next" to skip this step to continue the installation.




Click "Finish" to complete software installation and start the mysql Configuration Wizard.

On the mysql Configuration Wizard startup page, press "Next" to continue to display the page:


Here you are required to select the Configuration method, "Detailed Configuration (manual precise Configuration)" and "Standard Configuration". We will select the first item "Detailed Configuration" for Detailed settings, familiarize yourself with the configuration process. Now, press "Next" to continue.



In this interface, you are required to 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) ", you choose according to your own type. Generally, select "Server Machine", which is neither too small nor full. I selected the second item, Server Machine (Server type, mysql occupies a large amount of resources ).




The above interface requires you to select the general purpose of the mysql database ::

Item 1: "Multifunctional Database (general multi-function type, good )",

Item 2: "Transactional Database Only (server type, focusing on transaction processing, General )",

Item 3: "Non-Transactional Database Only (non-transaction processing type, relatively simple, mainly used for monitoring and recording. Support for MyISAM data types is limited to Non-transactional ),

This option is selected based on your usage. Here I select "Transactional Database Only" and press "Next"

Continue.



No need to configure continue next


Here, you need to select the General mysql access volume and the number of connections for your website, such as "demo-support (DSS)/OLAP (about 20)" and "Online Transaction Processing (OLTP) (about 500) "and" Manual Setting (manually set, enter a number by yourself) ". Here I select" Online Transaction Processing (OLTP) "and my server, it should be enough. Press "Next" to continue.


In this interface, you are asked whether to enable the TCP/IP connection and set the port. If it is not enabled, you can only access the mysql database on your own machine. I will enable it here, tick the previous one, Port Number: 3306, and press "Next" to continue.




The option on this interface is very important, that is, to set the default mysql database language encoding.

The first is the Spanish code,

The second is multi-byte universal utf8 encoding.

The first two are not our common encodings. Here we select the third one, and then select or enter "gbk" in Character Set ". Of course, you can also use "gb2312". The difference between the two is that the gbk font size is large, including all the Chinese characters of gb2312, and added traditional Chinese characters and other messy words-when using mysql, Run "set names gbk;" before executing the data operation command (just run it once, GBK can be replaced with other values, depending on the settings here), you can use Chinese characters (or other texts) normally, otherwise the Chinese characters cannot be displayed normally. Press "Next" to continue.



In this step, you can choose whether to install mysql as a windows Service or specify the Service Name (Service ID Name ), if you want to add the bin directory of mysql to Windows path(after adding it, you can directly use the BIND file and specify the directory name. For example, if you want to connect mysql.exe-uusername-ppassword;, you can specify the complete address of mysql.exe, which is convenient ).

I have checked all of them here, and the Service Name remains unchanged. Press "Next" to continue.




The password must be the same as the username and password configured in phpmyadmin.

This step asks if you want to change the default root user (Super Management) password (blank by default). If you want to change the "New root password", enter the New password here (if re-installed, you have already set a password. Changing the password may cause errors. leave it blank and remove the check box before "Modify Security Settings". After the installation and configuration are complete, change the password separately ), "Confirm (re-enter)" is entered again 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)" is not checked. The settings are complete, press "Next" to continue.

Next, the following interface appears. Here, you need to confirm that the settings are correct. If there is an error, press "Back" to return and check. If the setting is correct, press Execute to make the setting take effect.




After you press Execute, please wait.

After the configuration is complete, click "Finish" to complete mysql installation and configuration.

The possible error here is that the start service fails to start. This is very likely because mysql has been installed on the machine and is not cleaned up. Find the directory where mysql is installed and delete the data directory.

Http: // localhost/phpmyadmin login Test



Finally, I would like to remind you that an error may also occur when the mysql and phpmyadmin versions are not used together. The version of mysql5.5 can be used with the latest phpmyadmin versions.



Overall Test



 

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.