Connecting Your Database · MySQL
MySQL
Requirements
- MySQL 8.0 or higher
- A database and user created for Underpeaks
Create a database and user
CREATE DATABASE underpeaks CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'underpeaks'@'%' IDENTIFIED BY 'your-password';
GRANT ALL PRIVILEGES ON underpeaks.* TO 'underpeaks'@'%';
FLUSH PRIVILEGES;
Set environment variables
NEXT_PUBLIC_DB_TYPE=mysql
NEXT_DB_MYSQL_HOST=localhost
NEXT_DB_MYSQL_PORT=3306
NEXT_DB_MYSQL_USER=underpeaks
NEXT_DB_MYSQL_PASSWORD=your-password
NEXT_DB_MYSQL_DATABASE=underpeaks
Notes
- Underpeaks requires
utf8mb4character set for full Unicode support including emoji. - If you are using a managed MySQL service (PlanetScale, AWS RDS, etc.), disable foreign key checks if required by the provider.