Can't connect to database | Page 2

Discussion in 'fixed TV-Server / Client Bugs' started by kenneta, February 10, 2007.

  1. madad

    madad Portal Pro

    Joined:
    February 24, 2008
    Messages:
    67
    Likes Received:
    0
    Ratings:
    +0 / 0
    Home Country:
    New Zealand New Zealand
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. vecnar

    vecnar Portal Pro

    Joined:
    April 21, 2008
    Messages:
    129
    Likes Received:
    10
    Ratings:
    +10 / 0
    Home Country:
    Ireland Ireland
    Hi All,
    I am having problem connecting to database too. I use mysql 5.0.51. I disabled firewalls on both computers so they can ping each other. Added a user Grant all priveleges on *.* to 'root'@'%' identified by 'somePassword'; but still no luck. Any ideas?:confused:
     
  4. sixgun
    • Premium Supporter

    sixgun MP Donator

    Joined:
    March 31, 2008
    Messages:
    80
    Likes Received:
    12
    Occupation:
    Software Developer
    Ratings:
    +12 / 0
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    I am also having this problem with MySQL.

    I have looked in the log files on my client and it seems to be getting the database connect string from the servers gentle.config file. So, I changed the file, but everytime I load up the config app it gets changed again!

    When I set up my server I left the server name blank, as I've done in previous installs. I found that if I put anything in there the connection test failed. So, the database server hostname is obviously stored somewhere else and the gentle.config file is being generated. If I could change that value I think the problem would be solved.

    Where in the registry/file system is that value held?

    Regards.
     
  5. rtv
    • Team MediaPortal

    rtv Retired Team Member

    Joined:
    April 7, 2005
    Messages:
    3,622
    Likes Received:
    301
    Occupation:
    CTO at ES2000
    Location:
    Osnabruck
    Ratings:
    +301 / 0
    Home Country:
    Germany Germany
    Show System Specs
    Just enter the correct details until "Test" is successful...
     
  6. sixgun
    • Premium Supporter

    sixgun MP Donator

    Joined:
    March 31, 2008
    Messages:
    80
    Likes Received:
    12
    Occupation:
    Software Developer
    Ratings:
    +12 / 0
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    When i enter the correct server name in the media portal client, i get

    Connected to TvServer
    Cannot connect to database.

    and in the logs it says to check the connect string, which doesn't have the hostname for the database server, which is exactly how i set it up on the server!

    So, will repeatedly entering the same hostname (which I know is correct) eventually work?

    Thanks.
     
  7. vecnar

    vecnar Portal Pro

    Joined:
    April 21, 2008
    Messages:
    129
    Likes Received:
    10
    Ratings:
    +10 / 0
    Home Country:
    Ireland Ireland
    I sorted my problem by granting access to all databases from any ip to the user on mysql server (grant all on *.* to 'root'@'%' identified by 'password'). Also for testing i disabled firewalls on both computers.

    On Client side i uninstalled and reinstalled media portal client. I am not sure where login details are stored as well. Every time i change gentle.config file everything changes back to previous settings after i run configuration app.

    Hope it helps.
     
  8. sixgun
    • Premium Supporter

    sixgun MP Donator

    Joined:
    March 31, 2008
    Messages:
    80
    Likes Received:
    12
    Occupation:
    Software Developer
    Ratings:
    +12 / 0
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    I've tried changing privileges on the database but to no avail.

    I know the hostname is correct as I can access it via ping and windows explorer. I'm convinced it's the connect string being used by the client to connect to the database.

    I've attached my log files, if you look in the MediaPortal.log file @ 2008-05-07 14:12:47.739000 you'll see the error. It also happens in a few other places in the log file.

    When I type in my hostname for the TV Server from within MediaPortal, it comes up with

    Connected to TvServer
    Cannot connected to database

    So, the hostname is resolving, but the database cannot connect because of the blank hostname i entered. Is it possible to change this without re-installing the server? If not then I will just reinstall the server again and put the correct hostname in during the setup. But, I'm sure that it wouldn't pass the connection test when I did that last time I installed. But, that was with 0.2.3.0, so maybe something has changed in the installer.

    Many Thanks.

    MediaPortal.log
     
  9. rtv
    • Team MediaPortal

    rtv Retired Team Member

    Joined:
    April 7, 2005
    Messages:
    3,622
    Likes Received:
    301
    Occupation:
    CTO at ES2000
    Location:
    Osnabruck
    Ratings:
    +301 / 0
    Home Country:
    Germany Germany
    Show System Specs
    Install latest SVN and start SetupTv with paramter /c
    This will rewrite a correct gentle.config with correct hostname..
     
    • Like Like x 1
  10. sixgun
    • Premium Supporter

    sixgun MP Donator

    Joined:
    March 31, 2008
    Messages:
    80
    Likes Received:
    12
    Occupation:
    Software Developer
    Ratings:
    +12 / 0
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    Sorry If I'm being a bit dim here, but do you mean install the latest SVN on the server or client, or both?

    Would I be right in saying that I can just run the installer without having to uninstall first?

    Thanks.
     
  11. sixgun
    • Premium Supporter

    sixgun MP Donator

    Joined:
    March 31, 2008
    Messages:
    80
    Likes Received:
    12
    Occupation:
    Software Developer
    Ratings:
    +12 / 0
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    I tried installing the latest SVN snapshot but the TvService just kept crashing.

    So, I decided to try using SQL Express. After installing that and re-installing the RC1 version of TvServer it's all working fine.

    Thanks for all the help/suggestions.
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!