Download the PHP package motomedialab/maxscale-connector without Composer

On this page you can find all versions of the php package motomedialab/maxscale-connector. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package maxscale-connector

Laravel MariaDB MaxScale Connector

A simple package designed to provide a fix for the existing Illuminate\Database\Connectors\MySQLConnector class.

When connecting to MaxScale using Laravel, the $connection->exec("use {$config['database']};"); command is run, not only creating a surplus query but also triggering a database connection error when using MariaDB MaxScale. Within MaxScale logs, you'll see an error similar to:

The reason for this, is that Laravel is trying to establish a connection with '`database_name`' (backticks) when it should simply be connecting to 'database_name' (no backticks).

As the database name has already been declared within the PDO DSN (see PR #34389), the offending line of code is effectively surplus to requirements already. All this package does is remove the surplus database selection by overriding the existing MySQL connector to remove the offending lines of code.

Installation

Install via composer composer require motomedialab/maxscale-connector

Within your config/database.php you have two options:

  1. Update your database.connections.mysql.driver config flag to maxscale

  2. Create a new configuration for MaxScale
    1. Copy the entire database.connections.mysql config array
    2. Rename the key to maxscale
    3. Change the driver flag database.connections.maxscale.driver to maxscale
    4. Update your .env file to reflect this change, e.g. DB_CONNECTION=maxscale

Once one of the above options have been completed, you should be able to connect to your MaxScale instance via Laravel no problem.

Notes


All versions of maxscale-connector with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3
illuminate/support Version ^7.0|^8.0
illuminate/database Version ^7.0|^8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package motomedialab/maxscale-connector contains the following files

Loading the files please wait ....