How to load file into mysql DB on a shared hosting platform?

▼魔方 西西 提交于 2019-12-10 10:53:12

问题


A process running on my machine collects data from various websites and stores it in the local mysql db. Same data is exported using SELECT INTO OUTFILE and FTPed to the shared host every few hours. My hosting provider doesn't allow LOAD DATA INFILE to be executed on the shared host? What are my other options for automated/scheduled load to MYSQL db on my shared host?


回答1:


There's lots of different solutions actually. You could export the data as INSERT statements and import that SQL file on the server, or import your current outfile dumps using a PHP script instead of using LOAD DATA INFILE, or create a webservice that allows you to update the data instead of your current dump/FTP/import scenario.




回答2:


I found an excellent solution on this webpage.



来源:https://stackoverflow.com/questions/2712910/how-to-load-file-into-mysql-db-on-a-shared-hosting-platform

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!