Tag:Database

  • MongoDB Security

    Time:2022-1-19

    1.  Security Mongodb provides a series of protection measures to protect itself: Enable access control and authenticate Mongodb supports a variety of identity authentication mechanisms. The default authentication mechanism is scram Configure role-based access control First create an administrator account, and then create other accounts. Create a unique mongodb account for each person and application […]

  • Store a tree in the database to realize infinite classification

    Time:2022-1-19

    The original text is published on my blog: https://blog.kaciras.com/article/6/store-tree-in-database In some systems, classifying content is a necessary function. For example, e-commerce needs to classify goods to facilitate customer search; The forum will also be divided into many sections; The portal website also has to classify the content of the website. Classification is indispensable for a […]

  • The architect’s path – HTTPS underlying principles

    Time:2022-1-19

    Introduction Part IThe architect’s path – HTTPS underlying principlesI mentioned the above overall view, and the article also introduced the basic skill of really solving problems in time and correctly at work: a thorough understanding of the principle. Today, take redis cluster analysis as an example to introduce the basic skill of timely and sensitive […]

  • Exception: store MySQL escape data to ensure the accuracy of data storage

    Time:2022-1-19

    [read the full text] **1. Why use escape? ** Because when using MySQL database for data storage, if there are special characters, the saved data will be missing. For example, when a file path needs to be inserted into the database as a string, the saved string will be incomplete if the string contains special […]

  • Node. JS performance optimization

    Time:2022-1-19

    WeChat official account: [front end pot]A little technology, a little thinking.For questions or suggestions, please leave a message for the official account. Node. As a background service, the performance of JS is a key point, which affects node The performance of JS should consider not only its own factors, but also some factors of the […]

  • node. JS operation mongodb database

    Time:2022-1-19

    1、 Node JS basic operation for mongodb 1. Database startup First of all, we should start the database and establish a folder to store the database documents. asD:\mongo, nextcmdType the command in the-> mongod –dbpath D:\mongoTo start the database. As shown in the figure below: Then keep thiscmdThe control panel is in this state to […]

  • QQ chat robot developed by Python — assistant robot for college entrance examination volunteer filling

    Time:2022-1-19

    Approaching the college entrance examination season, a QQ group robot assisting volunteer filling is made here to record the specific implementation process.The effects achieved are as follows: Allelic query College information query This article is a series of articles. For a complete reproduction, please read it in the following order: Developing QQ chat robot with […]

  • Multi table joint query based on mybatis plus in springboot (no XML, realized through annotation)

    Time:2022-1-18

    Don’t talk much, Kailu @Select annotation: in fact, the corresponding SQL statement is added after the annotation, and the writing method is consistent with that in [email protected] annotation: there is an ID attribute, which can be understood as defining a method that can be referenced by ID. the reference method is resultmap (“”)@ Results can […]

  • Configuring Druid multiple data sources with springboot + mybatis

    Time:2022-1-18

    Before opening, say a digression. The difference between multi data source and dynamic data source. Multiple data sources are generally used to connect multiple business independent databases (possibly heterogeneous databases). Dynamic data source is generally used for data segmentation in large applications. Configuration reference There are a lot of online tutorials on how to configure […]

  • Django directly uses database connections and cursors to read and write databases

    Time:2022-1-18

    Single database from django.db import connection with connection.cursor() as cursor: cursor.execute(‘SELECT version()’) row = cursor.fetchone() Multi database from django.db import connections with connections[‘my_db_alias’].cursor() as cursor: cursor.execute(‘SELECT version()’) Reference connection:Execute custom SQL directlyUse raw cursors for multiple databases

  • Redis source code compilation and installation

    Time:2022-1-18

    Install dependent packages yum install gcc tcl Download source package wget http://download.redis.io/releases/redis-4.0.8.tar.gz decompression tar -xzvf redis-4.0.8.tar.gz Server installation cd redis-4.0.8 make cd src make test make install PREFIX=/usr/local/redis Copy the configuration file to the redis installation directory cp redis.conf /usr/local/redis/redis.conf Start service, configuration /usr/local/redis/bin/redis-server /usr/local/redis/redis.conf The first is to start the redis server The second […]

  • Nacos super detailed cluster configuration method and nginx reverse agent

    Time:2022-1-17

    1. Download Nacos Nacos download address:https://github.com/alibaba/nacos/releases/tag/1.2.0 2. Configure Nacos (1) Installation and configurationCreate a folder under / opt mkdir mynacos You can use xftp to transfer the downloaded compressed package to this folder Use this command to extract the Nacos folder tar -zxvf nacos-server-1.2.0.tar.gz After decompression, enter the conf directory for cluster configuration cd /opt/nacos/conf […]