[How-to] Migrer les informations de MySQL vers CouchDB - Tutoriels serveur

Methods to migrate to CouchDB from MySQL

As you understand, we now have now three alternative for storing information instantly accessible now:

  • First : use the outdated mysql library from essentialmode <= 2 (not recommanded as a result of it breaks servers with bugs associated to DataReader for instance)
  • Second : use a customized mysql library launched by @Brouznouf : mysql-async ([Release] MySQL Async Library – 3.3.2, there’s a information about this one)
  • Third : use CouchDB utilized by EssentialMode >= 3

If there’s extra, sorry, please discover me ^^’

However on this tutorial, we’ll see find out how to migrate MySQL information to CouchDB for individuals who needs to check it or develop with it.


In case you are a developper, you may have to consider a brand new construction about your information

Requirement :

  • Having a working CouchDB 2 setup
  • Having PhpMyAdmin or data concerning the instrument you might be utilizing

1/ Export a desk (not all desk, only one, instance : police), with phpmyadmin or any instrument you like, in JSON Format

2/ Create a brand new database on couchdb associated to information you’ll export

3/ We’re going tu use curl so should you you could have Home windows, I recommand you to put in GitBash. On Linux, you may simply obtain packages

  • Linux
    • Please set up curl package deal (should you don’t know the way, it relies upon the distribution of your linux, so check with Google)
  • Home windows
    • Set up GitBash :
      I recommand to not change default settings throughout set up should you don’t know what you might be doing besides about PATH surroundings (check with image)

4/ Open GitBash/terminal and go to the listing the place your exported file is (within the instance, my police.json is on the Desktop)

  • Linux
    • Use cd to vary listing (I believe you know the way to do :souriant: )
  • Home windows
    • Go to the listing you set your file then Left-Click on and choose “Git Bash right here”
      Sorry for French texts by the best way ^^

Now, you need to have this sort of window

5/ Now it’s important to edit your exported file :

6/ Sort in GitBash/terminal :

curl -X POST 'http://person:[email protected]:port/dbname/_bulk_docs' -d @yourFile.json -H 'Content material-Sort:software/json'

7/ End :souriant:

Now you are able to do this tutorial for every desk you could have in MySQL server
You may as well verify on Google find out how to work together with CouchDB from FiveM and verify
You may as well use essentialmode >= 3 by @Kanersps and verify his Wiki (

I hope this tutorial may also help a few of you.
If there’s any errors, please discover me and I might right them :clin d'œil:

Premium ESX Scripts? Click here!

Laisser un commentaire
Scripts ESX FiveM

Les meilleurs scripts et cartes

Meilleur soutien

Problèmes? Nous sommes là pour aider!

Large gamme de produits

Nous avons une large gamme de produits

Paiement sécurisé 100%

Facile et crypté