I want to build a blog these days, but it takes me two days to build a local development environment. I have been switching between various versions and errors. This is a tough task, so I think it is necessary to share my solution with you. Here I will share with you some of my solutions for errors. For details about how to perform these solutions, please refer to my reference materials.
I want to build a blog these days, but it takes me two days to build a local development environment. I have been switching between various versions and errors. This is a tough task, so I think it is necessary to share my solution with you. Here I will share with you some of my solutions for errors. For details about how to perform these solutions, please refer to my reference materials.
I want to build a blog these days, but it takes me two days to build a local development environment. I have been switching between various versions and errors. This is a tough task, so I think it is necessary to share my solution with you. Here I will share with you some of my solutions for errors. For details about how to perform these solutions, please refer to my reference materials.
By the way, my environment is win7 + mysql server5.5.20 + apache2.2.25 + php5.3.29 + wordpress2.7.
(Php and apache are both installed versions, not without installation ).
References:
MySQL Installation Details graphic version (V5.5For Windows)
Http://www.jb51.net/article/28362.htm
Fully uninstall MySQL
Http://blog.sina.com.cn/s/blog_675ce92f0100ryv9.html
Php + mysql + apache + wordpress installation record-stupid child
Http://www.blogjava.net/fl1429/archive/2009/04/24/267307.html
Configure Apache + Mysql + PHP in Windows
Http://www.cnblogs.com/homezzm/archive/2012/08/01/2618062.html
Apache cannot start the solution
Http://jingyan.baidu.com/article/c85b7a642df6f7003bac95d9.html
Apache startup failure troubleshooting
Http://wangfei4553693.blog.163.com/blog/static/2701047720127119625311/
Forum: php cannot connect to mysql
Http://bbs.csdn.net/topics/360030921? Page = 1
Install WordPress
Http://codex.wordpress.org/zh-cn:%E5% AE %89%E8%A3%85WordPress
I. reinstalling mysql:
?? At first, my computer installed mysal version 5.6.20, because I forgot the password, so I unloaded it. Then the nightmare came. When I want to install mysql Server 5.6.20 again, I find that I cannot reconfigure it. That is to say, I cannot change the password. Okay, so how can I thoroughly uninstall mysql through online search? If I want to delete the registry, I will delete it, but the deletion is still the same. After a long time, I tried to change the version, so I changed the version to a lower version of 5.5, so I could enter the mysql configuration program. Finally, if mysql5.6 cannot be properly installed, the reason is gone. If anyone knows, let me know.
Ii. installation and configuration of apache and php:
?? The reason for using the installation version is mainly because some files are missing in the installation folder, for example, php5apache2_2.dll, php_mysqli.dll, and php_mysql.dll files are missing in the php folder, finally, problems may occur during configuration. If anyone knows how to configure the free installation version, please let me know.
The two main problems I encountered here are that the apache service cannot be enabled and php cannot be connected to mysql:
1. For the first problem, there may be three reasons:
- Port occupation problems;
- Path and file name problems;
- Configuration File problems.
For more information about troubleshooting, see references. I have encountered the third reason. To solve this problem, I would like to recommend a good method for reference:
Go to cmd and enter the Apache installation directory (your own installation directory) \ bin> httpd.exe-w-n "Apache2"-k start (Change Apache2 in quotation marks to your Apache service name, my version is 2.2.4, and the service name is Apache2, which can be found in the Computer Service). In this way, the command prompt will directly display your configuration file httpd. conf errors can help you locate which line is very practical.
2. Second question:
Possible causes include:
The firewall is down, the database port is occupied, and the mysql service is not enabled. But it is not consistent with the situation I encountered. I pulled a piece of php code from the Internet to test:
This means that 'successful !!! '. The error message is printed if it fails. Okay, and keep failing... The error message is "unable to connect because the target computer is actively rejected ". Therefore, Baidu found a forum where "Forum: php cannot connect to mysql" was referenced. After reading many of the above comments, I found at the bottom:
I tried it. Oh, my God !! Success !!! (The port number here refers to the port number of your database)
3. install Wordpress:
After the mysql, php, and apache environments are built, it is not difficult to install wordpress. For more information, see "install WordPress ".
It is worth mentioning that there is no need to install any application to create a mysql database. Instead, you can simply use a command prompt to create a mysql database. Instead, the code is simple.
Then there is the problem of connecting mysql, refer to the problem 2 solution, I think of the wordpress configuration file wp-config.php 'db _ host' there, add my port number, like this:
The results show that this is feasible !!
When building the environment, you can follow the steps in "php + mysql + apache + wordpress installation record-stupid kids, if you have any questions, check other materials I have provided, or go online and try again. In short, there are always methods, mainly because you must be patient!