MySQL now allow data to be imported by phpMyAdmin - mysql

I have just ended up creating Django website and now using phpMyAdmin I am importing large data sets in my mode. However, it appears that there is something wrong with the column values which I am trying to import via phpMyAdmin. I see the following error:
#1366 - Incorrect string value: '\x93Desig...' for column 'sku_description' at row 1
If it was one or two columns I could've manually fixed it. However, as I mentioned there is tons of data in there. What would be the most practical solution for this problem?

Nevermind. I solved it by changing the encoding in excel.
In Excel 2010, save file as CSV and before clicking save, click on Tools->Web Options->Encoding->Unicode(Utf8) and save it. Now import it into MySQL via phpMyAdmin.

Related

SSIS - Exporting data with commas to a csv file

I am trying to export a list of fields to a csv file from a database.
It keeps putting all the data onto one column and doesn't separate it. When checking the preview it seems to be okay but on export its not working. Currently trying to following settings. Any help would be appreciated.
SSIS settings
Excel file output issue
Actually it seems to work, Excel is just too dumb to recognize it.
Mark the whole table, then go to Data -> Text in Rows
And configure the wizard (Separeted, Semikolon as Separator):
Now you have seperated the rows and cells:

How can I export .csv files correctly?

I've got two tables (8/~150 columns). The first one gets filled with personal data, while the second one is a "checklist" which is filled with one character.
I created a query, which concatenates both tables, to export it as a .csv file. When I try to do so (with the export wizard) I get this exception:
The Microsoft Access database engine could not find the object 'filename.csv'. Make sure the object exists and that you spell its name and the path correctly.
I double checked, tried to do it with VBA, but nothing worked.
I don't know what I should try to do.
I'm hoping that someone can help me
Paul

Microsoft Access export via ODBC - ODBC Error 1265

I am trying to export a datatable from Microsoft Access 2016 via ODBC Export to a MariaDB. I have tried:
do a right click on the datatable and choose "Export" --> "ODBC-Database"
then choose the preconfigured ODBC User-DSN
Then I get the ODBC-Call Error:
"ODBC-Driver[...] Data truncated for column 'TotRev' at row 1 [#1265]"
I have tried different codings, as I got other error codes before which were related to that.
I would really appreciate a hint for this solution. The used Database is MariaDB with utf8-mb4 encoding.
Having no familiarity at all with MariaDB - my only suggestion is to export out of Access to a neutral format; either text file or excel.
Then on the MariaDB side - import the neutral file.
I have solved the problem: One specific characteristic with Access is that there exists a datatype currency. This is the problem and so the question is how to get rid of it. Just changing the datatype did not work, as Access run out of memory. The reason is, that Access tries to keep both tables (old datatype + new datatype) in memory.
To solve this problem I found a nice explanation on Microsoft pages. What I did is to follow the hint on this page:
Microsoft forum entry by John W. Vinson/MVP
Here his advice:
"[...]An alternative way to accomplish this task requires a couple of steps but works with any size table:
Rename the table to tablename_old
Copy and paste it to tablename, using the option design mode only
Change the datatype in the new empty table
Run an Append query to migrate the data
It may be necessary to drop and reestablish relationships.[...]"
As I am not familiar with Access here the link to office support how to append an query
Add records to a table by using an append query

Importing partial data into MySQL from CSV

I have a CSV that is a partial projection of an origin table. I have the same table structure in my DB.
I would like to import only those columns into my DB, given that no additional NOT NULL constraints are in place (I explicitly disabled some of them). I don't know how to import them.
I have tried the following: from MySQL Workbench, right click on table and then Edit table data, then on the screen I tried the "Import records from an external file" button, loaded the CSV file but I got the following error:
[Window Title]
MySQL Workbench
[Main Instruction]
Error importing recordset
[Content]
error calling Python module function SQLIDEUtils.importRecordsetDataFromFile
[OK]
The column names are the same as in the DB but these are partial (not all columns as DB). The table is currently empty.
What can I do to import the data into MySQL?
It turns out that is the error that tool gives for ANY problems importing CSV data. They have opened a bug for more descriptive error responses.
For me it turned out that it can not work with non-Windows line breaks. So if your file came from Unix/Linux or Mac it will not work. You can just open it in Excel though and re-save it as an MS-DOS CSV and then it works. Other things that can make it throw up are any use of ";".
Also the tool has NO column mapping options so you have to have your import file matched to the table setup perfectly. If you have columns mis-matched or data types mis-matched it will also throw-up.
I got the same question and error when I was importing a csv file into MAC Mysqlworkbench.
I restored my file as windows comma separated (.csv). This works for me.
Check do you have permissions to import (on insert), and if you import clearing old data check do you have permissions on delete.
If it won't help, create a new table with least restrictions which has absolutely identical columns as in CSV file, try to import to it. If ok - just update/insert into your target table
If it won't help, try to import on another database.
If it won't help, check CSV file - is all contents is ok? (may be it should try first)

PHPMyadmin import CSV creates new table

I am trying to import some data into a MySQL 5.5.31 table from a CSV file using PHPMyadmin 4.0.0.
When I try to import, the import "works" but it creates a new table rather than imports into the current table - the new table is assigned a sequential name by PHPMyadmin and, whilst the data is viewable, the data is not usable as the table does not contain a unique column.
Here is a screenshot of the settings I am using to import which also shows I am trying to import into the table:
And here is the result I get from PHPMyadmin:
Any idea why this is happening? I have tried searching for the "The following structures have either been created or altered" message but found nothing here and only a few things on Google but none of the Google responses were of any help.
Not allowed to comment on Madhura Jayaratne's reply, but - because people trying to import ODS will look at this thread - it is worth pointing out that it is only partly correct. CSV has been fixed but the same bug still exists for ODS in phpMyAdmin 4.0.5.
This is a bug in phpMyAdmin and it has been fixed since version 4.0.1. See 14 item under 4.0.1.0 (2013-05-14) section of the change log file. Upgrade to 4.0.1 or a version greater than that.
Instead of phpmyadmin try SqlYog .SqlYog is userfriendly.Just try it