MySQL Forums
Forum List  »  Other Migration

Moving MySQL Data from Linux to Windows Computer
Posted by: Dan Ford
Date: September 01, 2009 12:09PM

The Paradigm

I recently was finally given a computer for work, which runs on Windows XP. I had previously been working using my personal Linux laptop, and had developed several MySQL/PHP applications to aid in data entry and SQL reporting, all of which ran on localhost. I use an "include" file to establish my connection, and run SQL inserts and updates via localhost. Ran like a champ in Linux.

The Problem

I installed WAMP Server (www.wampserver.com) on the new computer, and have now moved my data from the Linux laptop to the WinXP laptop. I actually did that pretty easily, but now, I find that I cannot connect using the username and password combinations. I tried to replicate them EXACTLY on the WinXP box, but no joy in Mudville, as they say.

The Parameters

Set up a very simple table:

id color employee
------------------------
1 Red Dan
2 Blue Mike
3 Yellow Cindy
4 Orange Gerri
5 Purple Rick
6 Green Crystal

Here's a copy of my "connection.php" file:

-----BEGIN PHP CODE-----
$db = mysql_connect("localhost", "xploser", "xploser");
if (!$db) {
echo "error!";
}
mysql_select_db("dangoof");
-----END PHP CODE-----

The test code to see if I can run a simple query:

-----BEGIN PHP CODE-----
include("connection.php");

$query = "select * from table1";
$result = mysql_query($query);
$num_results = mysql_num_rows($result);
for ($i=0; $i <$num_results; $i++)
{
$row = mysql_fetch_array($result);
echo "<p>".$row["id"]." - ".$row["color"]." - ".$row["employee"]."</p>";
}
-----END PHP CODE-----

I've run this code a thousand times without problems, but now, I get this error message:

-----BEGIN ERROR CODE-----
Warning: mysql_query() [function.mysql-query]: Access denied for user 'SYSTEM'@'localhost' (using password: NO) in C:\wamp\www\acs\dangoof\index.php on line 5

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in C:\wamp\www\acs\dangoof\index.php on line 5

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\wamp\www\acs\dangoof\index.php on line 6
-----END ERROR CODE-----

I tried setting up a completely new user using PHPMyAdmin, and running it again - still no luck.

What am I missing? Are there some wacky settings in Widows XP I need to set to enable this functionality? Any insights would be greatly appreciated.

Dan sends...

Options: ReplyQuote


Subject
Views
Written By
Posted
Moving MySQL Data from Linux to Windows Computer
7695
September 01, 2009 12:09PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.