MariaDB/MySQL Database Connection Generator
integrate database connection to your application
mariadb-database-connect
Provide an access to database tables from your Laminas application. Use and retrieve your Datbase class in TableGateway way available from Service Manager via key: Laminas\Db\Adapter\Adapter and Laminas\Db\TableGateway\TableGateway .
Required Laminas Components
- laminas/laminas-db
On-line Generator
Setup Instructions
- Copy and paste file contents of global.php into config/autload/global.php
- Copy and paste file contents of local.php into config/autload/local.php
- Enter your database user and password credential to your copied local.php file.
Throubleshooting
Make sure your application contains all the required plugins from "Required Laminas Components" and "Required Laminas Kit Components".
You can learn how to add missing dependencies in this video:
You can learn how to add missing dependencies in this video:
aa
Parameters
Param name | Type | Default value | Description |
---|---|---|---|
db_host | text | NULL | Sets a database host name |
db_name | text | NULL | Sets a database name |
CLI Usage
"vendor/bin/laminas.bat" mvc:mariadb_database_connect <db_host> <db_name>
Example Usage
"vendor/bin/laminas.bat" mvc:mariadb_database_connect localhost laminas_db