• Resolved BatsBee

    (@batsbee)


    Hi, I have had to upgrade my operating system and clean all of the previous data from C drive. I kept a complete copy of the wamp64 directory and included website.

    I have now reinstalled a new copy of wampserver and cut and pasted the MySql database into the new copy (and it comes up as a db in MySql, I checked) I then copied the full directory for www across.

    Does not work. When I try to run it, it says it wasn’t able to load page and the url it comes back with has also changed … to https://localhost:8080/WP/

    I have looked at some of the config files and I don’t see any port listed there as 8080. I haven’t had to change ports in this setup and the wamp icon is green. I will keep looking, but has anyone had to do this procedure in the past? …and has some insights? Many thanks, Bruce

    • This topic was modified 6 years, 6 months ago by BatsBee.
Viewing 15 replies - 1 through 15 (of 23 total)
  • Hello, Bruce, & welcome. Could you please explain what you mean by “cutting & pasting”? If you really do mean “cutting & pasting”, as in using a text editor, then yes–things are going to blow up & they’re going to do so royally, as databases don’t work in this way. You need to *import* the database, using either PhpMyadmin or the MySQL command line. We can provide instructions should you require. Make certain also that your site is under the webroot folder, usually wampp/htdocs.

    Please advise us whether or not this was helpful, as well as if further assistance is required.

    Thread Starter BatsBee

    (@batsbee)

    Hi Jackie, many thanks! I suspect that’s the problem. Yes, I need to work out how I import the database and I have a vague idea that it is a collection of files that I will need to zip before I import. If you can give me an idea of which files/directories they are, I might be ok from there.

    Bruce, I personally use Xampp, so I’m not totally sure of Wampp’s data structure. In xampp, you can find the databases in xampp\mysql\data. I’m not trying to self-promote, but here’s a tutorial on backing up a database using PhpMyadmin. If you need MySQL command line instructions, reply stating that & I or another very capable volunteer will get back w/that info.
    https://www.brighter-vision.com/backing-up-your-database

    Thread Starter BatsBee

    (@batsbee)

    Hi Jackie, many thanks. My only problem is that when I originally removed all the files to a new location, I didn’t actually export the db. So I don’t have the db in that exported format. I have it simply in the original directory structure… in wamp it is in \data. I just tried zipping that directory and importing to MySql but I get an error…
    ‘#1064 – You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘??MARIALOGe??E1$’ at line 1″
    Maybe I am zipping too much! Not sure!

    Bruce, zipping is not what you want to do here. Databases are in very specific formats which must be maintained.

    When u go to PhpMyadmin, do you see the original database there?

    Thread Starter BatsBee

    (@batsbee)

    No. It’s a new installation and there are no db’s. The full wamp site (= Xampp site) was copied and placed in a separate drive and so I have explorer access to that data only.

    Thread Starter BatsBee

    (@batsbee)

    Just thinking – if I copy and paste the old ‘data’ folder into the new MySql folder, yes, it does show as a db. I don’t know if it’s working however, because then I come back to that error message that I mentioned in the first post above.
    Not sure why it can’t load the page when I try to run it in the browser, but usually, I thought that when it comes up with localhost:8080, it indicates that it is looking at Port 8080. I don’t have that Port configured, just the standard Port 80. Maybe if I could track down that 8080, it might solve the problem. Not sure.

    • This reply was modified 6 years, 6 months ago by BatsBee.

    Hi again, Bruce. I understand. From what I can see, the data structure in wampp is:
    wampp\bin\mysql\mysql-version#\data. If MariaDB was used, the same structure applies except that it’s MariaDB instead of MySQL. Obviously mysql-version# is a placeholder for the version number of your MySQL/MariaDB. In mine, as an example, mysql-version# was mysql5.7.21. So you’re copying the files in that data folder on your external hard drive into the data folder of your current install. Specifically, copy the data file that represented your website’s database into that folder. You can usually tell by the name of the file which was the database.

    Does that help?

    Once you’ve done that, you may need to do some fiddling w/the credentials using PhpMyadmin or the MySQL/MariaDB command line. If that is indeed the case, then you’ll need to make changes to the wp-config.php file to reflect any changes you made.

    @batsbee

    ” I kept a complete copy of the wamp64 directory and included website.”

    Then just put this one back in the same location (e.g. c:\wamp64) and away you go! No need to install a new copy of WAMP ??

    Cheers!
    Lyle

    Well, Bruce, you could try clicking the Wampp icon in your system tray (it’s usually on the lower right hand portion of your screen unless you changed the location), click the ‘Tools’ menu, then click ‘Test Port 80’ to see what that does or, alternatively, choose ‘Try a Port Other Than 80’ & use 8080.

    But I suspect that cut-&-paste operation pretty much mangled the database, as at least some entries in the database are serialized, & text editing tends to muck that up royally. However, I could be wrong. Been that before, will be again before it’s all said & done.

    Thread Starter BatsBee

    (@batsbee)

    Hi Lyle,

    yes, I did try that but it breaks the links in WAMP and I get “an error in the Aestan Tray Menu”…

    Jackie,

    I might delve further into the Ports and see what I can find. I have looked in what I thought were the obvious places, but will look again. Failing that I can just do a new install. It might be quicker to get back to where I was the second time around!
    I did play with that once, but even with that I got one odd thing that seemed to go contrary to the instructions that I read. When I created the new MySql db it immediately indicated a problem and said that there was no table. I have never seen that before!!

    Anyway, more fiddling. Thanks so much for all your ideas. If I work it out I will let you know. cheers.

    Bruce, when you create a new database, there will be no tables. The database is just a placeholder. Tables will be put there if they’re imported into the database or if you create a table.

    Thread Starter BatsBee

    (@batsbee)

    Hi Jackie,
    that’s what I thought, so I wonder why it shows that as an error message! I am doing a reinstall now and will start from scratch, so lets see if it does it again.

    Tell you what, Bruce. I’ll be up a few more minutes–it’s getting fairly late here–but I’ll look back to see how you fared when I get up, & I’ll do what I can to follow it between Mother’s Day celebrations. Best thing about those is I don’t have to cook–& we’re going to a seafood place which is my favorite. Yay! But I’ll keep an eye on this & see where we’re at.

    Thread Starter BatsBee

    (@batsbee)

    No worries! I have all evening to play with it, although there are limits!

Viewing 15 replies - 1 through 15 (of 23 total)
  • The topic ‘Problems connecting to localhost’ is closed to new replies.