Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 4 of 4
  1. #1
    Senior Member
    Join Date
    Apr 2005
    Location
    Colorado
    Posts
    10,073

    Syntax for dbsource?

    To run with a separate installation of MySQL, what's the syntax to use in the dbsource setting in the prefs file? Here's what I had prior to the merging of the split-scanner branch:

    dbsource: dbi:mysql:dbname=slimserver

    Here are the new default settings using the Slim installed MySQL:

    dbsource: dbi:mysql:hostname=127.0.0.1;port=9092;database=%s

    Are the hostname and port required or will they default to localhost and to the standard MySQL port? Do you just substitute the database name in place of '%s'?

  2. #2
    Perl Commando Dan Sully's Avatar
    Join Date
    Apr 2005
    Location
    Daly City, CA
    Posts
    2,864

    Syntax for dbsource?

    * JJZolx shaped the electrons to say...

    >Here are the new default settings using the Slim installed MySQL:
    >
    >dbsource: dbi:mysql:hostname=127.0.0.1;port=9092;database=%s
    >
    >Are the hostname and port required or will they default to localhost
    >and to the standard MySQL port? Do you just substitute the database
    >name in place of '%s'?


    They will default. %s gets substituted to 'slimserver'.

    This is my dbsource line:

    dbsource: dbi:mysql:database=%s

    -D
    --
    On a long enough timeline, the survival rate for everyone drops to zero.

  3. #3
    Senior Member
    Join Date
    Apr 2005
    Location
    Colorado
    Posts
    10,073
    Quote Originally Posted by Dan Sully
    * JJZolx shaped the electrons to say...

    >Here are the new default settings using the Slim installed MySQL:
    >
    >dbsource: dbi:mysql:hostname=127.0.0.1;port=9092;database=%s
    >
    >Are the hostname and port required or will they default to localhost
    >and to the standard MySQL port? Do you just substitute the database
    >name in place of '%s'?


    They will default. %s gets substituted to 'slimserver'.

    This is my dbsource line:

    dbsource: dbi:mysql:database=%s
    So for a database name other than 'slimserver', I take it that it's simply

    dbsource: dbi:mysql:database=someothername

    What was 'dbname' prior to the merge is now 'database'?

  4. #4
    Perl Commando Dan Sully's Avatar
    Join Date
    Apr 2005
    Location
    Daly City, CA
    Posts
    2,864

    Syntax for dbsource?

    * JJZolx shaped the electrons to say...

    >dbsource: dbi:mysql:database=someothername


    Yes.

    >What was 'dbname' prior to the merge is now 'database'?


    'dbname' was the syntax that the SQLite driver used.

    To see the syntax for a particular driver:

    perldoc DBD::mysql
    perldoc DBD::SQLite

    etc.

    -D
    --
    <iNoah> all your base class are belong to us

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •