Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4570258
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T19:20:10+00:00 2026-05-21T19:20:10+00:00

Is there an easy way to turn a mysql table into a redis equivalent?

  • 0

Is there an easy way to turn a mysql table into a redis equivalent?

I have a myisam table in MySQL that is basically used as a key-value store that I want to “move” to Redis so it will be super fast. Is there an easy way to do this?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T19:20:11+00:00Added an answer on May 21, 2026 at 7:20 pm

    The easiest way is to get a dump of the mysql table and parse the relevant data entries into redis commands.

    For example, a data dump would produce something like the following:

    CREATE TABLE carousel(
      id int(11),
      path varchar(200),
      title varchar(200),
      comments varchar(200)
    );
    
    INSERT INTO carousel VALUES (3,'7.jpg','Inspirar','inspiration');
    INSERT INTO carousel VALUES (4,'d.jpg','Pilotar','pilotar');
    INSERT INTO carousel VALUES (5,'8.jpg','Sentir','sentir');
    INSERT INTO carousel VALUES (6,'6.jpg','Volar','volar');
    

    First you need to decide on the key structure you want to use in redis. One idea is to use the table as the key and store the ids of each row in a set.

    For each table you would need to create a key that will hold the ids, lets call them idx:$table. Using our example we would create idx:carousel.

    As we parse the file, we would pull the ids from the first column of values (in this case) and store them in idx:carousel. Also we would store each INSERT as a hash. To do this we name the key carousel:$id and use the command hmset. The first INSERT in the example would be stored like this:

    hmset carousel:3 path ‘7.jpg’ title ‘Inspirar’ comments ‘inspiration’

    It probably sounds more complicated than it actually is, but it is quite straightforward. If you think it is a little too difficult I am willing to write one for you.

    Hope that helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there an easy way to read an entire Access file (.mdb) into a
I have an NSComboBox and I was wondering if there is an easy way
<things> <fruit>apple</fruit> <hardware>mouse</hardware> ... </things> Turn it into: {'things':[{'fruit':'apple'}, {'hardware':'mouse'}]} Is there an easy
Is there an easy way in Drupal 6 to turn off certain navigation items
Is there an easy way, or free library, that will allow you to append
Is there an easy way to have this, so i don´t need to write
Is there an easy way to deserialize a simple JSON string into a .NET
Is there an easy way to return all strings that begin with a number
I am wondering if there is an easy way to turn a string like:
Is there an easy way to iterate over an associative array of this structure

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.