在 Ubuntu 上“连接 sqladmin”通常有两种理解,我分别说明,你看看是哪一类:
如果你已经在服务器上部署了 SQLAdmin(如 sql-admin、adminer、pgAdmin):
# 假设服务运行在 8080 端口
http://localhost:8080
如果是远程服务器:
http://服务器IP:8080
确保服务已启动:
systemctl status sqladmin
# 或
docker ps
sudo apt install mysql-client
mysql -h 127.0.0.1 -u root -p
sudo apt install postgresql-client
psql -h 127.0.0.1 -U postgres -d 数据库名
sudo apt install freetds-bin
连接:
tsql -H 服务器IP -p 1433 -U 用户名 -P 密码
或使用 sqlcmd:
sudo apt install mssql-tools unixodbc-dev
sqlcmd -S 服务器IP -U 用户名 -P 密码
docker run -d -p 8080:8080 sqladmin/sqladmin
然后浏览器访问:
http://localhost:8080
sudo ufw allow 8080bind-address = 0.0.0.0如果你能告诉我:
我可以给你更精确的命令。