[ic] PostgreSQL - No tables created

Mark Atkinson marka@netbrick.net
Thu, 16 Nov 2000 19:09:48 -0700


This is a multi-part message in MIME format.

------=_NextPart_000_0010_01C05000.CA4ADDA0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

You need to setup the catalog.cfg file in order to use the Perl DBI database
calls to the PostgreSQL server.  I had the same problem with MySQL or any
other database.  Uncomment out the DSN ODBC information out in the
catalog.cfg file for the database you are going to use.  You should not need
to change anything else.

Restart interchange and the tables will be created with the Demo
information.  It may be a little more involved then what I've stated.  But
that will get you started.  By default Interchange uses the Interchage
Database.  Even if you configured it to use another Database like MySQL or
PostgreSQL.  Hence the errors you are getting.  Look in the error.log in
your catalog directory and see what errors you get.  If interchange starts
correctly using the database.  You will see in the log file it created all
of the tables and data.

Hope this helps.

Mark
  -----Original Message-----
  From: interchange-users-admin@minivend.com
[mailto:interchange-users-admin@minivend.com]On Behalf Of Marcel Montes
  Sent: Thursday, November 16, 2000 8:13 AM
  To: interchange-users@minivend.com
  Subject: Re: [ic] PostgreSQL - No tables created


  This was my experience. This gave me 3 different sympthoms (spell??):
  1) When restarting interchange:
  "DBI connect failed: Can't connect to local MySQL server through socket
      '/var/lib/mysql/mysql.sock' (111)"

  2) Database created but empty (nor data nor even defined tables)
  3) As the catalog wasn't initialized, when accessing through the browser:
  "Undefined catalog: /cgi-bin/testingthis"
  (testingthis is my construct demo test with sql).

  I don't know how PostgreSQL works, I've never even installed it but hope
it helps.

  ------------------------------------------------------------
   Marcel Montes - Programmer (not a good one, though)
   marcel(at)multimake(dot)com

   "If our brain were so simple that we could understand it,
    we would be so stupid that we couldn't do so"
  ------------------------------------------------------------


     From: Marcel Montes
  Subject: Re: [ic] MySQL startup error / connect failed
       To: interchange-users@minivend.com




Another posibility:

I had the same problem -as far as you describe-. Try to connect to database
with "mysql -hHOST_IP" and
with "mysql -hlocalhost".
if -hHOST_IP works and -hlocalhost doesn't it surely is the same.

MySQL works both with TCP/IP and UNIX sockets. While connecting
with -hHOST_IP you are connecting
through TCP/IP but with -hlocalhost, or DBI, you're trying to connect
through UNIX sockets (someone please
correct me, I not very wise on this).

The mysql.sock file performs some kind of esencial function to the client to
know if there's a server, if it exist,
then connects (a kinda PID thing if I can say).
Also, there's a mysql compilation directive when running configure
(./configure
--with-unix-socket-path=/var/lib/mysql/mysql.sock). I'm not quite sure about
this as I've downloaded the
binary distribution but maybe that's why mysql pointed to /tmp/mysql.sock,
thus when DBI looked for
mysql.sock at /var/lib/mysql couldn't find it. I don't know how to change
this setting on mysql nor DBI, so I
kinda patched my own solution, that I don't know if it is "politically"
correct nor safe, but -at least by now-
functional...

My solution was to make a soft link to mysql.sock (ln -s /tmp/mysql.sock
/var/lib/mysql/mysql.sock). I really
doubted that that would work, but it did...
I also learned this time that linux' soft links are really beyond from the
always-comparition-start-point-for-windows-users .lnk files. The link made
with ln returns a false when
checking file of the link and the linked file doesn't exist (while if you ls
the directory... there's the link!!!). really
neat.

(let me learn some english too: is the last posesive apostrophe well placed?
how's the possesive of "linux"?)

hope this -finally- helped.

Marcel Montes wrote:

  Hmmm....
  run mysql with:
  /usr/local/mysql/bin/safe_mysqld --skip-grant-tables --user=mysql &
  (if the daemon user is mysql... if not change for whatever it is).

  Try again and if it works then is a mysql permissions problem.

  Heinz Wittenbecher wrote:

  > RH7 / latest MySQL rpm from mysql site. Perl 5.6.0
  >
  >  DBI connect failed: Can't connect to local MySQL server through socket
  > '/var/lib/mysql/mysql.sock' (111)
  >
  > Have redone CPAN DBI and DBD installs. perl reports that both are up to
  > date. I can access the data via mysql and webmin/sql.
  >
  > Any ideas?
  >
  > What's worse is that on another machine I have it all working. Even
tried a
  > tar from the working one and get same error.
  > Permissions on /var/lib/mysql/mysql.sock same on both machines.
  >
  > Any pointers greatly appreciated.
  >
  > Heinz
  >
  > _______________________________________________
  > Interchange-users mailing list
  > Interchange-users@www.minivend.com
  > http://www.minivend.com/mailman/listinfo/interchange-users

  _______________________________________________
  Interchange-users mailing list
  Interchange-users@www.minivend.com
  http://www.minivend.com/mailman/listinfo/interchange-users




  Kim Christensen wrote:

    Now i have several times tried to get Interchange running with
    PostgreSQL database. I am using SuSE 7.0 and PostgreSQL 7.02.
    Everything during installation went fine with no errors at all. CPAN
    updates and install the missing modules. I used the construct catalog
    with makecat.

    I started the Interchange server with the -r option and it comes up
without
    any errors. It is using the PG:DBI as expected.

    The problems is that there are NO tables created so naturally it does
not
    work. I have seen on the user list that others have experienced the same
    kind of problem when using MySQL as database engine.

    Any ideas and responses are much appreciated
    Regards
    Kim C.

_________________________________________________________________________
    Get Your Private, Free E-mail from MSN Hotmail at
http://www.hotmail.com.

    Share information about yourself, create your own public profile at
    http://profiles.msn.com.

    _______________________________________________
    Interchange-users mailing list
    Interchange-users@www.minivend.com
    http://www.minivend.com/mailman/listinfo/interchange-users


------=_NextPart_000_0010_01C05000.CA4ADDA0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2314.1000" name=3DGENERATOR></HEAD>
<BODY>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN =
class=3D890480102-17112000>You=20
need to setup the catalog.cfg file in order to use the Perl DBI database =
calls=20
to the PostgreSQL server.&nbsp; I had the same problem with MySQL or any =
other=20
database.&nbsp; Uncomment out the DSN ODBC information out in the =
catalog.cfg=20
file for the database you are going to use.&nbsp; You should not need to =
change=20
anything else.</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D890480102-17112000></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D890480102-17112000>Restart interchange and the tables will be =
created with=20
the Demo information.&nbsp; It may be a little more involved then what =
I've=20
stated.&nbsp; But that will get you started.&nbsp; By default =
Interchange uses=20
the Interchage Database.&nbsp; Even if you configured it to use another =
Database=20
like MySQL or PostgreSQL.&nbsp; Hence the errors you are getting.&nbsp; =
Look in=20
the error.log in your catalog directory and see what errors you =
get.&nbsp; If=20
interchange starts correctly using the database.&nbsp; You will see in =
the log=20
file it created all of the tables and data.&nbsp;</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D890480102-17112000></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN =
class=3D890480102-17112000>Hope=20
this helps.</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D890480102-17112000></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D890480102-17112000>Mark</SPAN></FONT></DIV>
<BLOCKQUOTE style=3D"MARGIN-RIGHT: 0px">
  <DIV align=3Dleft class=3DOutlookMessageHeader dir=3Dltr><FONT =
face=3DTahoma=20
  size=3D2>-----Original Message-----<BR><B>From:</B>=20
  interchange-users-admin@minivend.com=20
  [mailto:interchange-users-admin@minivend.com]<B>On Behalf Of =
</B>Marcel=20
  Montes<BR><B>Sent:</B> Thursday, November 16, 2000 8:13 =
AM<BR><B>To:</B>=20
  interchange-users@minivend.com<BR><B>Subject:</B> Re: [ic] PostgreSQL =
- No=20
  tables created<BR><BR></DIV></FONT>This was my experience. This gave =
me 3=20
  different sympthoms (spell??):=20
  <P>1) When restarting interchange: <BR>"DBI connect failed: Can't =
connect to=20
  local MySQL server through socket <BR>&nbsp;&nbsp;&nbsp;=20
  '/var/lib/mysql/mysql.sock' (111)"=20
  <P>2) Database created but empty (nor data nor even defined tables) =
<BR>3) As=20
  the catalog wasn't initialized, when accessing through the browser:=20
  <BR>"Undefined catalog: /cgi-bin/testingthis" <BR>(testingthis is my =
construct=20
  demo test with sql).=20
  <P>I don't know how PostgreSQL&nbsp;works, I've never even installed =
it but=20
  hope it helps.=20
  =
<P><TT>------------------------------------------------------------</TT> =

  <BR><TT>&nbsp;Marcel Montes - Programmer (not a good one, though)</TT> =

  <BR><TT>&nbsp;marcel(at)multimake(dot)com</TT><TT></TT>=20
  <P><TT>&nbsp;"If our brain were so simple that we could understand =
it,</TT>=20
  <BR><TT>&nbsp; we would be so stupid that we couldn't do so"</TT>=20
  =
<BR><TT>------------------------------------------------------------</TT>=
=20
  <BR><TT></TT>&nbsp;=20
  <BLOCKQUOTE TYPE=3D"CITE"><PRE>&nbsp;&nbsp;&nbsp;&nbsp; From: Marcel =
Montes
&nbsp; Subject: Re: [ic] MySQL startup error / connect failed
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; To: interchange-users@minivend.com




Another posibility:&nbsp;

I had the same problem -as far as you describe-. Try to connect to =
database with "mysql -hHOST_IP" and
with "mysql -hlocalhost".&nbsp;
if -hHOST_IP works and -hlocalhost doesn't it surely is the same.&nbsp;

MySQL works both with TCP/IP and UNIX sockets. While connecting with =
-hHOST_IP you are connecting
through TCP/IP but with -hlocalhost, or DBI, you're trying to connect =
through UNIX sockets (someone please
correct me, I not very wise on this).&nbsp;

The mysql.sock file performs some kind of esencial function to the =
client to know if there's a server, if it exist,
then connects (a kinda PID thing if I can say).&nbsp;
Also, there's a mysql compilation directive when running configure =
(./configure
--with-unix-socket-path=3D/var/lib/mysql/mysql.sock). I'm not quite sure =
about this as I've downloaded the
binary distribution but maybe that's why mysql pointed to =
/tmp/mysql.sock, thus when DBI looked for
mysql.sock at /var/lib/mysql couldn't find it. I don't know how to =
change this setting on mysql nor DBI, so I
kinda patched my own solution, that I don't know if it is "politically" =
correct nor safe, but -at least by now-
functional...&nbsp;

My solution was to make a soft link to mysql.sock (ln -s /tmp/mysql.sock =
/var/lib/mysql/mysql.sock). I really
doubted that that would work, but it did...&nbsp;
I also learned this time that linux' soft links are really beyond from =
the
always-comparition-start-point-for-windows-users .lnk files. The link =
made with ln returns a false when
checking file of the link and the linked file doesn't exist (while if =
you ls the directory... there's the link!!!). really
neat.&nbsp;

(let me learn some english too: is the last posesive apostrophe well =
placed? how's the possesive of "linux"?)&nbsp;

hope this -finally- helped.&nbsp;

Marcel Montes wrote:&nbsp;

&nbsp; Hmmm....&nbsp;
&nbsp; run mysql with:&nbsp;
&nbsp; /usr/local/mysql/bin/safe_mysqld --skip-grant-tables =
--user=3Dmysql &amp;&nbsp;
&nbsp; (if the daemon user is mysql... if not change for whatever it =
is).&nbsp;

&nbsp; Try again and if it works then is a mysql permissions =
problem.&nbsp;

&nbsp; Heinz Wittenbecher wrote:&nbsp;

&nbsp; &gt; RH7 / latest MySQL rpm from mysql site. Perl 5.6.0&nbsp;
&nbsp; &gt;&nbsp;
&nbsp; &gt;&nbsp; DBI connect failed: Can't connect to local MySQL =
server through socket&nbsp;
&nbsp; &gt; '/var/lib/mysql/mysql.sock' (111)&nbsp;
&nbsp; &gt;&nbsp;
&nbsp; &gt; Have redone CPAN DBI and DBD installs. perl reports that =
both are up to&nbsp;
&nbsp; &gt; date. I can access the data via mysql and webmin/sql.&nbsp;
&nbsp; &gt;&nbsp;
&nbsp; &gt; Any ideas?&nbsp;
&nbsp; &gt;&nbsp;
&nbsp; &gt; What's worse is that on another machine I have it all =
working. Even tried a&nbsp;
&nbsp; &gt; tar from the working one and get same error.&nbsp;
&nbsp; &gt; Permissions on /var/lib/mysql/mysql.sock same on both =
machines.&nbsp;
&nbsp; &gt;&nbsp;
&nbsp; &gt; Any pointers greatly appreciated.&nbsp;
&nbsp; &gt;&nbsp;
&nbsp; &gt; Heinz&nbsp;
&nbsp; &gt;&nbsp;
&nbsp; &gt; _______________________________________________&nbsp;
&nbsp; &gt; Interchange-users mailing list&nbsp;
&nbsp; &gt; Interchange-users@www.minivend.com&nbsp;
&nbsp; &gt; <A =
href=3D"http://www.minivend.com/mailman/listinfo/interchange-users">http:=
//www.minivend.com/mailman/listinfo/interchange-users</A>&nbsp;

&nbsp; _______________________________________________&nbsp;
&nbsp; Interchange-users mailing list&nbsp;
&nbsp; Interchange-users@www.minivend.com&nbsp;
&nbsp; <A =
href=3D"http://www.minivend.com/mailman/listinfo/interchange-users">http:=
//www.minivend.com/mailman/listinfo/interchange-users</A>



</PRE></BLOCKQUOTE>
  <P>Kim Christensen wrote:=20
  <BLOCKQUOTE TYPE=3D"CITE">Now i have several times tried to get =
Interchange=20
    running with <BR>PostgreSQL database. I am using SuSE 7.0 and =
PostgreSQL=20
    7.02.=20
    <P>Everything during installation went fine with no errors at all. =
CPAN=20
    <BR>updates and install the missing modules. I used the construct =
catalog=20
    <BR>with makecat.=20
    <P>I started the Interchange server with the -r option and it comes =
up=20
    without <BR>any errors. It is using the PG:DBI as expected.=20
    <P>The problems is that there are NO tables created so naturally it =
does not=20
    <BR>work. I have seen on the user list that others have experienced =
the same=20
    <BR>kind of problem when using MySQL as database engine.=20
    <P>Any ideas and responses are much appreciated <BR>Regards <BR>Kim =
C.=20
    =
<BR>_____________________________________________________________________=
____=20
    <BR>Get Your Private, Free E-mail from MSN Hotmail at <A=20
    href=3D"http://www.hotmail.com">http://www.hotmail.com</A>.=20
    <P>Share information about yourself, create your own public profile =
at=20
    <BR><A href=3D"http://profiles.msn.com">http://profiles.msn.com</A>. =

    <P>_______________________________________________ =
<BR>Interchange-users=20
    mailing list <BR>Interchange-users@www.minivend.com <BR><A=20
    =
href=3D"http://www.minivend.com/mailman/listinfo/interchange-users">http:=
//www.minivend.com/mailman/listinfo/interchange-users</A></P></BLOCKQUOTE=
></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0010_01C05000.CA4ADDA0--