Ubuntu: Migrating From WAMP to Ubuntu Desktop



Question:

I am moving my Wordpress site from a WAMP stack on Win7 to Ubuntu Desktop 13.10.

Upon export i realized that all the tables had been written as InnoDB rather than MyISAM, so i did a find/replace to correct that.

Is there anything that i should look at as far as incompatibilities between WAMP and a LAMP stack?

I'm getting this error:

Warning: mysql_connect(): Can't connect to MySQL server on 'x.x.x.x' (111) in /var/www/wp-includes/wp-db.php on line 1147  

line 1147:

$this->dbh = mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, $new_link, $client_flags );  

my process was:

  1. create a database with the same name as the original db.
  2. import the .sql file that was exported from the old WAMP server into this new db (again, had to change the InnoDB to MyISAM
  3. create a db user with the same name and pw as the orig db
  4. copy all the contents from my wordpress site into /var/www
  5. open a browser and point to http://x.x.x.x/wordpress (both the ip and 'localhost') give the same error, but i built my site using the IP rather than 'localhost'
  6. test going to just http://x.x.x.x and i get the "It Works!" page.

i was able to start a new wordpress site from scratch, so i'm pretty confident my setup is fine with respect to the LAMP stack.

i just don't know where to look any more.

any thoughts would be greatly appreciated.


Solution:1

I figured out what was wrong.

In the original site, I had changed everything to look for the IP address rather than "localhost" so everything (export.sql database, wordpress wp-config.php file, apache's httpd.conf file) were all trying to make sense of the hardcoded IP address which no longer existed.

I had done that due do something I had read about having other computers on the LAN not being able to connect to the wordpress server and that I needed to use the servers IP instead of localhost.

To fix it I just changed the IP of the new server to match the old one. This got everything up and running at which point I was able to go in and switch everything back to "localhost". and FWIW, testing LAN connections to the server seems fine using localhost now so I have no idea what was up initially - all I know is that I couldn't connect using localhost, but I could connect using the IP, but now that seems to not be the case.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »