ERROR: database "laravel" is being accessed by other users DETAIL: There is 1 other session using the database.

  • 14-09-2022
  • 545
  • Postgres
  • Haresh Chauhan

ERROR: database "laravel" is being accessed by other users DETAIL: There is 1 other session using the database.

This error comes when you try to drop a database from Postgres on the ubuntu server, but at that time the connection with the database already exists, so you can not able the drop database.

For DROP DATABASE 'laravel'; you just need to stop the current running database session in your ubuntu server.

There are many ways you can stop the session, but I will suggest you restart your Postgres server. so all the running sessions destroy.

ERROR:  database "laravel" is being accessed by other users
DETAIL:  There is 1 other session using the database.

We will restart postgresql service.

root@webappfix:~#sudo service postgresql restart
su postgres
psql

Drop the PostgreSQL database.

postgres=# DROP DATABASE laravel;

We always thanks to you for reading our blogs.


dharmesh-image

Dharmesh Chauhan

(Swapinfoway Founder)

Hello Sir, We are brothers origin from Gujarat India, Fullstack developers working together since 2016. We have lots of skills in web development in different technologies here I mention PHP, Laravel, Javascript, Vuejs, Ajax, API, Payment Gateway Integration, Database, HTML5, CSS3, and Server Administration. So you need our service Please Contact Us

haresh-image

Haresh Chauhan

(Co-Founder)


We Are Also Recommending You :