简体   繁体   English

.SQL从PHPMyAdmin导出到Excel或CSV

[英].SQL export from PHPMyAdmin to Excel or CSV

I inherited some old records for a company I volunteer for. 我继承了我志愿服务的一家公司的一些旧唱片。 One of the old files is an SQL Dump from their old webpage, and I would like to get the data from one of the tables for their use into Excel. 其中一个旧文件是其旧网页中的SQL Dump,我想从其中一个表中获取数据以供Excel使用。

-- MySQL dump 10.11

The dump drops the table if it exists, creates the table new, and then inserts all of the data. 如果存在表,转储将删除该表,创建新表,然后插入所有数据。

Is there some easy way I can get this data into Excel on my PC? 有什么简单的方法可以将这些数据输入PC上的Excel中? I don't have SQL Server or anything like that loaded... I assumed there was some easy way to get a CSV or Excel file out of it but I have failed to find this yet without first uploading the dump to some SQL Server. 我没有SQL Server或类似的东西被加载...我以为有一种简单的方法可以从其中获取CSV或Excel文件,但是在没有首先将转储文件上传到某些SQL Server的情况下,我还是找不到它。

Unfortunately I don't think that there is any way to export a dump file into an excel or .CSV file. 不幸的是,我认为没有任何方法可以将转储文件导出为ex​​cel或.CSV文件。 The reason for this is that the dump file is actually a collection of Select statements instead of the actual data itself. 原因是转储文件实际上是Select语句的集合,而不是实际数据本身。 SQL servers do this to prevent a whole list of problems that can occur when you try to manipulate raw data manually. SQL Server这样做是为了防止尝试手动处理原始数据时可能出现的全部问题。

Lucky for you, MySQL offers a free version of their server. 幸运的是,MySQL提供了其服务器的免费版本。 You can find it here: http://dev.mysql.com/downloads/ 您可以在这里找到它: http : //dev.mysql.com/downloads/

I think you are best off downloading this and restoring your file as a new database. 我认为您最好下载此文件并将其恢复为新数据库。 This has the added benefit of allowing you complete control over the data from that point on. 这具有额外的好处,即允许您从那时起完全控制数据。 Exporting to excel would be easy at that point however, you may find it a lot more fulfilling to continue using MySQL server. 那时导出到excel很容易,但是,继续使用MySQL服务器可能会更加令人满意。

Hope this helped. 希望这会有所帮助。

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

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