6G数据库的导入 报各种错误的解决办法_MySQL
bitsCN.com
工具选择
一。sqlyog 这个工具还是很强大的,但是面对5个G的数据库来说,也只能罢工了,简单说,本机导入可以,从本机导入服务器不行。
二。phpadmin 自带的这个挺人家说还行,但是最后没用过,原因是看不见,因为最多50M,虽然修改配置文件可以上传但是5个G还是算了吧,没那个信心。
三。还有一个是一个PHP脚本。好像是德国人写的。这个东西,也是导入数据的,怎嘛说呢,本人是没试验成功。但是网上叫好一片,我是5G数据没点成功,这是折腾了第二天了。
四。数据库分割导入这个我也用到了,每个分割100M,汗一下。不能再小了。。。分割出60多个SQL,还是会报各种错误。这个工具也失败了。如果你想用,去网上找找吧mysql分割
下面的图片就是导入成功后的图片了,
GZ压缩式1.3G解压后变成4.52G。导入到数据库,就变成6.6G了。。。。。
最后还是用命令导进去的
mysql -uroot -p shujukuming
再说下错误吧
简单的说就是各种错误都能遇到
错误1
ERROR 5 (HY000) at line 318: Out of memory (Needed 1681784 bytes)
这个错误能报很多 是使用 -f 报出来的,大致意思是内存不足,
解决办法 :mysql -uroot -p shujukuming -f
错误2
ERROR 1062 (23000) at line 30: Duplicate entry '1' for key 'PRIMARY'
这个错误是键值错误的意思
解决办法:网上说是要清空数据表数据,可是在用数据分区的时候主键和分区时不能同时使用,把主键在更改下就行
错误3
mysql error nr.2006-mysql server has gone away
这个错误是 上传限制的问题需要修改配置文件
配置文件在 linx叫 my.conf 在windows叫my.ini
这里面的东西修改要小心了乱改是不行的。
简单的就是修改几个配置就行了
max_allowed_packet=166666m 这个是限制文件大小的由于要上传6个G所以改成1111111M 额应该够了吧
wait_timeout=288000000 等待超时。。看事改吧,我在后面加了好几个0.。。
interactive_timeout= 288000000运行超时。。。。看事改吧,我在后面加了好几个0.。。
除了几个就不要修改其他的配置文件了,注意重启下服务器
错误4
这个是个很低级的错误
mysql 版本不对 现在流行的都是5.0+
注意高版本不能导入低的版本,5.5+是不能导入到5.0+的有些查询语句不支持。
转帖请标明来源谢谢 http://skss.blog.163.com/
以上就是本人遇到的各种问题,如有其它问题请多多指教,毕竟6个G的文件啥sql也打不开bitsCN.com

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

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

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



Go language is an efficient, concise and easy-to-learn programming language. It is favored by developers because of its advantages in concurrent programming and network programming. In actual development, database operations are an indispensable part. This article will introduce how to use Go language to implement database addition, deletion, modification and query operations. In Go language, we usually use third-party libraries to operate databases, such as commonly used sql packages, gorm, etc. Here we take the sql package as an example to introduce how to implement the addition, deletion, modification and query operations of the database. Assume we are using a MySQL database.

How to install PHPFFmpeg extension on server? Installing the PHPFFmpeg extension on the server can help us process audio and video files in PHP projects and implement functions such as encoding, decoding, editing, and processing of audio and video files. This article will introduce how to install the PHPFFmpeg extension on the server, as well as specific code examples. First, we need to ensure that PHP and FFmpeg are installed on the server. If FFmpeg is not installed, you can follow the steps below to install FFmpe

Hibernate polymorphic mapping can map inherited classes to the database and provides the following mapping types: joined-subclass: Create a separate table for the subclass, including all columns of the parent class. table-per-class: Create a separate table for subclasses, containing only subclass-specific columns. union-subclass: similar to joined-subclass, but the parent class table unions all subclass columns.

Apple's latest releases of iOS18, iPadOS18 and macOS Sequoia systems have added an important feature to the Photos application, designed to help users easily recover photos and videos lost or damaged due to various reasons. The new feature introduces an album called "Recovered" in the Tools section of the Photos app that will automatically appear when a user has pictures or videos on their device that are not part of their photo library. The emergence of the "Recovered" album provides a solution for photos and videos lost due to database corruption, the camera application not saving to the photo library correctly, or a third-party application managing the photo library. Users only need a few simple steps

HTML cannot read the database directly, but it can be achieved through JavaScript and AJAX. The steps include establishing a database connection, sending a query, processing the response, and updating the page. This article provides a practical example of using JavaScript, AJAX and PHP to read data from a MySQL database, showing how to dynamically display query results in an HTML page. This example uses XMLHttpRequest to establish a database connection, send a query and process the response, thereby filling data into page elements and realizing the function of HTML reading the database.

How to use MySQLi to establish a database connection in PHP: Include MySQLi extension (require_once) Create connection function (functionconnect_to_db) Call connection function ($conn=connect_to_db()) Execute query ($result=$conn->query()) Close connection ( $conn->close())

To handle database connection errors in PHP, you can use the following steps: Use mysqli_connect_errno() to obtain the error code. Use mysqli_connect_error() to get the error message. By capturing and logging these error messages, database connection issues can be easily identified and resolved, ensuring the smooth running of your application.

According to news from this website on July 23, ASUS has launched a variety of server and workstation-level products powered by AMD EPYC 4004 series processors. Note from this site: AMD launched the AM5 platform and Zen4 architecture EPYC 4004 series processors in May, offering up to 16-core 3DV-Cache specifications. ASUSProER100AB6 server ASUSProER100AB6 is a 1U rack server product equipped with EPYC Xiaolong 4004 series processor, suitable for the needs of IDC and small and medium-sized enterprises. ASUSExpertCenterProET500AB6 workstation ASUSExpertCenterProET500AB6 is a
