[Zope] Newbie _still_ unable MySQL connection string on NT

Jens Vagelpohl tommymi@concentric.net
Thu, 23 Sep 1999 17:27:52 -0400


maybe some actual source code can clear it up ;) here is what the source
says:

----8<---more beautiful code omitted------8<-----

        raise self.Database_Error, (
            'Invalid connection string, <code>%s</code>.\n'
            'The connection should consist of a database name,\n'
            'user name, and password separated by spaces.\n'
            'The database name may include a host specification\n'
            'by following the database name with an @ symbol and a\n'
            'host name.  A sample connection string is:\n'
            '<pre>\n'
            'sample@cooldata.com public spam\n'
            '</pre>\n'
            'If the password is ommitted, an empty string will be used.'
		)

----8<---more beautiful code omitted------8<-----

so you need either <mydatabasename> <username> <password>
or <mydatabasename>@<mydatabaseserver> <username> <password>

i admit i never used MySQL on NT, i would assume if you run it as a service
it should be listening on the appropriate tcp/ip port as is. if your zope is
on the same machine as the MySQL database that should not be a factor, and
you can omit the "@<mydatabaseserver>" part of the connection string.

there is no need to put the complete path to the DB into the connection
string. it's up to the ZMySQLDA database connector to locate the database
given the simple name.

hth

jens

Jens Vagelpohl

Systems Administrator
Washtenaw Development Council


> -----Original Message-----
> From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of David
> Robson
> Sent: Thursday, September 23, 1999 14:23
> To: zope@zope.org
> Subject: [Zope] Newbie _still_ unable MySQL connection string on NT
>
>
>
> Jens Vagelpohl and Tony McDonald kindly contributed
> the correct answer to my connection string question.
> Tony summarized it as…
>
> >> MySQL@SERV3 UserName UserPW
>
> > this should work if the database you
> > want to use is called MySQL
>
> Apparently I have a deeper problem. At the very least
> I’m foundering in terminology. Is this matrix correct
> re database terms?
>
>
> Item                          Correct term
> Commonly-used term
>
> Database application           MySQL
> database
>
> Data file                      MyFileName
> database
>
> Table                          MyTableName
> table
>
>
>
>
> So…I should use a connection string like the
> following, right?
> MyFileName@SERV3 UserName UserPW
>
> But, working remotely, I haven’t created a database
> file so MyFileName doesn’t exist and, of course Z SQL
> Method won’t permit creating a database file or table
> without a connection. I’m missing something basic
> here.
>
> I tried connecting to an existing sample MySQL file
> function.tst  with no luck.
>
> Also:
>
> Should the path be represented in the db filename…as:
>    C:\mysql\examples\tests\function.tst@SERV3 UserName
> UserPW
>
> MySQL is running as an NT Service. Must I additionally
> activate a MySQL Server on port 3306?
>
>
> Confused in NTland…
>
> Dave
>
>
>
> =====
>
> David Robson            robson555@yahoo.com
> Computer Support        Towson High School, MD, USA
>
> __________________________________________________
> Do You Yahoo!?
> Bid and sell for free at http://auctions.yahoo.com
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://www.zope.org/mailman/listinfo/zope
>
> (To receive general Zope announcements, see:
> http://www.zope.org/mailman/listinfo/zope-announce
>
> For developer-specific issues, zope-dev@zope.org -
> http://www.zope.org/mailman/listinfo/zope-dev )
>