Simply grant all privileges to the laravel user on the application's database.
MySQL Database User GRANT permissions for Laravel?
I'm stuck deploying Laravel 4.2 to a CPanel installation. Using CPanel to make a database and user restricted to accessing the one database, I'm prompted to grant the user these permissions:
ALL PRIVILEGES
✓ ALTER
ALTER ROUTINE
✓ CREATE
CREATE ROUTINE
CREATE TEMPORARY TABLES
CREATE VIEW
✓ DELETE
✓ DROP
EVENT
EXECUTE
✓ INDEX
✓ INSERT
LOCK TABLES
REFERENCES
✓ SELECT
SHOW VIEW
TRIGGER
✓ UPDATE
I know I need to grant the user ALTER, CREATE, DELETE, DROP, INDEX, INSERT, SELECT, UPDATE ( as ✓ above) but should I give it other permissions? Do migrations and Eloquent need more than this? Or Less?
For security reasons, i think you should only grant select, delete, update and insert to your app user in production.
Have another user who can do alter, create, drop and index when running migrations.
Yeah, 2 users, migrations are not always run in production everyday and this keeps more secure your database.
Please or to participate in this conversation.