You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

💡 Did you know?

⏺ If you can't accept iCloud Terms and Conditions... Learn more >

⏺ If you don't see your iCloud notes in the Notes app... Learn more >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Resolution Steps: iPhone, iPad or iPod Touch library corrupted and showing ghost entries which will not play or music that is on the device in iTunes but inaccessible.

Issue: iOS Music application either has items listed in the library that will not play; or has an empty library but iTunes reports that music is present on the device and taking up space; or a combination of these issues coupled with the inability to resolve the problem through the standard resolution steps of disabling music syncing to remove all music and then re-enabling or by enabling "manually manage library" and removing the items.

Additionally, attempting to restore from a back-up does not resolve the issue and the default response from the Apple Support Community is to factory restore the device and treat as new device, resulting in loss of all settings and basically starting from scratch.


Cause of issue: Corrupted iOS device iTunes library (MediaLibrary.sqlitedb). This database stores the iTunes Media records and related information such as playcount, lyrics etc. It does not store information and settings regarding iOS Applications as far as I am aware so this should be safe.


Resolution Steps:

  1. Perform a back-up to your local computer rather than iCloud if practical. This will be quicker in the event of issues.
  2. Download a iOS device manager such as Phone View (http://www.ecamm.com/mac/phoneview/) which will allow you to directly access the file structure of the device. (This will NOT require an illegal jailbreak to be performed!)
  3. Enable the Advanced View mode so the entire disk structure is accessible.
  4. Browse to the following file: iTunes_Control/iTunes/MediaLibrary.sqlitedb
  5. Rename MediaLibrary.sqlitedb to MediaLibrary.sqlitedb-backup or similar
  6. Hold down POWER and HOME on your iOS device until the Apple logo appears. Release both buttons.
  7. When device has rebooted, connect to iTunes and synchronise it.
  8. iTunes will detect that the Media Library on the device is missing and recreate it based on the items that it has listed in the iTunes synchronisation record for the device.

iPhone 4, iOS 5.1

Posted on Apr 28, 2012 6:14 AM

Reply
40 replies

Jul 8, 2017 8:48 PM in response to GeekDad3

This solution has helped me a number of times and I thank you for your help.


The problem will be a recurring one until Apple fixes iOS so that it can handle iTunes purchased movies(.m4v), iTunes rentals(.m4v) and imported .mp4's. The new TV app will not allow for the proper import of movies from these three categories at the same time. It does not matter if the iPad mini or iPad Air 2 have music synched or not as was claimed in other posts.


It is my conclusion that the TV app's database can't accept the three types of files, as the old movie app did at one time. The only solution that works consistently is to only synch purchased iTunes content to the 'broken' TV app. Any movie files that you have in iTunes that were created with Handbrake or another source need to uploaded to the VLC app, which works better than the TV app anyway. I have wasted days worth of time trying to synch videos to the native apple movie app and this TV app prior to a flight.

May 10, 2012 7:31 PM in response to GeekDad3

Oh my god! You are my saviour! I spent at least 8 hours trying to find why Music was crashing when I was going in the Songs tab or modifying a playlist. Tried all the steps documented on the web. Then, I used Xcode to see the error logs on my iPhone. And this is where I saw SQL errors and crashes. A quick search on Google brought me here, and your solution fixed my issues!!!!



Thanks to much!

Jun 30, 2012 12:24 AM in response to ThisUserNameHasNotBeenTaken

In my instance, manually deleting the music did not resolve it either. I had just under 1000 ghost entries on my iPhone and I manually deleted them all, rebooted and they came back. That was an hour or so of my life totally wasted. However, I didn't try it with the master "music" record as you describribe, so yes, that is well worth attempting first.

Nov 23, 2012 2:08 AM in response to GeekDad3

This really helped me! It worked like a charm. I took another route in deleting the file because I work on Windows systems. I usediPhoneBrowser in order to view the files. Then, I created a backup of the file, and renamed it to something else. Like you said, iTunes generated the missing file and all the media played again.


Just a heads up for whoever might encounter this. I believe this error is cause by doing some sort of force quit while the ipod or iphone is syncing. Allow it to finish syncing or you may encounter this type of corrupt files all the time.


Thanks again for your help!

Dec 9, 2012 2:55 PM in response to GeekDad3

I signed up to apple communities to give my most sincere thanks for this solution. My phone was not displaying cover art when I would use the "Convert Higher Bitrate Songs to ---KBps AAC" feature. After using this solution, then unsyncing and resyncing my music library, my collection looks beautiful, and I can carry much more, now that I'm not carrying around full lossless files.


Grazie!

Jan 5, 2013 6:32 PM in response to ThisUserNameHasNotBeenTaken

michaelfromstockton on tees wrote:


I've found an easier way, just go to settings>general>usage>music. Then swipe it and press delete, i think this deletes the database described above, then re-sync, this worked for me anyway. Good luck, you need it with Apple software.


I don't have a large library of music on my iPhone 4s since I've only had it since Oct 2012, but since the update to iTunes 11 in early December, my album artwork has been all messed up. Everytime I would try to add new music, it would assign the wrong album artwork to anything new coming in. And in addition to that, it would also mess up album artwork of music already on my phone. Everything looked correct in iTunes, but on my phone, not so much. After trying to unsynch, then synching again, my frustration level was at an all-time high. This problem seems to be everywhere online, but no concrete solution for everyone.


I finally came across your simple solution (at least for me because of my small inventory of music) of just deleting all the music through the settings, and then re-synching to add back my music. Now all of the album artwork is correct again. I'm almost afraid to add new music for fear the artwork will get mixed up all over again! I still think my issue is somehow connected to the iTunes 11 update because up until then I had no issues whatsoever. Anyway, thanks for an easy solution that worked for me. 🙂

Jun 8, 2013 7:47 AM in response to ThisUserNameHasNotBeenTaken

michaelfromstockton on tees wrote:


I've found an easier way, just go to settings>general>usage>music. Then swipe it and press delete, i think this deletes the database described above, then re-sync, this worked for me anyway. Good luck, you need it with Apple software.


This was "the ticket" for me, after months of frustration! I had the "ghost" songs on my iPhone 4s, from a time that I was syncing with iTunes on a different computer. I just could NOT figure out how to make them disappear!! THIS solution was SO simple, and it worked perfectly for my situation. THANK YOU!

Resolution Steps: iPhone, iPad or iPod Touch library corrupted and showing ghost entries which will not play or music that is on the device in iTunes but inaccessible.

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.