如何升级mysql?
升级 MySQL 时,我首先创建数据库的备份。 然后我将卸载当前安装的版本,并删除安装程序留下的所有文件。 然后我安装最新的 GA 版本,并使用 MySQL 管理器恢复创建的备份。
有没有更好的方法来升级MySQL。 因为我必须再次创建所有允许连接数据库的用户。
MySQL的安装是在一个大学招生系统中使用的,这是我使用VB.Net和MySQL开发的客户端服务器系统。 我只能在晚上进行更新,因为我知道没有人连接到数据库。
When upgrading MySQL, I first create a backup of the database. Then I will uninstall the current version installed, and delete all the files that were left by the installer. Then I install the latest GA version, and restore the created back-up, using the MySQL Administrator.
Is there a better way of doing an upgrade of the MySQL. Because I have to create again all the users that are allowed to connect to the database.
The installation of the MySQL is used in a college enrollment system, a client server system I have developed using VB.Net and MySQL. I can only do the update at night because i know no one is connected to the database.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以转储 mysql.user 和 mysql.db 表(其中包含所有用户信息),然后重新导入它们,以避免重新创建所有这些信息。 我还建议您重新导入后对桌子进行修复。
或者,您可以创建一个授权列表:
这将输出一个 sql 语句列表,然后您可以运行该列表来获取特定的授权语句。
但最终,您需要检查有关升级的特定版本信息,以确保您已考虑任何版本特定的兼容性问题。
这里是一些关于例如,4.1 - 5.x 升级。
you can dump the
mysql.user
andmysql.db
tables, which contains all the user info, and reimport that as well, to avoid having to recreate all that. i'd also suggest running repairs on the table after you re-import.alternatively, you could create a listing of grants:
this will output a list of sql statements that you can then run to get specific grant statements.
ultimately though, you'll want to check out your specific version information regarding upgrades, to make sure you've considered any version specific compatibility issues.
here is some information for a 4.1 - 5.x upgrade, for example.
为什么mysql升级这么脑残? 事实上,您需要备份所有数据、将 MySQL 安装到不同的目录、重新导入数据——只是为了升级,这是荒谬的。 必须有一种更简单的方法。
Why is the mysql upgrade so braindead? The fact that you need to back up all your data, install MySQL to a different directory, reimport your data -- just to upgrade is ridiculous. There has to be an easier way.