简体   繁体   English

我无法在 phpMyAdmin 上上传 sql 文件

[英]I can't upload sql file on phpMyAdmin

I downloaded the sql file of the project I have and wanted to upload it to phpMyAdmin on localhost.我下载了我拥有的项目的 sql 文件,并想将其上传到本地主机上的 phpMyAdmin。 But every time I want to load I get Incorrect format parameter error.但是每次我想加载时,我都会收到Incorrect format parameter错误。 The size of my file is also 32 MB.我的文件大小也是 32 MB。 When I searched for the solution to the problem, I found phpMyAdmin - Error > Incorrect format parameter?当我搜索问题的解决方案时,我发现phpMyAdmin - 错误 > 格式参数不正确? answers on Stack Overflow.堆栈溢出的答案。 However, when I applied the answers here, nothing changed.但是,当我在这里应用答案时,没有任何改变。 For some reason I can't change it (Max: 8,192KiB).出于某种原因,我无法更改它(最大:8,192KiB)。 I am using 8.0.8 as the php version in MAMP and I made these changes in the 8.0.8 php.ini file among the files.我在 MAMP 中使用 8.0.8 作为 php 版本,并在文件中的 8.0.8 php.ini 文件中进行了这些更改。 So I think I didn't do anything wrong, but for some reason I couldn't solve the problem.所以我认为我没有做错任何事,但由于某种原因我无法解决问题。 I'm putting my php.ini file below, you can check it from there.我将我的 php.ini 文件放在下面,您可以从那里查看。

Here is my 8.0.8 php.ini这是我的 8.0.8 php.ini

; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize
upload_max_filesize = 64M

; Maximum size of POST data that PHP will accept.
; Its value may be 0 to disable the limit. It is ignored if POST data reading
; is disabled through enable_post_data_reading.
; http://php.net/post-max-size
post_max_size = 64M

I solved the problem with a friend on another forum.我在另一个论坛上与朋友解决了这个问题。 He told me to approach it from a different perspective.他告诉我要从不同的角度来处理它。 He said, instead of increasing the maximum upload size, reduce the file you will upload.他说,与其增加最大上传大小,不如减少你要上传的文件。 In short, if you are getting the same error, first compress the sql file you want to upload into a.zip file and try to install it that way.简而言之,如果您遇到相同的错误,请先将您要上传的 sql 文件压缩为 .zip 文件并尝试以这种方式安装。 Most likely your problem will be solved.您的问题很可能会得到解决。 I wish you less error days:)我希望你少犯错误的日子:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM