无法成功导出并重新导入 MySql 5 中的视图

发布于 2024-08-27 12:00:53 字数 777 浏览 8 评论 0原文

当我在开发 PC 上导出数据库以在我的 Web 主机上导入时,它包含以下行:

--
-- Table structure for table `vi_sr_videntity_0`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY INVOKER VIEW `starrise`.`vi_sr_videntity_0` AS select `starrise`.`t_sr_u_identityfingerprint`.`c_r_Identity` AS `c_r_Identity`,`v_sr_videntityfingerprint`.`ID` AS `ID`,`v_sr_videntityfingerprint`.`FingerPrintID` AS `FingerPrintID`,`v_sr_videntityfingerprint`.`FingerPrintFingerPrint` AS `FingerPrintFingerPrint` from (`starrise`.`v_sr_videntityfingerprint` join `starrise`.`t_sr_u_identityfingerprint` on((`starrise`.`t_sr_u_identityfingerprint`.`c_id` = `v_sr_videntityfingerprint`.`ID`)));

大概因为它显示“root”@“localhost”,所以我的托管服务器不会接受导入。我被困住了,我不知道该怎么办。请帮助我知道如何正确地将此数据库传输到我的服务器。

When I export a database on my development PC, for import on my webhost, it contains the following line:

--
-- Table structure for table `vi_sr_videntity_0`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY INVOKER VIEW `starrise`.`vi_sr_videntity_0` AS select `starrise`.`t_sr_u_identityfingerprint`.`c_r_Identity` AS `c_r_Identity`,`v_sr_videntityfingerprint`.`ID` AS `ID`,`v_sr_videntityfingerprint`.`FingerPrintID` AS `FingerPrintID`,`v_sr_videntityfingerprint`.`FingerPrintFingerPrint` AS `FingerPrintFingerPrint` from (`starrise`.`v_sr_videntityfingerprint` join `starrise`.`t_sr_u_identityfingerprint` on((`starrise`.`t_sr_u_identityfingerprint`.`c_id` = `v_sr_videntityfingerprint`.`ID`)));

Presumably because it says 'root'@'localhost', my hosted server won't accept the import. I'm stuck and I don't know what to do. Please help me know how to correctly transfer this database to my server.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

迷离° 2024-09-03 12:00:53

通常,当您将数据导入网络托管服务器时,您需要将数据保存为sql格式。尝试使用 phpwebadmin 将数据导出为 sql 格式并将其放入托管服务器的数据库根目录中。

*假设您购买了mysql数据库服务。

确保代码中的连接类映射到 Web 上数据库服务器的位置。

祝你好运!

usually when you import the data in a web hosting server, you need to save your data to a sql format. Try to use phpwebadmin to export the data to a sql format and drop it into the database root in the hosted server.

*Assuming that you bought the mysql database service.

Make sure that your connection class in your codes is mapped to the location of the database server on the web.

Good luck!

德意的啸 2024-09-03 12:00:53

不知道为什么,但是当您从 phpmyadmin 导出时,它会添加很多在大多数情况下不需要的额外数据。例如,您可以删除多余的垃圾,如下所示:

CREATE VIEW `vi_sr_videntity_0` AS select etc..........

No idea why but when you export from phpmyadmin it add a lot of extra data that in most cases is not required. For example you can remove the extra crap so that it is like this:

CREATE VIEW `vi_sr_videntity_0` AS select etc..........
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文