如何通过 phpmyadmin 导入一个非常大的查询?
如果我的主机不允许我将文件直接上传到我的 mysql 文件夹我只能通过 phpmyadmin 这样做吗?除了其本机导入功能外,还有其他选择吗,以便我的连接在上传大约 8mb 的查询时不会超时?
if my host does not allow me to upload a file directly to my mysql folder and i can only do so throught phpmyadmin? are there any alternatives aside from its native import feature so that my connection would not time out while uploading a query that's around 8mb?
推荐答案
您可以 gzip 或 bzip 文件,phpMyAdmin 将解压并运行脚本.
you can gzip or bzip the file and phpMyAdmin will decompress and run the script.
否则我过去必须做的是将我的 SQL 拆分为多个文件并单独加载每个文件.您只需在文本编辑器中打开 SQL 文件,向下滚动大约一半,找到语句的开头,然后将其后的所有内容移动到另一个文件中,即可完成此操作.
otherwise what I've had to do in the past is split my SQL into a number of files and load each one individually. You can do this simply by opening the SQL file in a text editor, scroll to about half way down, find the start of a statement and move everything after that into another file.
相关文章