mac连接数据库报错,ORA-21561: OID generation failed
解决过程:
打开终端,查看hostname
hostname
发现hostname是local而不是localhost
查看hosts文件
cd /etc open hosts
内容为:
```bash
##Host Database
#
localhost is used to configure the loopback interface
when the system is booting. Do not change this entry.
##
0.0.1 localhost
255.255.255 broadcasthost
::1 localhostAdded by Docker Desktop
To allow the same kube context to work on the host and the container:
0.0.1 kubernetes.docker.internal
End of section
```
hostname和hosts文件中不一致修改hostname和hosts保持一致
sudo scutil --set HostName localhost