Psql - 'database does not exists' 是在 Valentina Studio 中创建的
Psql - 'database does not exists' while it does and was created in Valentina Studio
我已经开始学习 SQL 并在我的 Ubuntu 上安装了 Valentina Studio & PSQL。
我已经通过 sudo -u postgres psql postgres
和 \password postgres
定义了密码。
然后我输入 Valentina Studio
并使用“发现本地主机服务器- it found the
PostgresSQL”连接到此服务器,然后在终端中输入我之前设置的密码,然后它看起来不错,就像它已连接一样。
我在 VStudio
中创建了 4 个空的新数据库,并尝试向它们导入一些位于我桌面上的数据库。
我得到了 database does not exist
,而它确实如您在屏幕截图中所见。
当我尝试对 template1
psql 的 skelton 数据库做同样的事情时,它成功了。
但是为什么Vstudio和PSQL没有相互连接?
以 postgres
用户身份在 psql
中重新创建 template1
数据库的示例。
update pg_database set datistemplate = 'f' where datname = 'template1';
drop database template1;
create database template1 template template0 is_template true ;
我已经开始学习 SQL 并在我的 Ubuntu 上安装了 Valentina Studio & PSQL。
我已经通过 sudo -u postgres psql postgres
和 \password postgres
定义了密码。
然后我输入 Valentina Studio
并使用“发现本地主机服务器- it found the
PostgresSQL”连接到此服务器,然后在终端中输入我之前设置的密码,然后它看起来不错,就像它已连接一样。
我在 VStudio
中创建了 4 个空的新数据库,并尝试向它们导入一些位于我桌面上的数据库。
我得到了 database does not exist
,而它确实如您在屏幕截图中所见。
当我尝试对 template1
psql 的 skelton 数据库做同样的事情时,它成功了。
但是为什么Vstudio和PSQL没有相互连接?
以 postgres
用户身份在 psql
中重新创建 template1
数据库的示例。
update pg_database set datistemplate = 'f' where datname = 'template1';
drop database template1;
create database template1 template template0 is_template true ;