A Step-by-Step Guide to Importing Excel Data into MySQL

A Step-by-Step Guide to Importing Excel Data into MySQL


[Step 1] Database Setup for Importing Excel Data into MySQL

The first step is to create a database for importing external data. The code for this step is as follows:

#structure: create database database_name
create database biomass

After creating a database, refresh the page to display the newly created database.



[Step 2] Setting Up the Table Data

In the database you created, right click on the Tables, and select Table Data Import Wizard.

Then, you can choose the file pathway where your file is located.

Let’s create a new table in the biomass database, and I’ll name it ‘clover_dry_weight’.

Here, for each column, you can select the data type, such as text or numbers, etc.

Now, you can see that a new table named ‘clover_dry_weight’ has been created.



[Step 3] Accessing the Data File

Now, write the code below: The data will then be displayed.

#structure: select * from database name.data table name
select * from biomass.clover_dry_weight

Then, the data will then be displayed.

Alternatively, you can click the button next to the data table. This action will open a new window where you can also view the file.



Leave a Reply

If you include a website address in the comment section, I cannot see your comment as it will be automatically deleted and will not be posted. Please refrain from including website addresses.