If you have not already, we suggest setting your Plex username to something else rather than email which is displayed on your posts in forum. You can change the username at https://app.plex.tv/desktop#!/account
Welcome to our forums! Please take a few moments to read through our Community Guidelines (also conveniently linked in the header at the top of each page). There, you'll find guidelines on conduct, tips on getting the help you may be searching for, and more!

[Rel] - Plex2MySQL - Plex Media Server Library Exporter

lexus232lexus232 Posts: 60Members ✭✭

Howdy,Plex community!
Plex2MySQL is a script that exports your media library to mysql, so that you can debug or do whatever you will with it.
This script was originally made for webDash, my other project. But I decided to release this one , as well.
How to use it? Just edit /inc/config.php and set $rpassword to whatever, also make sure you set your credentials for MySQL, then simply run everything from sql_to_exec in phpmyadmin or navicat.

What each file does?:

  • add_movies : adds movies to the database
  • add_music ; adds artists to the database
  • add_albums ,adds albums to the database
  • add_tracks , adds music tracks to the database
  • refresh_content is just for recently_added content.

Enjoy! Cheers, Alex :smile: )


  • daeksdaeks Posts: 150Members, Plex Pass Plex Pass
    edited March 2017

    just as an addition: It could be also achieved by directly accessing the sqlite db :)
    Location: appdata_path/Plug-in Support/Databases/com.plexapp.plugins.library.db
    Example DB Viewer: https://bitbucket.org/phpliteadmin/public

  • lexus232lexus232 Posts: 60Members ✭✭

    i am aware. but this is for lazy people. plus, it gives oyu a ton of options if you wanna play around with tables.

  • cmj@siteresq.comcmj@siteresq.com Posts: 1Members, Plex Pass Plex Pass

    can you please be more specific when you say "simply run everything from sql_to_exec in phpmyadmin"

    I modified the config ... I created a database called "plex_data" ... am I suppose to manually create the tables too?

Sign In or Register to comment.