Thanks for the tip Szemir.... you were close. MySQL already had networking enabled, however the my.cnf file had the following line:
bind-address = 127.0.0.1
(this was located just above the skip-networking line)
I changed this to match my local IP address and restarted mysql, and suddenly
things work.
Thanks for the tip.
Shawn
On Monday 10 October 2005 17:36, bogi wrote:
> The users have access, but did you enable networking ?
>
> in my.cnf
> set-variable = skip-networking no
> or just
> skip-networking=no
> (default is yes by compile ....)
>
> also
> set-variable = port=musql_normal_port ..... check
> (default should be ok)
> and in postgres
>
> /var/lib/pgsql/lib (or where you have init postgres)
> postgresql.conf
> tcpip_socket = true
>
> or none of your network stuff will work, only local access.
>
> Both db engines turn networking off by default ...
>
> now you will need to restart both databasis.
>
> Cheers
> Szemir
>
> On October 10, 2005 01:26, Shawn wrote:
> > I'm trying to create a script that will migrate a PostgreSQL database to
> > MySQL. The logic seems to be sound, but I'm having some kind of odd
> > connection problems... Here's the PHP snippet in question (which is
> > using Pear DB):
> >
> > //Include the Pear DB library
> > require_once "DB.php";
> >
> > //PostgreSQL connection string
> > $pgdsn = "pgsql://sgrover:[EMAIL PROTECTED]/open2space2";
> >
> > //MySQL connection string
> > $mydsn = "mysql://drupal:[EMAIL PROTECTED]/devo2s";
> >
> > //Connect to the databases
> > $pgdb = DB::connect($pgdsn, true);
> > //handle connection error
> > if (DB::isError($pgdb)) {
> > die ("\nPostgreSQL: " . $pgdb->getMessage() .
> > "\n"); }
> >
> > $mydb = DB::connect($mydsn, true);
> > //handle connection error
> > if (DB::isError($mydb)) {
> > die ("\nMySQL: " . $mydb->getMessage() . "\n");
> > }
> >
> > When I try to run this I see the following:
> >
> > MySQL: DB Error: connect failed
> >
> > I've checked my User table in MySQL, and it contains the following:
> >
> > +-------------------+-------------+------------------------------+
> >
> > | Host | User | Password |
> >
> > +-------------------+-------------+------------------------------+
> >
> > | localhost | drupal | ************************ |
> > | 192.168.0.20 | drupal | ************************ |
> >
> > +-------------------+-------------+------------------------------+
> >
> > So, the drupal user *should* be able to connect from my workstation
> > (192.168.0.20). I am able to connect just fine directly from the server,
> > but not from my workstation. If it helps, here's the command I used to
> > grant access from within MySQL:
> >
> > grant all privileges on devo2s.* to [EMAIL PROTECTED] identified by
> > "mypas"; flush privileges;
> >
> > Running this script from the MySQL server causes connection problems on
> > the PostgreSQL side (there are three computers involved here - my
> > workstation, the main server, and the *old* database server. The
> > database is being moved to the main server.). I know I can try to fix
> > the PG connection problem, but that doesn't seem tooo helpful if I can't
> > connect to the MySQL server. I just need to get past this connection
> > issue and focus on the actual migration code...
> >
> > I've either missed something stupid, or there's a lower level problem and
> > I need a nudge in the right direction.
> >
> > Either that, or if anyone can show me an EASY way to migrate a PostgreSQL
> > table to MySQL?
> >
> > Thanks for any tips.
> >
> > Shawn
>
> _______________________________________________
> clug-talk mailing list
> [email protected]
> http://clug.ca/mailman/listinfo/clug-talk_clug.ca
> Mailing List Guidelines (http://clug.ca/ml_guidelines.php)
> **Please remove these lines when replying
pgp82got4DIKN.pgp
Description: PGP signature
_______________________________________________ clug-talk mailing list [email protected] http://clug.ca/mailman/listinfo/clug-talk_clug.ca Mailing List Guidelines (http://clug.ca/ml_guidelines.php) **Please remove these lines when replying

