CN111708610B - Database client construction method and database operation method - Google Patents

Database client construction method and database operation method Download PDF

Info

Publication number
CN111708610B
CN111708610B CN202010570954.1A CN202010570954A CN111708610B CN 111708610 B CN111708610 B CN 111708610B CN 202010570954 A CN202010570954 A CN 202010570954A CN 111708610 B CN111708610 B CN 111708610B
Authority
CN
China
Prior art keywords
database
client
container
target
packaging
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010570954.1A
Other languages
Chinese (zh)
Other versions
CN111708610A (en
Inventor
方祥猛
张丽丽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ultrapower Software Co ltd
Original Assignee
Ultrapower Software Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ultrapower Software Co ltd filed Critical Ultrapower Software Co ltd
Priority to CN202010570954.1A priority Critical patent/CN111708610B/en
Publication of CN111708610A publication Critical patent/CN111708610A/en
Application granted granted Critical
Publication of CN111708610B publication Critical patent/CN111708610B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/44Program or device authentication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45575Starting, stopping, suspending or resuming virtual machine instances
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2141Access rights, e.g. capability lists, access control lists, access tables, access matrices
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • Health & Medical Sciences (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a database client construction method and a database operation method, wherein the method comprises the following steps: packaging a database client into a mirror image, wherein the database client is used for performing data operation on a database; generating a target client container by performing a pull-up operation on the mirror image; and executing the instructions in the database client through the target client container so as to verify the target client container, wherein the target client container is used for performing data operation on the database after verification is successful.

Description

Database client construction method and database operation method
Technical Field
The invention relates to the technical field of computers, in particular to a database client construction method and a database operation method.
Background
At present, the database is generally managed by connecting the database in the form of commands on a server. In this way, when various operations need to be performed on the database, related instructions need to be executed on the server, which is relatively troublesome for the user to operate, or there is no authority to operate the database on the server.
Disclosure of Invention
The invention aims to provide a database client construction method and a database operation method, which can realize the operation of a database through a container.
In a first aspect, an embodiment of the present invention provides a method for constructing a database client, including:
packaging a database client into a mirror image, wherein the database client is used for performing data operation on a database;
generating a target client container by performing a pull-up operation on the mirror image;
and executing the instructions in the database client through the target client container so as to verify the target client container, wherein the target client container is used for performing data operation on the database after verification is successful.
In an alternative embodiment, the method further comprises:
and logging in a database corresponding to the database client through the target client container so as to perform data operation verification on the database corresponding to the database client.
According to the database client construction method, after the target client container is obtained, data operation verification can be performed on the container, so that the usability of the target client container can be improved, and the success rate of creating the target client container is improved.
In an alternative embodiment, the packaging the database client into the mirror image includes:
obtaining a packaging mirror tool based on the basic mirror of the community enterprise operating system;
and packaging the database client into the mirror image according to the packaging mirror image tool, wherein the packaging mirror image tool comprises a Dockerfile which is a packaging mirror image tool native to an application container engine dock, and the database client comprises a mysql client.
According to the database client construction method, the Docker container is referenced, and the target client container can be obtained according to the user requirements according to the determined Dockerfile as the mirror configuration parameter.
In an alternative embodiment, the executing, by the target client container, the instructions in the database client includes:
database client version validation instructions are executed within the target client container to verify whether commands in the database client can be executed.
According to the method for constructing the database client, the verification of the command in the database client can be realized by executing the database client version confirmation instruction, so that the success rate of constructing the target client container can be improved.
In an alternative embodiment, the target client container is granted target database rights, wherein the means for granting the target database rights comprises: and authorizing the target database permission to the IP network segment of the target client container in the database server corresponding to the database client.
According to the method for constructing the database client, the database server grants the target database permission for the IP network segment of the target client container, so that the database client in the target client container can realize the operation on the database.
In a second aspect, an embodiment of the present invention provides a database operating method, including:
the target client container constructed by the database client construction method according to any one of the foregoing embodiments, performing data operation on a target database.
In a third aspect, an embodiment of the present invention provides a database client construction apparatus, including:
the packaging module is used for packaging the database client into the mirror image, and the database client is used for performing data operation on the database;
the generation module is used for generating a target client container by carrying out pulling operation on the mirror image;
and the first verification module is used for executing the instructions in the database client through the target client container so as to verify the target client container, and the target client container is used for performing data operation on the database after the verification is successful.
In a fourth aspect, an embodiment of the present invention provides a database operating apparatus, including:
and the operation module is used for performing data operation on the target database through the target client container constructed by the database client construction method in any one of the previous embodiments.
In a fifth aspect, an embodiment of the present invention provides an electronic device, including: a processor, a memory storing machine-readable instructions executable by the processor, which when executed by the processor perform the steps of the method of any of the preceding embodiments, when the electronic device is running.
In a sixth aspect, embodiments of the present invention provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of a method as described in any of the previous embodiments.
The database client construction method, the database operation method, the device, the electronic equipment and the computer readable storage medium have the beneficial effects that: by packing the database client into the container, the operation on the database can be realized through the container, so that a server does not need to be directly operated, and the convenience of database operation can be improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered limiting the scope, and that other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a block schematic diagram of an electronic device according to an embodiment of the present application.
Fig. 2 is a flowchart of a database client construction method provided in an embodiment of the present application.
Fig. 3 is a flowchart of a database operation method provided in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures. Meanwhile, in the description of the present application, the terms "first", "second", and the like are used only to distinguish the description, and are not to be construed as indicating or implying relative importance.
Example 1
For the sake of understanding the present embodiment, first, an electronic device that executes the database client construction method or the database operation method disclosed in the embodiments of the present application will be described in detail.
As shown in fig. 1, a block schematic diagram of an electronic device is provided. The electronic device 100 may include a memory 111, a memory controller 112, a processor 113, a peripheral interface 114, an input output unit 115, and a display unit 116. Those of ordinary skill in the art will appreciate that the configuration shown in fig. 1 is merely illustrative and is not limiting of the configuration of the electronic device 100. For example, electronic device 100 may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The above-mentioned memory 111, memory controller 112, processor 113, peripheral interface 114, input/output unit 115 and display unit 116 are electrically connected directly or indirectly to each other to realize data transmission or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines. The processor 113 is used to execute executable modules stored in the memory.
The Memory 111 may be, but is not limited to, a random access Memory (Random Access Memory, RAM), a Read Only Memory (ROM), a programmable Read Only Memory (Programmable Read-Only Memory, PROM), an erasable Read Only Memory (Erasable Programmable Read-Only Memory, EPROM), an electrically erasable Read Only Memory (Electric Erasable Programmable Read-Only Memory, EEPROM), etc. The memory 111 is configured to store a program, and the processor 113 executes the program after receiving an execution instruction, and a method executed by the electronic device 100 defined by the process disclosed in any embodiment of the present application may be applied to the processor 113 or implemented by the processor 113.
The memory 111 may have stored therein a software program of an operating system, which may be LINUX, that may include various software components and/or drivers for managing system tasks (e.g., memory management, storage device control, power management, etc.), and that may communicate with various hardware or software components to provide an operating environment for other software components.
In the present embodiment, the electronic apparatus 100 has container software installed therein. Containers with individual client functions can be built by means of container software. For example, the container software may be a docker software by which containers with individual client functionality may be built. Illustratively, a container for operating the database is constructed by the docker software. Illustratively, the container software may also be ontainerd software, cri-o software, rkt software, kata software, unity software, pouch software, and the like.
The processor 113 may be an integrated circuit chip having signal processing capabilities. The processor 113 may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but also digital signal processors (digital signal processor, DSP for short), application specific integrated circuits (Application Specific Integrated Circuit, ASIC for short), field programmable gate arrays (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The peripheral interface 114 couples various input/output devices to the processor 113 and the memory 111. In some embodiments, the peripheral interface 114, the processor 113, and the memory controller 112 may be implemented in a single chip. In other examples, they may be implemented by separate chips.
The input-output unit 115 described above is used to provide input data to a user. The input/output unit 115 may be, but is not limited to, a mouse, a keyboard, and the like.
The display unit 116 described above provides an interactive interface (e.g., a user-operated interface) between the electronic device 100 and a user or is used to display image data to a user reference. In this embodiment, the display unit may be a liquid crystal display or a touch display. In the case of a touch display, the touch display may be a capacitive touch screen or a resistive touch screen, etc. supporting single-point and multi-point touch operations. Supporting single-point and multi-point touch operations means that the touch display can sense touch operations simultaneously generated from one or more positions on the touch display, and the sensed touch operations are passed to the processor for calculation and processing.
The electronic device 100 in the present embodiment may be used to perform each step in each method provided in the embodiments of the present application. The implementation of the database client construction method or database operation method is described in detail below by several embodiments.
Example two
Referring to fig. 2, a flowchart of a database client construction method according to an embodiment of the present application is shown. The specific flow shown in fig. 2 will be described in detail.
Step 201, packaging the database client into a mirror image.
The database client is used for performing data operation on the database.
In this embodiment, the data operation may include: querying a database, creating a new database, deleting a database, deleting data, backing up a database, creating a table in a database, and the like.
Alternatively, the database client may be packaged into an image by a docker software implementation.
In one embodiment, a packaged image tool may be obtained based on a base image of a community enterprise operating system; and then, packaging the database client into the mirror image according to the packaging mirror image tool.
The package mirror tool may include a Dockerfile, which is a package mirror tool native to an application container engine docker.
Illustratively, the Dockerfile is a description file of the Docker mirror image, where the Dockerfile includes multiple instructions, and each instruction is used to describe a building manner of each layer of the Docker mirror image.
Optionally, packaging the database client into the image according to the packaging image tool may include: and calling a dock build command, and constructing a mirror image according to the package mirror image tool.
In this embodiment, the Dockerfile may be a system file written in advance according to the needs of the database client. Illustratively, the Dockerfile may include: basic mirror information, maintainer information, mirror operation instructions, and container start-up execution instructions.
In another embodiment, the database client may be packaged into a mirror using a dock commit command.
In this embodiment, modifications to an existing container are made by the dock commit command, and a new image will be committed by the modifications.
In this embodiment, the image includes, in addition to the files such as programs, libraries, resources, and configurations required by the container during running, some configuration parameters prepared for the running. For example, the configuration parameters may include: anonymous volumes, environment variables, users, etc. The image does not contain dynamic data, and the content of the image is not changed after construction.
In this embodiment, the mirror image may include a multi-layer structure, and each layer structure may be a system file.
In this embodiment, the database client may include mysql client.
Alternatively, other container software implementations may also be used to package the database clients into the image. For example, pouch, kata, singularty, containerd, cri-o, rkt, etc. are also possible.
Step 202, performing a pull operation on the mirror image to generate a target client container.
Wherein the relationship of the mirror and the container can be described as: mirroring is a static definition and a container is an entity at the time of mirroring operation. The container may be created, started, stopped, deleted, paused, etc.
In this embodiment, the target client container is granted the target database rights, where the manner of granting the target database rights may include: and authorizing the target database permission to the IP (Internet Protocol) network segment of the target client container in the database server corresponding to the database client.
Step 203, executing, by the target client container, the instructions in the database client to verify the target client container.
And after the verification is successful, the target client container is used for carrying out data operation on the database.
Alternatively, database client version validation instructions may be executed within the target client container to verify whether commands in the database client can be executed.
Illustratively, the database client version validation instruction may be mysql-version.
By verifying whether the commands in the database client can be executed, it is determined whether the database client is successfully packaged into a container.
In this embodiment, referring to fig. 2 again, the method for constructing a database client in this embodiment may further include:
and 204, logging in a database corresponding to the database client through the target client container so as to perform data operation verification on the database corresponding to the database client.
Illustratively, taking mysql client as an example, the database is logged in through mysql-urot, -ppassword, -h database IP, and-p database port, and data operation is performed on the database corresponding to the database client.
In this embodiment, if the data operation verification is successful, the destination client container may be used to perform the data operation on the data in the database.
Illustratively, the database server comprises a mysql server.
According to the method for constructing the database client, the database client is packaged into the container, so that the operation on the database can be realized through the container, a server is not required to be directly operated, and the convenience of the database operation can be improved.
Further, when providing the database service for the client, the container for operating the database can be constructed by the method in the second embodiment, so that the need of directly operating the server to implement the operation on the database can be avoided, and the operation on the database can be implemented only by the operation of the container.
Example III
Based on the same application conception, the embodiment of the application also provides a database client construction device corresponding to the database client construction method, and since the principle of solving the problem of the device in the embodiment of the application is similar to that of the embodiment of the database client construction method, the implementation of the device in the embodiment of the application can be referred to the description in the embodiment of the method, and the repetition is omitted.
Please refer to fig. 3, which is a schematic diagram of a functional module of a database client construction device according to an embodiment of the present application. The respective modules in the database client construction apparatus in this embodiment are configured to perform the respective steps in the above-described method embodiment. The database client construction device comprises: a packaging module 301, a generating module 302, and a first verifying module 303; wherein,
the packaging module 301 is configured to package a database client into a mirror image, where the database client is configured to perform a data operation on a database;
a generating module 302, configured to generate a target client container by performing a pull operation on the image;
and the first verification module 303 is configured to execute the instructions in the database client through the target client container, so as to verify the target client container, where after verification is successful, the target client container is used to perform data operation on the database.
In a possible implementation manner, the database client construction apparatus in this embodiment may further include:
and the second verification module 304 is configured to log in a database corresponding to the database client through the target client container, so as to perform data operation verification on the database corresponding to the database client.
In a possible implementation, the packing module 301 is configured to:
obtaining a packaging mirror tool based on the basic mirror of the community enterprise operating system;
and packaging the database client into the mirror image according to the packaging mirror image tool, wherein the packaging mirror image tool comprises a Dockerfile which is a packaging mirror image tool native to an application container engine dock, and the database client comprises a mysql client.
In a possible implementation manner, the first verification module 303 is configured to:
database client version validation instructions are executed within the target client container to verify whether commands in the database client can be executed.
In a possible implementation manner, the target client container is granted to a target database, wherein the manner of granting the target database permission includes: and authorizing the target database permission to the IP network segment of the target client container in the database server corresponding to the database client.
Example IV
The embodiment of the application provides a database operation method.
The database operation method in the embodiment comprises the following steps: and performing data operation on the target database through the target client container.
In this embodiment, the target client container may be a container constructed by the database client construction method provided in the second embodiment.
In this embodiment, the data operation described above may include: viewing of a database, backup of the database, restoration of the database, creation of the database and deletion of the database.
Illustratively, the database may be entered through mysql-uroot, -ppassword, -h database IP, -p database port.
Illustratively, all database clients operable databases can be viewed by executing mysql-uroot, -ppassword, -h database IP, -p database port, and-eshow databases instructions.
Illustratively, database db1 may be deleted by executing mysql-uroot, -ppassword, -h database IP, -p database port, and-e drop db1 instructions.
Illustratively, database db2 may be created by executing mysql-uroot, -ppassword, -h database IP, -p database port, and create database db instructions.
Illustratively, database db3 may be deleted by executing a drop databasedb3 instruction.
According to the database operation method, the operation on the database can be realized by executing the instructions required by operating the database in the container, so that the operation instructions of the related database do not need to be directly executed on the server, and the convenience of database operation is improved.
Example five
Based on the same application conception, the embodiment of the present application further provides a database operation device corresponding to the database operation method, and since the principle of solving the problem of the device in the embodiment of the present application is similar to that of the foregoing embodiment of the database operation method, the implementation of the device in the embodiment of the present application may refer to the description in the embodiment of the foregoing method, and the repetition is omitted.
The embodiment of the application provides a database operating device. The respective modules in the database operating apparatus in this embodiment are used to perform the respective steps in the above-described method embodiment. The database operating device includes: and the operation module is used for performing data operation on the target database through the target client container.
In this embodiment, the target client container may be a container constructed by the database client construction method provided in the second embodiment.
In addition, the embodiment of the present application further provides a computer readable storage medium, where a computer program is stored, where the computer program is executed by a processor to perform the steps of the database client construction method or the database operation method described in the foregoing method embodiment.
The computer program product of the database client construction method provided in the embodiments of the present application includes a computer readable storage medium storing program code, where the program code includes instructions for executing the steps of the database client construction method described in the above method embodiments, and the details of the method embodiments may be referred to herein and are not described in detail.
The computer program product of the database operation method provided in the embodiments of the present application includes a computer readable storage medium storing program code, where the program code includes instructions for executing the steps of the database operation method described in the above method embodiments, and the details of the method embodiments may be referred to above, and are not described herein.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other manners as well. The apparatus embodiments described above are merely illustrative, for example, flow diagrams and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, the functional modules in the embodiments of the present application may be integrated together to form a single part, or each module may exist alone, or two or more modules may be integrated to form a single part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-only memory (ROM), a random access memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes. It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
The foregoing description is only of the preferred embodiments of the present application and is not intended to limit the same, but rather, various modifications and variations may be made by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application. It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures.
The foregoing is merely specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the present application, and the changes and substitutions are intended to be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (8)

1. A database client construction method, comprising:
packaging a database client into a mirror image, wherein the database client is used for performing data operation on a database;
generating a target client container by performing a pull-up operation on the mirror image;
executing instructions in the database client through the target client container to verify the target client container, wherein the target client container is used for performing data operation on a database after verification is successful;
wherein said executing, by said target client container, instructions in said database client comprises:
executing database client version validation instructions within the target client container to verify whether commands in the database client can be executed; determining whether the database client is successfully packaged into a container by verifying whether a command in the database client can be executed;
the target client container is granted target database rights, wherein the means for granting the target database rights comprises: the authorization of the target database permission is carried out on the IP network segment of the target client container in the database server corresponding to the database client;
the packaging the database client into the mirror image comprises the following steps: the existing container is modified through the docker commit command, and a new image is submitted so that the database client is packaged into the image.
2. The method according to claim 1, wherein the method further comprises:
and logging in a database corresponding to the database client through the target client container so as to perform data operation verification on the database corresponding to the database client.
3. The method of claim 1, wherein packaging the database client into the image comprises:
obtaining a packaging mirror tool based on the basic mirror of the community enterprise operating system;
and packaging the database client into the mirror image according to the packaging mirror image tool, wherein the packaging mirror image tool comprises a Dockerfile which is a packaging mirror image tool native to an application container engine dock, and the database client comprises a mysql client.
4. A method of database operation, comprising:
a target client container constructed by the database client construction method of any one of claims 1 to 3, performing data manipulation on a target database.
5. A database client construction apparatus, comprising:
the packaging module is used for packaging the database client into the mirror image, and the database client is used for performing data operation on the database;
the generation module is used for generating a target client container by carrying out pulling operation on the mirror image;
the first verification module is used for executing the instructions in the database client through the target client container so as to verify the target client container, and after the target client container is successfully verified, the target client container is used for performing data operation on the database;
the first verification module is further configured to execute a database client version confirmation instruction inside the target client container to verify whether a command in the database client can be executed; determining whether the database client is successfully packaged into a container by verifying whether a command in the database client can be executed;
the target client container is granted target database rights, wherein the means for granting the target database rights comprises: the authorization of the target database permission is carried out on the IP network segment of the target client container in the database server corresponding to the database client;
the packaging module is also used for modifying the existing container through a dock commit command and submitting a new mirror image so as to package the database client into the mirror image.
6. A database operating apparatus, comprising:
an operation module, configured to perform data operation on a target database by using the target client container constructed by the database client construction method according to any one of claims 1 to 3.
7. An electronic device, comprising: a processor, a memory storing machine-readable instructions executable by the processor, which when executed by the processor perform the steps of the method of any of claims 1 to 4 when the electronic device is run.
8. A computer-readable storage medium, characterized in that it has stored thereon a computer program which, when executed by a processor, performs the steps of the method according to any of claims 1 to 4.
CN202010570954.1A 2020-06-19 2020-06-19 Database client construction method and database operation method Active CN111708610B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010570954.1A CN111708610B (en) 2020-06-19 2020-06-19 Database client construction method and database operation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010570954.1A CN111708610B (en) 2020-06-19 2020-06-19 Database client construction method and database operation method

Publications (2)

Publication Number Publication Date
CN111708610A CN111708610A (en) 2020-09-25
CN111708610B true CN111708610B (en) 2024-02-27

Family

ID=72541431

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010570954.1A Active CN111708610B (en) 2020-06-19 2020-06-19 Database client construction method and database operation method

Country Status (1)

Country Link
CN (1) CN111708610B (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107395762A (en) * 2017-08-30 2017-11-24 四川长虹电器股份有限公司 A kind of application service based on Docker containers accesses system and method
CN107516447A (en) * 2017-10-11 2017-12-26 商丘师范学院 A kind of interactive College English Self-regulated Learning system
CN107908535A (en) * 2017-11-13 2018-04-13 珠海金山网络游戏科技有限公司 Distributed clients analogy method and device
CN108241797A (en) * 2018-01-10 2018-07-03 郑州云海信息技术有限公司 Mirror image warehouse user right management method, device, system and readable storage medium storing program for executing
CN108762914A (en) * 2018-04-17 2018-11-06 广东智媒云图科技股份有限公司 A kind of Intelligent telescopic method, apparatus, electronic equipment and the storage medium of system architecture
CN109005161A (en) * 2018-07-18 2018-12-14 安徽云图信息技术有限公司 A kind of data safety monitoring system and its access monitoring method
CN109189401A (en) * 2018-07-06 2019-01-11 曙光信息产业(北京)有限公司 A kind of dispositions method and system of deep learning frame
CN109471658A (en) * 2018-11-19 2019-03-15 四川长虹电器股份有限公司 A method of the fast construction target drone environment based on container
CN110222531A (en) * 2019-05-31 2019-09-10 阿里巴巴集团控股有限公司 A kind of method, system and equipment accessing database
CN110321207A (en) * 2019-06-25 2019-10-11 深圳前海微众银行股份有限公司 Method for scheduling task, device, equipment and computer readable storage medium
CN110515987A (en) * 2019-08-30 2019-11-29 恩亿科(北京)数据科技有限公司 A kind of querying method and device of data analysis result
CN110704098A (en) * 2019-09-29 2020-01-17 科大国创软件股份有限公司 Intelligent packaging method for automatically generating container mirror image according to application package characteristics
CN110908671A (en) * 2018-09-18 2020-03-24 北京京东尚科信息技术有限公司 Method and device for constructing docker mirror image and computer readable storage medium

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107395762A (en) * 2017-08-30 2017-11-24 四川长虹电器股份有限公司 A kind of application service based on Docker containers accesses system and method
CN107516447A (en) * 2017-10-11 2017-12-26 商丘师范学院 A kind of interactive College English Self-regulated Learning system
CN107908535A (en) * 2017-11-13 2018-04-13 珠海金山网络游戏科技有限公司 Distributed clients analogy method and device
CN108241797A (en) * 2018-01-10 2018-07-03 郑州云海信息技术有限公司 Mirror image warehouse user right management method, device, system and readable storage medium storing program for executing
CN108762914A (en) * 2018-04-17 2018-11-06 广东智媒云图科技股份有限公司 A kind of Intelligent telescopic method, apparatus, electronic equipment and the storage medium of system architecture
CN109189401A (en) * 2018-07-06 2019-01-11 曙光信息产业(北京)有限公司 A kind of dispositions method and system of deep learning frame
CN109005161A (en) * 2018-07-18 2018-12-14 安徽云图信息技术有限公司 A kind of data safety monitoring system and its access monitoring method
CN110908671A (en) * 2018-09-18 2020-03-24 北京京东尚科信息技术有限公司 Method and device for constructing docker mirror image and computer readable storage medium
CN109471658A (en) * 2018-11-19 2019-03-15 四川长虹电器股份有限公司 A method of the fast construction target drone environment based on container
CN110222531A (en) * 2019-05-31 2019-09-10 阿里巴巴集团控股有限公司 A kind of method, system and equipment accessing database
CN110321207A (en) * 2019-06-25 2019-10-11 深圳前海微众银行股份有限公司 Method for scheduling task, device, equipment and computer readable storage medium
CN110515987A (en) * 2019-08-30 2019-11-29 恩亿科(北京)数据科技有限公司 A kind of querying method and device of data analysis result
CN110704098A (en) * 2019-09-29 2020-01-17 科大国创软件股份有限公司 Intelligent packaging method for automatically generating container mirror image according to application package characteristics

Also Published As

Publication number Publication date
CN111708610A (en) 2020-09-25

Similar Documents

Publication Publication Date Title
JP6967534B2 (en) Resource allocation for database provisioning
US10095549B1 (en) Ownership transfer account service in a virtual computing environment
US20170249393A1 (en) Method and browser plugin for creation of objects in a cloud-based object management system
US10733238B2 (en) Script manager for distributed systems
US8892585B2 (en) Metadata driven flexible user interface for business applications
US7756154B2 (en) Shared implementation for multiple system interfaces
US20190288856A1 (en) Timestamped license data structure
CN112805705A (en) General treatment
US8463755B2 (en) System and method for providing collaborative master data processes
US9563419B2 (en) Managing deployment of application pattern based applications on runtime platforms
US10592864B2 (en) Share token issuance for declarative document authoring
US20130326501A1 (en) Cloud system having flexible applications
CN111708610B (en) Database client construction method and database operation method
US11409847B2 (en) Source-based authentication for a license of a license data structure
US11244031B2 (en) License data structure including license aggregation
CN110263006A (en) A kind of method and apparatus for downloading file on a user device
US11074273B2 (en) Framework for continuous processing of a set of documents by multiple software applications
WO2009067332A2 (en) Secure authoring and execution of user-entered database programming
Mistry et al. Microsoft SQL Server 2012 Management and Administration
CN112101890A (en) Authority control method, device, equipment and medium based on role and cloud function
CN111158649A (en) Method and device for configuring multi-level parameters
EP3975026A1 (en) Method and system for managing asset data in an industrial network
US11870805B2 (en) Systems and methods that perform filtering, linking, and rendering
CN117034233B (en) Application management method and device based on permission, computing equipment and storage medium
US20160259948A1 (en) Embedded integrated component governance policy

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Room 818, 8 / F, 34 Haidian Street, Haidian District, Beijing 100080

Applicant after: ULTRAPOWER SOFTWARE Co.,Ltd.

Address before: 100089 Beijing city Haidian District wanquanzhuang Road No. 28 Wanliu new building 6 storey block A Room 601

Applicant before: ULTRAPOWER SOFTWARE Co.,Ltd.

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant