简体   繁体   中英

cannot run the localhost with upgraded php version and mysql version

My localhost was running on wampserver 2.0 ( with php5.3.0 , mysql5.1.16 , Apache 2.2.11 ). I needed to upgrade php and mysql, so i downloaded php 5.6.16 . and extracted in to directory "wamp/bin/php/php5.6.16" with 3 mandatory files ( php configuration file, phpForApache configuration file and wampserver.conf file) from existing php5.3.0 folder.

Then I got a mysql from my friend's ( mysql5.6.12 64bit ) wamp directory. didn't do any configurartion . I put it into my wamp/bin/mysql. then i exited from wamp and restart it again.

Then php and mysql versions look like this.

hsdhf

在此处输入图片说明

mysql version is not displayed here . and the existing version name is not selected. with these changes I executed the localhost on browser.

wamp server home page is displayed on the browser.

Then I could see this.

在此处输入图片说明

In above image, the updated Mysql version is displayed, but not displayed in wamp tray menu mentioned before.

After I tried to view phpmyadmin page. the page was not loaded.

When I'm trying to select mysql version5.1.36 from wamp tray menu, following error was occurred. 在此处输入图片说明

Special: after this error occurred, the wamp go offline and cannot open localhost.

And also when I select php version 5.6.16 from wamp tray menu and start localhost, but it goes for " unable to connect" page.

Then I removed the new mysql 5.6.12 folder from the wamp/bin/mysql directory. then restart services and try again.

Nothing changes happened. when start the localhost I could see mysql version again as before.(MySQL Version : 5.6.12 ). But I already removed it from the directory.

I explained everything that i faced.

I need to know what is going on here and how to fix these problems. and How do I install php and mysql versions in this wampserver 2.0.

A working WAMP install should come with included MySQL and PHP versions. That's the whole point of using a package such as WAMP instead of installing your own; you get a whole working stack with one installation instead of having to install each application individually and then configure them manually to work together. Therefore, I have no idea why you would want to copy a friend's MySQL application to your computer. Aside from the fact that you probably didn't copy all the system files (DLLs, library files, etc), you're probably introducing conflicts with the library files that PHP and WAMP use to access MySQL since it's expecting a particular version and now you're providing a different version.

Frankly, at this point it sounds like things are messed up enough that probably the only proper solution is to remove what you have and reinstall the WAMP package (or each individual component). Make sure you back up any relevant changes you've made (configuration, web files, and databases) first!

First of all take back up of all local website in WWW directory found in wamp folder.. This is a time consuming time as it has to back up and copy all files, so sit aside and be patient. Now, the only solution for this error is to uninstall wamp from control panel and than get tne new version of wamp according to your needs wither from archive or directly the latest version with your preferred php, mysql and apache versions. Follow this steps for backing up and recovering your old projects.:-

  1. Before uninstalling the crashed server copy the full folder as backup of all previous data. (Example: Take backup of "C:\\wamp" folder)

  2. Uninstall the Crashed server and install the new one.

  3. Make sure your new server running and has no error.

  4. If server is running make it Stop and Offline then close it.

  5. Go to C:\\wamp\\bin\\mysql\\mysql5.0.45\\data\\

  6. Its better to take a backup copy of this data folder.

  7. Replace the files and folders with your previous server data.

  8. Add your Previous Projects to the Root folder. (Example: "C:\\wamp\\www")

  9. Restart the server and check whether your previous tables and data are reflecting in the new server. (Example: Check it Out here http://localhost/phpmyadmin/ )

  10. Enjoy with your Old Projects at new server.

Source:- mysql.com

From:- http://infinium-tech.com

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM