troubleshooting Question

Help with MySQL Workbench Tables/Data Types Using Mac OS

Avatar of Kathryn Johnson
Kathryn Johnson asked on
Operating SystemsDatabasesSalesRESTSQL
5 Comments1 Solution91 ViewsLast Modified:
Hi! I'm completely new to SQL and having some trouble.

I have tried altering data types in a table in MySQL after importing a csv file into MySQL on my Mac and I end up with 2 scenarios where I either lose my data or keep my data from the imported file, but I cannot change the data types. I have tried 2 different methods below.

Method #1: After creating a database in MySQL, I use the the "Table Data Import Wizard" option to import my excel csv file into the table.

By default, the data types are automatically inputted as "text" but some columns are meant to be integers (e.g.: sales numbers or percentages).
Before completing the import process using the wizard table tool, I have tried to use the dropdown icon to alter the data types into "int".

When I execute this, the data import fails, but the table updates with the correct column names, but there is no data.

Method #2: After creating a database in MySQL, I use the the "Table Data Import Wizard" option to import my excel csv file into the table.

I use all default settings using the wizard tool and my data uploads successfully into my chosen database table.

I try to then alter my table by clicking the wrench icon that appears on the left side panel when hovering over the table name.

Then, I attempt to change the first column by checking the "primary key" box and "NN". I alter the rest of my column's data types accordingly.

When I apply this, it always returns an error message.

Thanks!

Screen-Shot-2020-04-17-at-9.10.04-PM.pngScreen-Shot-2020-04-17-at-9.10.13-PM.pngScreen-Shot-2020-04-17-at-9.10.19-PM.png
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 5 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros