[英]Can I Get list of MySql DBs from Ubuntu Command Prompt
Is there any terminal command to know the MySql Databases existing on my Ubuntu server?是否有任何终端命令可以知道我的 Ubuntu 服务器上存在的 MySql 数据库?
I know that I can check out/list all Sql DBs from within Sql by this: SHOW DATABASES;
我知道我可以通过以下方式从 Sql 中检查/列出所有 Sql 数据库:
SHOW DATABASES;
But can we execute main-main MySql commands from Ubutnu Server Terminal command prompt, without entering Sql itself?但是我们可以在不输入 Sql 本身的情况下从 Ubutnu 服务器终端命令提示符执行 main-main MySql 命令吗?
echo "SHOW DATABASES;"回声“显示数据库;” |
| mysql -u user_name -p password
mysql -u 用户名 -p密码
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.