bitsCN.com
技术仓库
引子:
今天为论坛进行服务器空间的转移~~~先顺利将Mysql数据库用phpmyadmin导出~~
然后在新服务器上建好数据库后,然后进行导入!可是因为MySQL数据库的.sql文件大于2MB。所以在导入时就提示说超过2048KB的错误,不让导入….于是就引出了此文的解决办法,呵呵
解决办法:
1、打开php.ini。找到 upload_max_filesize 、 memory_limit 、 post_max_size 这三个参数!
(在默认的情况下,php只允许最大的上传数据为2M,也就是2048KB,而极限的最大使用内存memory_limit也仅为128M,Post的最大也为2M)
2、按您的服务器的实际性能配置进行如下改动:(注意:以下是按我的服务器性能和硬件配置进行的更改..)
upload_max_filesize = 8M (上传最大极限设定为8M,这个应该足够一般的文件WEB上传了)
memory_limit = 512M (因为服务器的内存为2GB,所以这里加到512M不过份吧,呵)
post_max_size = 8M (Post数据最大也设置为8MB,这个跟upload_max一样)
3、改完之后,我重新启动系统,再重新执行导入命令后:
Import has been successfully finished, 399 queries executed.
(显示导入成功,有多少个请求处理成功…)
(备注:改完后当你在到phpMyadmin的导入命令行时,虽然(有时候可能会仍然显示为:最大限制:2048KB/Max: 2,048KiB);但实际上你已经可以导入不超过8M的MySQL数据库.sql导出的备份文件了! 另,改完php.ini后,别忘了重启一下web服务或者是服务器哟!重启后升效!)
就此记录,希望对遇到同样问题的朋友有所帮助~

The article discusses using MySQL's ALTER TABLE statement to modify tables, including adding/dropping columns, renaming tables/columns, and changing column data types.

Article discusses configuring SSL/TLS encryption for MySQL, including certificate generation and verification. Main issue is using self-signed certificates' security implications.[Character count: 159]

Article discusses strategies for handling large datasets in MySQL, including partitioning, sharding, indexing, and query optimization.

Article discusses popular MySQL GUI tools like MySQL Workbench and phpMyAdmin, comparing their features and suitability for beginners and advanced users.[159 characters]

The article discusses dropping tables in MySQL using the DROP TABLE statement, emphasizing precautions and risks. It highlights that the action is irreversible without backups, detailing recovery methods and potential production environment hazards.

Article discusses using foreign keys to represent relationships in databases, focusing on best practices, data integrity, and common pitfalls to avoid.

Article discusses securing MySQL against SQL injection and brute-force attacks using prepared statements, input validation, and strong password policies.(159 characters)

The article discusses creating indexes on JSON columns in various databases like PostgreSQL, MySQL, and MongoDB to enhance query performance. It explains the syntax and benefits of indexing specific JSON paths, and lists supported database systems.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

Notepad++7.3.1
Easy-to-use and free code editor

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software
