获取存储库中当前 MySQL 构建的版本号
我正在使用 Ubuntu Natty。
在完成惯用的 apt-get 更新和升级之后,我需要什么 shell 命令或脚本来获取软件存储库中当前活动 MySQL 版本的版本号?
现在我知道是5.1。但我希望能够查询它以了解它何时更改,因为我有一些依赖于此版本号的 shell 脚本。
提前致谢。
I'm using Ubuntu Natty.
What shell command or script would I need to get the version number of the currently active MySQL build in the software repository i.e. after I've done the customary apt-get update and upgrade?!
Right now I know it's 5.1. but I want to be able to query this to know when it changes as I have some shell scripts that rely on this version number.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您想知道安装了什么,或者当前正在运行哪个版本的 mysqld?如果是后者:
请记住,您可能有多个 mysqld 实例在不同的端口上运行和侦听,因此您可能想知道在您感兴趣的特定端口上运行的守护程序的运行时版本。(换句话说,查询apt-get 获取有关已安装内容的信息可能不是您想要的。)
Do you want to know what is installed, or which version of mysqld is currently running? If the latter:
Keep in mind that you may have multiple instances of mysqld running and listening on different ports, so you probably want to know the runtime version of the daemon running on the particular port you are interested in. (In other words, querying apt-get for info about what is installed is probably not what you want.)