MongoDB
 sql >> Baza danych >  >> NoSQL >> MongoDB

Zapytanie nie powiodło się z kodem błędu 13 i komunikatem o błędzie „brak autoryzacji w [db] do wykonania polecenia { find:

Wypróbuj to dla swojej konfiguracji Spring xml

<beans xmlns="https://www.springframework.org/schema/beans"
xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xmlns:mongo="https://www.springframework.org/schema/data/mongo"
xsi:schemaLocation="https://www.springframework.org/schema/data/mongo https://www.springframework.org/schema/data/mongo/spring-mongo.xsd
    https://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd">

    <mongo:mongo-client credentials="UserAdminNew:example@sqldat.com" />

    <bean id="mongoTemplate" class="org.springframework.data.mongodb.core.MongoTemplate">
        <constructor-arg ref="mongo" />
        <constructor-arg name="databaseName" value="NEWTest" />
    </bean>
</beans> 



  1. Redis
  2.   
  3. MongoDB
  4.   
  5. Memcached
  6.   
  7. HBase
  8.   
  9. CouchDB
  1. Argument musi być ciągiem w nodejs

  2. Zaktualizować obiekt tablicy na podstawie identyfikatora?

  3. Kolekcja fragmentaryczna MongoDB nie jest ponownie równoważona

  4. Indeks poddokumentów w mongo

  5. Paginacja poddokumentów w języku Mongoose