mysql_upgrade - 检查并升级 MySQL 表

WBOY
发布: 2023-08-26 18:57:15
转载
1393人浏览过

mysql_upgrade - 检查并升级 mysql 表

Let us understand mysql_upgrade program −

Usage

  • Every time MySQL is upgraded, the user should execute mysql_upgrade, that looks for incompatibilities with the upgraded MySQL server.

  • It upgrades the system tables in the mysql schema so that the user can take advantage of new privileges or capabilities that could have been added after the upgrade.

  • It basically upgrades the Performance Schema and sys schema.

  • It also examines user schemas.

  • If mysql_upgrade finds that a table has a possible incompatibility, it performs a table check and, if some problems are found, attempts a table repair operation

The mysql_upgrade can be used as shown below −

  • Ensure that the server is currently running.

    爱图表
    爱图表

    AI驱动的智能化图表创作平台

    爱图表 99
    查看详情 爱图表
  • Invoke mysql_upgrade to upgrade the system tables in the mysql schema.

Check and repair tables in other schemas using the below command −

shell> mysql_upgrade [options]
登录后复制

停止服务器并重新启动,以便使任何系统表更改生效。

如果有多个需要升级的MySQL服务器实例,则可以使用适合连接到每个所需服务器的连接参数来调用mysql_upgrade。让我们以一个例子来说明 -

通过连接到适当的端口,升级本地主机上运行的端口为3306到3308的每个服务器。可以使用以下命令来完成这个操作 -

shell> mysql_upgrade --protocol=tcp -P 3306 [other_options]
shell> mysql_upgrade --protocol=tcp -P 3307 [other_options]
shell> mysql_upgrade --protocol=tcp -P 3308 [other_options]
登录后复制

对于Unix上的本地主机连接,--protocol=tcp选项将强制使用TCP/IP连接,而不是Unix套接字文件。

以上就是mysql_upgrade - 检查并升级 MySQL 表的详细内容,更多请关注php中文网其它相关文章!

相关标签:
最佳 Windows 性能的顶级免费优化软件
最佳 Windows 性能的顶级免费优化软件

每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。

下载
来源:tutorialspoint网
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
热门推荐
开源免费商场系统广告
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号