User defined connections

Starting with version 3.4 and above, MyWebSQL allows a custom database configuration to be defined on the login screen, other than selecting from one of the already defined options. This option is by default disabled when you download and install MyWebSQL, but it can be easily enabled if you want. After you have downloaded and installed MyWebSQL, follow these simple steps to enable custom server option:

  • Edit servers.php file in the config folder and find the line that reads:
    $ALLOW_CUSTOM_SERVERS = FALSE;

    Edit and change the line to:

    $ALLOW_CUSTOM_SERVERS = TRUE;

    Refresh the login page for MyWebSQL and now you will be able to select ‘Custom Server’ option and define the IP/hostname for the database server you want to connect to.

  • In order to avoid file system hacks on your server, SQLite database connections are not enabled for custom server option. If you are working on your development machine and would like to allow custom SQLite databases to be managed using MyWebSQL, just open the servers.php file and find this line:
    $ALLOW_CUSTOM_SERVER_TYPES = "mysql,pgsql";

    Edit and change the line to:

    $ALLOW_CUSTOM_SERVER_TYPES = "mysql,pgsql,sqlite";

    After that you can also use SQLite database connection on login screen using Custom Server option. Also note that you will need to provide the full path to the database file in the ‘Server Name’ box, since SQLite databases are regular files.