If it was successful, click Next to continue.Ī summary page is shown, letting you know how many rows were imported. The two steps shown will then be performed, and hopefully green ticks will appear next to them, indicating it was successful. You’ll then see the Import Data screen, which is essentially a confirmation screen. Once you’ve made any changes, if any, click Next. You can click on the wrench icon to change some more settings, such as: You can see a preview of the data at the bottom of the window. These are determined from the data in the column, but if it’s not right, you can change it. You can also see and change the data types for each column. Each of them has a checkbox to the left, indicating whether or not you want to import that column into the table. You can see the encoding, which in most cases you can leave as the default value. You’ll then see the Configure Import Settings page. ![]() ![]() In this example, the table is called “import_data”. This is helpful if you are importing the CSV file again and want to create the table from scratch. There’s a checkbox you can select called “Drop table if exists” if you want to drop the table before creating it. In this example, I’ll change the name from “data” to “import_data”, because I think data may be a reserved word. You can change this to whatever you want the table to be called, which might be needed if your table already exists. You can either select an existing table to import the data into or create a new table.Ĭreating a new table is selected by default, and the name is set to your filename. You’ll then see the Select Destination screen. Select the CSV you want to import by clicking the Browse button.Ĭlick Next. There’s no need to select a specific table from the Tables list. Right-click on the database you want to import data into and select Table Import Wizard. These are from MySQL Workbench on macOS, but the Windows version looks very similar. Your window should look like this one below. I’ll try a larger CSV file at the end of this guide and measure the performance, as you’re probably importing a file with more than 3 rows.įirst, open MySQL Workbench and connect to your database. Our CSV file is a small file with some product data in it, just for demonstration purposes: id,product_name,price
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |