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

Oct 29, 2014 10:05 AM in response to GeekDad3

Thank you so very much Geekdad. This has been a longstanding problem for me that goes back to iOS 7. Your instructions were Gold!


iOS does not allow you to delete the damaged file and the third party software and your process were the prescription for my inability to sync my iPhone 5S with my 2014 Macbook Pro. Apple should acknowledge that this is an issue and include a means to view, edit and correct the iTunes files on iPhones, iPads and iPods.

Dec 9, 2014 3:29 PM in response to GeekDad3

Like many of you, I was having a nightmare with syncing music to my 128g iPhone 6. I finally solved it, so far. I've synced back all the music I wanted to with zero issues. For me, it seemed the issues were with files that were getting conversion errors in iTunes. Not converting bitrate, but file types. What I did was, in the Browser, I added the field "type". I went through and converted anything that wasn't already AAC to that file type. Once I did that, I had no more issues. There were some ghost files I had to delete but they didn't hang the sync up. It seems that whereas in the past if there were files that it couldn't convert it would just give you a warning dialogue, that now if there are more than a few it hangs the sync up.


I guess the bottom line is a little housekeeping goes a long way, once I did all that (and yes, it was a a pain), everything works as it should.

Feb 5, 2015 11:53 AM in response to GeekDad3

There is a problem with this suggestion. In fact it did not solve the problem but made it worse.


This is on a iPhone 4, iOS 7.x, and iTunes 12.1:


In deleting the SQL Music DB on the iPhone, the 1700+ songs on the iPhone were effectively orphaned in storage but continued to occupy space, hence becoming unrecoverable "other". Reconnecting the iPhone to iTunes told iTunes the DB was not there and it proceeded to resync the 1700 songs (for several hours), yet, they never up on the iPhone as they were already there. So: We waisted the time to sync, created 7GB of "other" junk, and the songs are still not there. Deleting the SQL DB may help in some cases, but it does have serious draw backs!

Feb 18, 2015 4:50 AM in response to GeekDad3

I just found this post, it looks like it was originally posted two years and change ago so I hope you still use these forums...


I am unable to use PhoneView as it is for MAC only, which program from CopyTrans will allow me to follow your instructions? This is the closest thing I've found that looks like it'll actually help me, but I can't comply as the originally recommended program is not for me.


Please reply!

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.