使用本地计算机SQL通过命令提示符更新在线MySQL? [英] Update online MySQL with local computer SQL via Command Prompt?

查看:159
本文介绍了使用本地计算机SQL通过命令提示符更新在线MySQL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个由PHP网页脚本使用的在线sql数据库。

I have an online sql database which is used by a PHP web-script.

我正在与管理他们计算机上的本地数据库的人合作。

I'm working with someone who is managing a local database on their computer.

我需要一种方法,从计算机更新我的在线sql数据库的内容,最好使用Windows命令行。

I need a way to replace the content of my online sql database with the updated version from the computer, preferably using Windows Command Line. How can I do this?

推荐答案

您可以使用mysql实用程序来执行此操作。 mysqldump将创建更新数据库的备份,然后您可以使用mysql实用程序将其提供到您的在线数据库。

You could use the mysql utilities to do this. mysqldump will create a backup of the updated database and then you can feed that into your online database using the mysql utility.

C:>mysqldump -uUSER -pPASSWORD DATABASE > database.sql
C:>mysql -hHOST -pPORT -uUSER -pPASSWORD DATABASE < database.sql

这篇关于使用本地计算机SQL通过命令提示符更新在线MySQL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆