Laravel Herd

Documentation for macOS

MySQL

#
Installing MySQL via Herd Pro

MySQL is the most popular relational database engine for web development, and setting up a database server with a few clicks makes it incredibly easy to follow tutorials or get up and running with a professional setup in minutes. Many popular hosting platforms like Laravel Forge support MySQL databases out of the box, making the switch from local to production a breeze.

If you are new to Laravel and want to move from SQLite to a database service, MySQL is the best choice for most applications.

Screenshot of MySQL settings

#
Configuration

Herd provides a sensible default configuration for your MySQL instance that works seamlessly for new setups, and you can change the port of the service to run it in parallel to existing installations on your machine.

Enabling the autostart option automatically starts a service instance when you start Herd.

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3307
DB_DATABASE=laravel # set this to your project database
DB_USERNAME=root
DB_PASSWORD=

#
Database service migrations

Whether you set up a newer version of MySQL or migrate from existing instances on your machine, the most comfortable way is to use a database client like TablePlus to export and import the database tables.