Connect LibSQL Remote databases using the LibSQL PHP Extension
DATABASE_URL
and DATABASE_AUTH_TOKEN
.
If you already have Turso/LibSQL Database account, do following this commands:
Get the database URL:
.env
or somewhere else.
libsql://
:
https://
:
libsql://
or https://
protocol in the DSN string. The format is:
libsql://
Protocollibsql://
protocol in the DSN string to connect to the remote database.libsql://database-org.turso.io
.authToken
) for secure access, provided as random-token
."libsql://database-org.turso.io"
with the actual database name or path you intend to connect to.authToken
) for accessing the database securely.$db
) to interact with the specified remote database in your PHP application.https://
Protocolhttps://
protocol to establish a connection.https://database-org.turso.io
.authToken
) provided as random-token
for secure access."https://database-org.turso.io"
with the actual database name or path you wish to connect to.authToken
) for accessing the database securely.$db
) to interact with the designated remote database within your PHP application.libsql://
or https://
protocols with the LibSQL PHP Extension. Ensure accurate configuration of the DSN string and authentication token for successful connection establishment and secure data access.