Today I tried something that genuinely impressed me.
I successfully imported a 500 MB MySQL dump (.sql) into ClickHouse in less than 2 minutes.
The database contained 2,025,269 rows (over 2 million records), and the entire import completed successfully.
Honestly, I wasn't expecting it to be this fast!
Seeing over 2 million rows imported in such a short time was an amazing experience.
The migration wasn't completely perfect.
I found one small issue during the import.
For a few columns near the end of the table, ClickHouse automatically created generic column names such as:
Instead of the original MySQL column names.
Fortunately, this was a very small issue, and with the help of AI, I solved it within a few minutes.
I spent some time wondering why my import wasn't working.
The reason was simple.
❌ Don't keep your MySQL dump file on the Desktop.
Initially, my dump file was stored here:
Desktop/ip_table_data.sql
The import didn't work correctly.
After moving the dump file into ClickHouse's user_files directory, everything worked perfectly.
This small step saved a lot of troubleshooting time.
# 1. Navigate to your ClickHouse installation directory
cd /Users/a9844542127/Documents/db/clickhouse
# 2. Boot up your local ClickHouse server
clickhouse server
# 3. Open a new terminal tab and create the secure landing folder
mkdir -p /Users/a9844542127/Documents/db/clickhouse/user_files
# 4. Move your source MySQL dump from the desktop into the safe zone
mv /Users/a9844542127/Desktop/ip_table_data.sql /Users/a9844542127/Documents/db/clickhouse/user_files/
MySQLDump parsing query directly from your MacBook terminal. ClickHouse streams and compresses the dataset concurrently.
clickhouse client --database="bharatbaba_clickhouse_analysis" --query="CREATE TABLE ip_table_data ENGINE = MergeTree() ORDER BY tuple() AS SELECT * FROM file('ip_table_data.sql', 'MySQLDump')"
clickhouse client --database="bharatbaba_clickhouse_analysis" --query="SELECT count() AS total_rows FROM ip_table_data"
# OUTPUT: 2025269
Over 2 million rows successfully imported in seconds!Fixing the Column Name Issue
As mentioned earlier, ClickHouse renamed a few columns to:
- c1
- c2
- c3
- c4
- c5
Luckily, fixing this was very easy.
Rename the columns using the following commands.
Rename
c1toidTrap #2: The Missing Column Names Glitch
When checking the schema usingDESCRIBE ip_table_data, I noticed a strange formatting glitch: the database mapped the columns using generic sequential labels likec1,c2,c3,c4, andc5.Why This HappenedThis isn't a bug. Because a standard.sqlscript is a massive chain of procedural transactional data commands (INSERT INTO VALUES...), the streaming parser focuses heavily on reading raw row values. Without explicit schema mapping parameters, ClickHouse automatically falls back to positional column names.The Fix: Metadata RemappingBecause ClickHouse is a highly flexible columnar database, changing structural headers requires zero disk manipulation. It modifies database metadata instantly without needing to rewrite any of your 2 million production rows.Execute these quick metadata changes to match your live tracking architecture:# Rename c1 to the unique tracker identification key
clickhouse client --database="bharatbaba_clickhouse_analysis" --query="ALTER TABLE ip_table_data RENAME COLUMN c1 TO id"
# Rename c2 to parse traffic sources
clickhouse client --database="bharatbaba_clickhouse_analysis" --query="ALTER TABLE ip_table_data RENAME COLUMN c2 TO ip_address"
# Rename c3 to track network responses
clickhouse client --database="bharatbaba_clickhouse_analysis" --query="ALTER TABLE ip_table_data RENAME COLUMN c3 TO status_code"
# Rename c4 to log referral endpoints
clickhouse client --database="bharatbaba_clickhouse_analysis" --query="ALTER TABLE ip_table_data RENAME COLUMN c4 TO country"
# Rename c5 to organize analytics timeline events
clickhouse client --database="bharatbaba_clickhouse_analysis" --query="ALTER TABLE ip_table_data RENAME COLUMN c5 TO timestamp"
The Ultimate Confirmationclickhouse client --database="bharatbaba_clickhouse_analysis" --query="SELECT id, ip_address, country FROM ip_table_data LIMIT 10"
----------------------------------------DAY1-------------------
First Time I Heard About ClickHouse! | CLICKHOUSE is There in the Blue Planet 🌍 | My First Experience
Hello friends!
Good morning!
This is Jay Bharat from BharatBaba.com.
Today is 11th July 2026, and today I heard the name ClickHouse for the very first time in my life.
I have been working in software development for many years, but today I realized that CLICKHOUSE is there in the Blue Planet, and somehow I had never heard about it before!
Today, I attended the ClickHouse meetup called "Pipes, Streams, and Queries." After attending the session, I became very curious to explore this database.
As soon as I came home, I installed ClickHouse on my local computer and started experimenting with it.
To my surprise, the installation was simple, and within a short time I created my first database, created tables, inserted records, and successfully retrieved the data.
What makes me even happier is that everything is running on my old MacBook Pro 2014.
Yes, my laptop is more than ten years old, but ClickHouse is working smoothly and saving all the data locally without any problems.
In this video, you can see all the screenshots showing my installation process, database creation, table creation, data insertion, and query results.
This is only the beginning of my ClickHouse learning journey.
My next goal is to build a complete demo project with a frontend, backend, and ClickHouse database. I want to see how well it performs in a real-world PHP application.
I am really excited about this project. I couldn't stop myself from making this video immediately after completing my first successful test.
Once the project is ready, I will upload the complete source code to GitHub and share the repository link with everyone.
If you are also exploring modern databases or hearing about ClickHouse for the first time, let's learn together.
If you enjoyed this video, please Like, Share, and Subscribe for more AI, database, PHP, full-stack development, and technology videos.
Thank you for watching.
This is Jay Bharat from BharatBaba.com.
See you in the next video.
TAGS='ai','coding','database','prompt','vibecoding'
TAGS='ai','database','prompt','coding','vibecoding'
Logged out — showing 362 public records only. Login to see 384 private items.
No memories match this filter.
Jump to detailed list ↓ · 362 clickable cards
Comments (0)
No comments yet. Be the first to share your thoughts!