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 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 Chauhan
(Co-Founder)We Are Also Recommending You :
- SOLVED # 1118 Row size too large 8126. Changing some columns to TEXT or BLOB
- Command SSH key generate in ubuntu server
- ERROR: database "laravel" is being accessed by other users DETAIL: There is 1 other session using the database.
- Unique violation: 7 ERROR: duplicate key value violates unique constraint "users_pkey" DETAIL: Key (id)=(1) already exists.
- How To Install MongoDB In Ubuntu
- MongoDB Database Installation
- Error :unable to connect to server connection to the server at port 5432 failed timeout expired
- MongoDB Database Connection In Laravel
- Install PostgreSQL Ubuntu 20.04 With pgAdmin4
- Creating Droplets Digitalocean With phpMyadmin