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
- How To Install MongoDB In Ubuntu
- Laravel 6 installation with MongoDB Database
- Creating Droplets Digitalocean With phpMyadmin
- How To Improve SQL Query Performance
- Install PostgreSQL Ubuntu 20.04 With pgAdmin4
- Command SSH key generate in ubuntu server
- Postgres Database Export
- ERROR: database "laravel" is being accessed by other users DETAIL: There is 1 other session using the database.
- Create Database In MYSQL Using PHP Script Example