Open quyen91 opened 6 years ago
Go to postgresql console sudo -u postgres psql postgres
sudo -u postgres psql postgres
Create user rails_dev create role rails_dev with createdb login password 'aqwe123';
rails_dev
create role rails_dev with createdb login password 'aqwe123';
Drop database drop database blog_development;
drop database blog_development;
Ref: https://serverfault.com/a/325596 https://www.howtoforge.com/tutorial/ruby-on-rails-ror-with-postgresql-on-ubuntu-16-04/
Error PGError: ERROR: permission denied for relation schema_migrations : SELECT version FROM schema_migrations
PGError: ERROR: permission denied for relation schema_migrations : SELECT version FROM schema_migrations
Solution:
ALTER ROLE rails_user with superuser;
Go to postgresql console
sudo -u postgres psql postgres
Create user
rails_dev
create role rails_dev with createdb login password 'aqwe123';
Drop database
drop database blog_development;
Ref: https://serverfault.com/a/325596 https://www.howtoforge.com/tutorial/ruby-on-rails-ror-with-postgresql-on-ubuntu-16-04/