Enter your desired password, making sure to record it so that you can use it in a configuration file in a future step. You also specified the -P flag, which means you will be prompted to enter a password for your new role. The -d flag gave the role the permission to create new databases. In this command, you used createuser to create a role named appname. To create a new role, run the following command, replacing appname with whatever name you’d like to give the role: In order to keep these superuser privileges separate from the database instance you use for your Rails application, in this step you will create a new role with less access. When starting PostgreSQL with Homebrew, you will automatically have a superuser role created with your macOS username. In PostgreSQL, roles can be used to organize permissions and authorization. Step 2 - Creating a Database Role for Your Application Once PostgreSQL is installed, the next step is to create a role that your Rails application will use later to create your database. To start the service and enable it to start at login, run the following:Ĭheck to make sure the installation was successful: ![]() Then, apply the changes you made to your ~/.bash_profile file to your current shell session:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |