Converting PDF to text and insert to MySQL server - mysql

I have this document:
http://isc.wcdn.co.il/w9/v/news/files/1391927813_6747.pdf
and I wish to export all the data into a list in my MySQL database,
the problem is no matter how I try to export it it gives me gibberish, I've tried converting it with several tools and none worked properly.
Is there a way I can export the data into my MySQL database with the correct encoding?
Thank you

Related

Convert csv Import in datagrip to SQL script

I am using the Import Data Tool From DataGrip well, and I would know if is that possible, after loading a CSV file, to get the SQL script that used to do the import like
LOAD DATA IN FILE...
or how can I write the script by matching the DataGrip Import CV parameter to the SQL LOAD DATA parameters like SEPARATOR, TERMINATED BY ...
For a better understand I am facing the same problem as here and would to know if it's possible to do the same with DataGrip instead of HeidiSQL
https://stackoverflow.com/a/3635318/8280536
At the moment DataGrip doesn't support the mentioned feature.
I filed a feature request based on your description.

MYSQL CSV import Characters turn into '?'

I am new to MySQL and facing this trouble since many days ,please pardon my technical terminology. After researching a lot and failing I decided to post the question. I am using PHP and MYSQL to create customers web application. The data from user comes in an excel file which goes into the application.
The problem is this excel file has special characters all of them get converted to '?' when I import it into MYSQL using PHPMyAdmin GUI Import option.
What I have tried so far:
Converting it into csv and then uploading it via PHPMyAdmin GUI Import option , now I have read blogs
and posts to upload this file in UFT-8 character set but this is not
working it still gives me '?'. My database character set is also UFT-8.
Uploading excel directly via PHPmyAdmin GUI import option (character set UFT-8) , still not working.
Converting excel spreadsheet into Open spreadsheet document and uploading via PHPmyadmin GUI Import option - This worked the characters were intact., but when I use aggregate functions on database, it does not give me the desired result . (basically it increases my trouble going further)
If someone can help me to solve this problem with CSV import , I would really appreciate it because moving forward user will be uploading the CSV and I can easily import data in MYSQL with 'LOAD DATA INFILE' command via PHP.
Example of special characters : ' ² ' (square symbol).
I think you can try these method phpMyAdmin UTF-8, datasource , connection, database, php code

MySQL Workbench 6.1 - Error importing recordset

I'm going to be getting a new computer soon and I don't want to lose all of the data I have entered in my tables, so I decided to test out the feature that allows you to export and import CSV files. I exported a table successfully (data was transferred to Microsoft Excel in CSV file), but when I opened the file in Microsoft Excel and added a few rows and tried to import it back in to MySQL Workbench, I got the following error:
"Error importing recordset
error calling Python module function
SQLIDEUtils.importRecordsetDataFromFile"
I've searched all over for info on this, but can't find any solutions. Does anyone know what I'm doing wrong?
In Workbench, open a MySQL connection and then navigate to [Server] --> [Data Export]. There are several backup options here, including saving the data as an individual file or folder. Choose the databases you want to export, and then click [Start Export].
If you ever prefer using Excel for editing and such, then use the MySQL for Excel plugin to access MySQL databases from within Excel. However, I don't think you need it here.
To export your mySQL data, use mysqldump, which will create all the schema for you.
Excel probably added some stuff to your file and now mySQL can't understand it. The best way to find out is by comparing the files before and after the change.
That error indicates a format problem. If the file is small enough, try opening it in wordpad (or the mac equivalent) and see if there's any difference in the formatting? Could be that the delimiting got a little messed up (this can happen especially with end of row markers in MySQL, I've noticed, it can also happen in mac to pc handoffs). If all else fails you could try exporting using a different format and see if that makes a difference (maybe tsv) when you add new rows.
Another reason can be the line endings used. Depending on the system and editor used to work with the cvs file it the line endings might get changed. For me mysql supported UNIX line endings. And in the editor the line ending had been set to MAC OS 9 since I was using a MAC.
Changing it to UNIX line ending worked.
I found that it might be due to a wrong encoding of the input file.
Using Notepad++ for example (or another similar editor) you need to change file encoding to UTF-8.

Export a CSV from MODx?

I have someone with a TON of database entries (similar to wordpress posts) in their MODx site. Can I export that in a CSV?
In MODX Evolution there is a native backup component that will export in MySQL format, but not CSV.
The simplest way to achieve this is to use phpMyAdmin and export your database to CSV (or Excel, or whatever format you want) from there.

Special characters from CSV to MySQL doesn't work?

I'm saving out a .csv file from Excel and importing it to a MySQL database (with phpMyAdmin 2.6.4-pl3).
A few fields have trademark symbols. but show up as "ª". I thought it was something to do with the encoding of the fields form the database, but I have changed them and found no difference. UTF-8 at least shows the small 'a,' while others I have tried just convert it to a '?'. If I leave it at UTF-8 and manually go in after importing the .csv to change the 'ª' to '™' it works fine, but since I have about 150 products that would take forever.
I think the issue is that Excel does not export the .csv file as UTF-8, so the character gets lost. I am exporting this information to a PDF so I cannot use any standard web workarounds like I have seen on other posts.
Any ideas on a way to fix this? Thanks.
MySQL allows the specification of the encoding for each database. Either change the database's encoding to something useful, like UTF-8, or convert your input data to the current database encoding.
Use Open office SpreadSheet to import data into sql instead of Excel and CSV / txt file.
You can convert Excel or CSV into open office spreadsheet and import in phpMyAdmin