Set Default Version
Set Default Software Package Version
In ServBay, you can set the default version with command-line support to be used when running command lines or related scripts for PHP, Node.js, MariaDB, PostgreSQL, etc. Below are the detailed steps to set the default version:
- Open ServBay and click on "Settings" in the left navigation bar.
- On the settings page, find the "Default Version" option.
- From the dropdown options, select the default versions for PHP, Node.js, MariaDB, MySQL, PostgreSQL, and MongoDB.
- Click the "Apply" button to apply the changes.
After setting the default version, for example, if you set the default PHP version to 7.4, running php -v
in the command line will output PHP 7.4.x (cli)
.
If you need to temporarily execute a non-default version on the command line, such as PHP 8.1, you can use the php-8.1
command to call version 8.1, like php-8.1 -v
, and it will output PHP 8.1.x (cli)
.
Similar settings apply to MariaDB, PostgreSQL, and other packages. Note that on the Service Management page, you can see a fixed icon next to the service name set as the default version, indicating that this version is the default.
Set MySQL/MariaDB Default Version
Since MySQL and MariaDB are different distributions of the same type of SQL database, they occupy the same running port and socket, so only one running version can be set as the default at a time.
For instance, if MariaDB is running, it will occupy port 3306 of the system, conflicting with MySQL.
In ServBay, users are allowed to set the default running SQL database suite and the default running version. Users can quickly switch with just one click in a matter of seconds.
For example, if a user is currently running MariaDB version 11.4 and wants to switch to MySQL version 9.0 as the default running version:
- Open ServBay's
Settings
and scroll down toDefault SQL Server
andDefault Version
. - In
Default SQL Server
, selectMySQL
and clickApply
. - In
Default Version
, selectMySQL 9.0
and clickApply
. - Setting is completed.