connection failed for user SA (1 Viewer)

ErickTreetops

Portal Member
May 10, 2015
48
4
Brisbane
Home Country
Australia Australia
Hi,
I've just completed my first build of a HTPC. I'm in the process of installing Media Portal.
However, i get a connection fail error for the database.
"Connection Failed for User SA"
I'm running windows 8.1 64bit.
I per-installed SQL express 2012.
It's installed for windows authentication only.
Unfortunately I didn't install the management studio so i don't know what the error logs say.

Can any one tell me what is wrong.
Does media portal connect with a windows or sQL account ?

regards

Erick



























'
 

mm1352000

Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Hello and welcome Erick

    Does media portal connect with a windows or sQL account ?
    MediaPortal connects with whatever credentials you supply... though having said that, I'm not sure if the database access framework we use supports connecting with Windows accounts.

    You're stuck here, right?
    upload_2015-5-10_21-56-55.png

    The error you quoted references "SA", which is the default administrator account for SQL Server. I assume you have "SA" in the "User ID" field shown above. If you want to use a Windows account, why have you got "SA" in the "User ID" field? Why not put the name of the Windows user account?

    Regards,
    mm
     

    HTPCSourcer

    Retired Team Member
  • Premium Supporter
  • May 16, 2008
    11,418
    2,335
    Home Country
    Germany Germany
    If SQLServer was explicitely (and separately of MediaPortal) installed in Windows Authentication mode, the account sa is deactivated, You will need to install Management Studio to switch to mixed mode.

    This is particularly necessary if you are already using a MSSQL database for other purposes, e.g. a WSUS server. As far as I know MediaPortal addresses the SQL database through the SQL Server authentication mode, hence Windows authentication is probably not going to work. At least it didn't for me in such an environment where SQL Express manages both a MediaPortal and a WSUS database.
     

    ErickTreetops

    Portal Member
    May 10, 2015
    48
    4
    Brisbane
    Home Country
    Australia Australia
    Thanks for everyone's reply. I had a think about it last night. When Media portal creates it's own SQL server it must setup a sql sa account with a set password.
    When i installed SQL express prior to installing Media portal it would have created the SA account with a blank password. Which i believe is still the default.
    I can either let media portal access it with a blank password or instal management studio and reset it to the standard Media portal password. Since Media Portal is the only one accessing the database i don't see much risk security wise either way.
     

    HTPCSourcer

    Retired Team Member
  • Premium Supporter
  • May 16, 2008
    11,418
    2,335
    Home Country
    Germany Germany
    s
    When i installed SQL express prior to installing Media portal it would have created the SA account with a blank password.
    That's true for SQLExpress 2008, however, you installed SQLExpress 2012 where the default password is Password123.

    SQLExpress 2012 will probably not allow you to delete the password and leave it blank. In any case you would need to install the management studio to do so (not a big deal). Changing the password at MediaPortal level is not that easy. I am not aware of another method than to uninstall and then reinstall by selecting "Perform an Advanced Installation" instead of "One click installation". After the SQL-Server selection screen, you can enter the password for "sa" user.

    You may still encounter connection issues because of the missing mixed mode (Windows authentification but SQL authentification required). Because of this I would recommend that you download and install the SQL Management Studio, check the existing sa account, activate mixed mode and set the pasword to the MePo default "MediaPortal".
     
    Last edited:

    breese

    Retired Team Member
  • Premium Supporter
  • July 11, 2011
    3,902
    770
    65
    Arlington Heights, Illinois
    Home Country
    United States of America United States of America
    From what I am seing. the Gentle.config stores the user name and password (Line in RED for my mysql)
    This is also not Hiding the password and as such I changed the real password


    <?xml version="1.0" encoding="utf-8"?>
    <Gentle.Framework>
    <!-- See the API documentation for the Gentle.Framework.GentleSettings class for
    detailed information on the keys available in the Options section -->
    <Options>
    <!-- the default timeout value in seconds for IDbCommand instances created by Gentle -->
    <CommandTimeout>30</CommandTimeout>
    <!-- whether to enable support for Gentle-managed concurrency control columns -->
    <ConcurrencyControl>false</ConcurrencyControl>
    <!-- options: Attributes or XML (XML currently unused) -->
    <MasterDefinition>Attributes</MasterDefinition>
    <Analyzer>
    <!-- options: None, OnDemand (the default), Full -->
    <Level>OnDemand</Level>
    <!-- whether to warn about unmapped columns and other non-fatal errors -->
    <Silent>false</Silent>
    </Analyzer>
    <Cache>
    <!-- default cache strategy (use only Never or Temporary) -->
    <DefaultStrategy>Temporary</DefaultStrategy>
    <CacheStatements>true</CacheStatements>
    <CacheObjects>true</CacheObjects>
    <!-- when true Gentle will try to bypass query execution and compose
    the result from cached data alone -->
    <SkipQueryExecution>true</SkipQueryExecution>
    <!-- the scope within which to ensure uniqing
    options: Thread (default), Application or WebSession -->
    <UniqingScope>Application</UniqingScope>
    </Cache>
    <Logging>
    <!-- This setting controls the lowest log level emitted. See the
    Verbosity enum for details on the available values. -->
    <Verbosity>Warning</Verbosity>
    <!-- Do not edit this unless you know what you're doing. This setting
    controls at what level error conditions are considered fatal. -->
    <Frailty>Warning</Frailty>
    <!-- Use values defined in the LogCategories enum to turn logging on/off
    for selected categories. The available values include:
    All (all categories)
    StatementExecutionRead (select statements)
    StatementExecutionWrite (insert/update/delete statements)
    StatementExecutionOther (any other kind of statement)
    StatementExecution (any kind of statement; same as all three groups above)
    Cache (cache accesses)
    Metadata (metadata updates)
    General (everything else) -->
    <!-- The following sample first disables all categories, then selectively
    turns on various subcategories -->
    <Category name="All" enabled="false" />
    <Category name="StatementExecution" enabled="false" />
    <Category name="Cache" enabled="false" />
    <Category name="Metadata" enabled="false" />
    </Logging>
    </Options>
    <!--
    <NamespaceProviders>
    <Namespace namespace="Gentle.First" provider="SQLServer" connectionstring="..." />
    <Namespace namespace="Gentle.Second" provider="SQLServer" connectionString="..." />
    </NamespaceProviders>
    -->
    <DefaultProvider name="MySQL" connectionString="Server=Bugsbunny;Database=MpTvDb;User ID=breese;Password=PASSWORD;charset=utf8;Connection Timeout=30;" />
    <!--
    <DefaultProvider name="Firebird" connectionString="User=SYSDBA;Password=masterkey;Data Source=TvLibrary.fdb;ServerType=1;Charset=UNICODE_FSS;" />
    <DefaultProvider name="Jet" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Code\Gentle.NET\Source\Gentle.Framework.Tests\Database Files\Gentle_MSAccess.mdb;OLE DB Services=-1;" />
    <DefaultProvider name="MySQL" connectionString="Server=10.0.0.2;Database=test;User ID=xxx;Password=xxx" />
    <DefaultProvider name="PostgreSQL" connectionString="Server=10.0.0.2;Database=Test;User ID=xxx;Password=xxx" />
    <DefaultProvider name="Oracle" connectionString="Data Source=kermit.symbiote.sporadicism.com,1521;User ID=gentle;password=xxx" />
    <DefaultProvider name="OracleODP" connectionString="Data Source=kermit.symbiote.sporadicism.com,1521;User ID=gentle;password=xxx" />
    <DefaultProvider name="SQLite" connectionString="URI=file:c:/Code/Gentle.NET/Source/Gentle.Framework.Tests/Database Files/Gentle_SQLite.db" />
    <DefaultProvider name="SQLServer" connectionString="data source=127.0.0.1;initial catalog=Test;user id=xxx;password=xxx;packet size=4096" />
    -->
    <!-- IMPORTANT: You must uncomment ONLY the providers that you will be using. If a provider
    is defined below, but Gentle cannot find or load the associated library, an exception
    will most likely be raised! -->
    <Providers>
    <!-- list known provider assemblies; the assembly .dll suffix is optional -->
    <!-- Provider name="CE" assembly="Gentle.Provider.CE" /-->
    <!-- Provider name="Firebird" assembly="Gentle.Provider.Firebird" /-->
    <!-- Provider name="Jet" assembly="Gentle.Provider.Jet" /-->
    <Provider name="MySQL" assembly="Gentle.Provider.MySQL.dll" />
    <!-- Provider name="Oracle" assembly="Gentle.Provider.Oracle" /-->
    <!-- Provider name="OracleODP" assembly="Gentle.Provider.OracleODP" /-->
    <!-- Provider name="PostgreSQL" assembly="Gentle.Provider.PostgreSQL" /-->
    <!-- Provider name="SQLite" assembly="Gentle.Provider.SQLite" / -->
    <Provider name="SQLServer" assembly="Gentle.Provider.SQLServer" />
    <!-- Provider name="Sybase" assembly="Gentle.Provider.Sybase" / -->
    <!-- Provider name="SybaseASA" assembly="Gentle.Provider.SybaseASA" / -->
    </Providers>
    </Gentle.Framework>
     

    HTPCSourcer

    Retired Team Member
  • Premium Supporter
  • May 16, 2008
    11,418
    2,335
    Home Country
    Germany Germany
    Then it's simple. OP should just look for the line with SQLServer and amend the string with Password123.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    Yeah, agreed... though note that the gentle.config file may not have been created if the installation hasn't been completed. That's okay. You can create the gentle.config file yourself. If created with a correct username and password, and TV Server is able to connect, that should allow TV service to start and TV Server configuration to open. Also note, the change needs to be made in c:\ProgramData\Team MediaPortal\MediaPortal TV Server\gentle.config ... not c:\ProgramData\Team MediaPortal\MediaPortal\gentle.config
     

    ErickTreetops

    Portal Member
    May 10, 2015
    48
    4
    Brisbane
    Home Country
    Australia Australia
    ok thanks everyone. I installed the management studio and changed the SA password to the one Media Portal wanted. I've almost set it all up.
     

    mm1352000

    Retired Team Member
  • Premium Supporter
  • September 1, 2008
    21,577
    8,224
    Home Country
    New Zealand New Zealand
    ...and changed the SA password to the one Media Portal wanted.
    To be absolutely clear: MediaPortal doesn't require you to use the SA account, or a particular password. The purpose of the dialog in the screenshot I posted earlier is to enable you to enter valid connection credentials. You do not have to use the default MediaPortal credentials. In other words, I don't think you needed to install SQL Server Management Studio to change the SA password. It should have been possible to simply enter the current SA password... or even to enter another valid username and password... and MediaPortal should have been happy to use those credentials (as long as that account has permission to create a new schema/database).

    In any case, I'm glad you managed to sort this out. :)
     

    Users who are viewing this thread

    Top Bottom