grant database access to user in mysql specific permission code example Example: mysql user permission database GRANT ALL PRIVILEGES ON `db_name`.* TO 'user'@'host'