Loading...
 

AdminDSN

Old content

[+]

DSN Syntax


To define the DSN, you need to specify:

  • Database Type If you are using MySQL, the database type is mysql. If you are using Postgresql, the database type is "pgsql".
  • User Supply the name of the user that is qualified to access the database server.
  • Password Supply the password for the qualified user.
  • Database name Supply the name of the database that contains the desired data.


Here's the syntax:

DSN format: database-type://user:password@host/database-name

Tutorial


In this example we are creating a DSN for the database tiki in host localhost using the user root and the password seldon. The DSN will be named cosa (as in "Cosa Nostra").

Here's how the DSN looks:

mysql://root:seldon@localhost/tiki


When a DSN is created with name foo the permission tiki_p_dsn_foo is automatically created. Only users with that permission can use the DSN to create a query or view the results of a query using that DSN. For more information on the permissions aspect of the SQL plugin, see PluginSQL.

For more information

See PluginSQL to learn how to insert SQL queries in Wiki pages.

Created by: Last Modification: Monday 06 August 2007 15:24:12 GMT-0000 by Marc Laporte
List Slides