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

Database client construction method and database operation method Download PDF

Info

Publication number
CN111708610A
CN111708610A CN202010570954.1A CN202010570954A CN111708610A CN 111708610 A CN111708610 A CN 111708610A CN 202010570954 A CN202010570954 A CN 202010570954A CN 111708610 A CN111708610 A CN 111708610A
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.)
Granted
Application number
CN202010570954.1A
Other languages
Chinese (zh)
Other versions
CN111708610B (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.)
Beijing Shenzhou Taiyue Software Co Ltd
Original Assignee
Beijing Shenzhou Taiyue 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 Beijing Shenzhou Taiyue Software Co Ltd filed Critical Beijing Shenzhou Taiyue 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

Images

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

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 carrying out data operation on a database; generating a target client container by pulling up the mirror image; and executing the instruction in the database client by the target client container to verify the target client container, wherein the target client container is used for performing data operation on the database after the 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
Currently, for the management of the database, the database is generally managed on the server through a command connection. When various operations are required to be performed on the database, the operation mode needs to execute related instructions on the server, which is relatively troublesome for a user, or does not have the right to operate the database on the server.
Disclosure of Invention
The invention aims to provide a database client constructing method and a database operating method, which can realize the operation of a database through a container.
In a first aspect, an embodiment of the present invention provides a database client constructing method, including:
packaging a database client into a mirror image, wherein the database client is used for carrying out data operation on a database;
generating a target client container by pulling up the mirror image;
and executing the instruction in the database client by the target client container to verify the target client container, wherein the target client container is used for performing data operation on the database after the 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.
In the database client constructing method in this embodiment, after the target client container is obtained, the data operation may be verified on the container, so that the availability of the target client container may be improved, and the success rate of creating the target client container may be improved.
In an optional embodiment, the packaging the database client into the mirror includes:
obtaining a packaging mirror image tool based on a basic mirror image of a 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, the Dockerfile is a native packaging mirror image tool of an application container engine docker, and the database client comprises a mysql client.
In the database client constructing method in this embodiment, the target client container can be obtained according to the user requirement by referring to the Docker container and using 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:
executing a database client version validation instruction inside the target client container to verify whether the command in the database client can be executed.
In the database client constructing method in this embodiment, the validation of the command in the database client can be realized by executing the database client version validation instruction, so that the construction power of the target client container can be improved.
In an optional embodiment, the target client container is granted a target database permission, wherein the manner of granting the target database permission comprises: and authorizing the target database authority to the IP network segment of the target client container in a database server corresponding to the database client.
In the database client constructing method in this embodiment, the database server grants the target database permission to the IP network segment of the target client container, so that the database client in the target client container can operate 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 performs data operation on the target database.
In a third aspect, an embodiment of the present invention provides a database client constructing apparatus, including:
the system comprises a packaging module, a database processing module and a data processing module, wherein the packaging module is used for packaging a database client into a mirror image, and the database client is used for carrying out data operation on a database;
the generating module is used for generating a target client container by pulling up the mirror image;
and the first verification module is used for executing the instruction in the database client through the target client container so as to verify the target client container, and after the verification is successful, the target client container is used for performing data operation on the database.
In a fourth aspect, an embodiment of the present invention provides a database operating apparatus, including:
an operation module, configured to perform data operation on a target database through a target client container constructed by the database client construction method according to any one of the foregoing 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, the machine readable instructions when executed by the processor perform the steps of the method of any of the preceding embodiments when the electronic device is run.
In a sixth aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform the steps of the method according to any one of the foregoing embodiments.
The database client construction method, the database operation device, the electronic equipment and the computer readable storage medium have the advantages that: by packaging the database client into the container, the database can be operated through the container, so that a server does not need to be directly operated, and convenience in 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 required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a block diagram of an electronic device according to an embodiment of the present disclosure.
Fig. 2 is a flowchart of a database client building method according to an embodiment of the present application.
Fig. 3 is a flowchart of a database operation method according to an embodiment of the present application.
Detailed Description
The technical solution 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 numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present application, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
Example one
To facilitate understanding of the present embodiment, first, an electronic device executing the database client constructing method or the database operating method disclosed in the embodiments of the present application will be described in detail.
As shown in fig. 1, is a block schematic diagram of an electronic device. 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. It will be understood by those of ordinary skill in the art that the structure shown in fig. 1 is merely exemplary and is not intended to limit the structure 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 elements of the memory 111, the memory controller 112, the processor 113, the peripheral interface 114, the input/output unit 115 and the display unit 116 are electrically connected to each other directly or indirectly, so as to implement 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 the executable modules stored in the memory.
The Memory 111 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like. The memory 111 is configured to store a program, and the processor 113 executes the program after receiving an execution instruction, and the 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 store a software program of an operating system, which may be LINUX, which may include various software components and/or drivers for managing system tasks (e.g., memory management, storage device control, power management, etc.), and may communicate with various hardware or software components to provide an operating environment for other software components.
In this embodiment, the electronic device 100 is installed with container software. Containers with individual client functions can be built by the container software. For example, the container software may be docker software, by means of which containers with individual client functions can be built. Illustratively, containers for manipulating the database are built by the docker software. Illustratively, the container software may also be ontainted software, cri-o software, rkt software, kata software, singulanty software, pouch software, and the like.
The processor 113 may be an integrated circuit chip having signal processing capability. The Processor 113 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, or discrete hardware components. The various methods, steps, and logic blocks disclosed 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 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 separately from the individual chips.
The input/output unit 115 is used to provide input data to the user. The input/output unit 115 may be, but is not limited to, a mouse, a keyboard, and the like.
The display unit 116 provides an interactive interface (e.g., a user operation interface) between the electronic device 100 and the user or is used for displaying image data to the user for 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 display can be a capacitive touch screen or a resistive touch screen, which supports single-point and multi-point touch operations. The support of 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 sent to the processor for calculation and processing.
The electronic device 100 in this embodiment may be configured to perform each step in each method provided in this embodiment. The following describes in detail the implementation process of the database client building method or the database operating method by several embodiments.
Example two
Please refer to fig. 2, which is a flowchart illustrating a database client constructing method according to an embodiment of the present application. The specific process shown in fig. 2 will be described in detail below.
Step 201, packaging the database client into a mirror image.
The database client is used for carrying out 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, etc.
Alternatively, the database client may be packaged into the mirror by a docker software implementation.
In one embodiment, a packaged mirroring tool may be obtained based on a basic mirroring of a community enterprise operating system; and then packaging the database client into the mirror image according to a packaging mirror image tool.
The packaging mirror tool may include a Dockerfile, which is a native packaging mirror tool of the application container engine docker.
Illustratively, the Dockerfile is a description file of the Docker image, where the Dockerfile includes a plurality of instructions, and each instruction is used to describe a construction manner of each layer of the Docker image.
Optionally, packaging the database client into the image according to a packaging image tool may include: and calling a docker build command, and constructing a mirror image according to the packaging 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 execution instructions at startup.
In another embodiment, the database client may be packaged into a mirror using a docker commit command.
In this embodiment, a change is made to an existing container via a docker commit command, and a new image is submitted via the change.
In this embodiment, the image includes files such as programs, libraries, resources, and configurations required by the container runtime, and also includes some configuration parameters prepared for the runtime. For example, the configuration parameters may include: anonymous volume, environment variables, user, etc. The image does not contain dynamic data, nor does the contents of the image be changed after construction.
In this embodiment, the image may include a multi-layer structure, and each layer structure may be a system file.
In this embodiment, the database client may include a mysql client.
Alternatively, other container software implementations may also be used to package the database client into the image. For example, pouch, kata, singularty, contiinerd, cri-o, rkt, etc. may be used.
Step 202, generating a target client container by performing a pull operation on the mirror image.
Wherein the relationship of the mirror image and the container can be described as: the mirror is a static definition and the container is the entity at the runtime of the mirror. Containers may be created, started, stopped, deleted, paused, and the like.
In this embodiment, the target client container is granted with the target database permission, wherein the manner of granting the target database permission may include: and authorizing the target database authority to an IP (Internet protocol) network segment of the target client container in a database server corresponding to the database client.
Step 203, executing the instruction in the database client through the target client container 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.
Optionally, a database client version validation instruction may be executed inside the target client container to verify whether the command in the database client can be executed.
Illustratively, the database client version validation instruction may be mysql-version.
Whether the database client is successfully packaged into the container is determined by verifying whether the command in the database client can be executed.
In this embodiment, referring to fig. 2 again, the database client constructing method in this embodiment may further include:
and 204, logging in a database corresponding to the database client through the target client container to perform data operation verification on the database corresponding to the database client.
Exemplarily, taking mysql client as an example, the database is logged in through mysql-root, -ppassword, -h database IP, and-p database port, and the database corresponding to the database client is subjected to data operation.
In this embodiment, if the data operation verification is successful, it indicates that the destination client container may be used to perform data operation on data in the database.
Illustratively, the database server includes a mysql server.
According to the database client construction method, the database client is packaged into the container, operation on the database can be achieved through the container, so that a server does not need to be operated directly, and convenience of database operation can be improved.
Further, when providing database service for a client, a container for operating a database may be constructed by the method in the second embodiment, so that it may be avoided that a server is directly operated to implement operations on the database, and operations on the database can be implemented only by operations on the container.
EXAMPLE III
Based on the same application concept, a database client building device corresponding to the database client building method is further provided in the embodiment of the present application, and because the principle of solving the problem of the device in the embodiment of the present application is similar to that in the embodiment of the database client building method, the implementation of the device in the embodiment of the present application may refer to the description in the embodiment of the method, and repeated details are omitted.
Please refer to fig. 3, which is a schematic diagram of a functional module of a database client constructing apparatus according to an embodiment of the present application. Each module in the database client building apparatus in this embodiment is configured to execute each step in the foregoing method embodiments. The database client building device comprises: a packaging module 301, a generating module 302, and a first verifying module 303; wherein the content of the first and second substances,
the packaging module 301 is configured to package a database client into a mirror image, where the database client is configured to perform data operation on a database;
a generating module 302, configured to generate a target client container by performing a pull operation on the mirror image;
a first verification module 303, configured to execute the instruction in the database client through the target client container 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 building apparatus in this embodiment may further include:
the second verification module 304 is configured to log in the 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 one possible implementation, the packaging module 301 is configured to:
obtaining a packaging mirror image tool based on a basic mirror image of a 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, the Dockerfile is a native packaging mirror image tool of an application container engine docker, and the database client comprises a mysql client.
In a possible implementation, the first verification module 303 is configured to:
executing a database client version validation instruction inside the target client container to verify whether the command in the database client can be executed.
In one possible embodiment, the target client container is granted target database permission, wherein granting the target database permission comprises: and authorizing the target database authority to the IP network segment of the target client container in a database server corresponding to the database client.
Example four
The embodiment of the application provides a database operation method.
The database operation method in the embodiment includes: 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 may include: the method comprises the steps of checking the database, backing up the database, restoring the database, creating the database and deleting the database.
Illustratively, the database may be logged in through mysql-boot, -ppassword, -h database IP, -p database port.
Illustratively, databases that are operational to all database clients may be viewed by executing the mysql-root, -ppassword, -h database IP, -p database port, and-eshow databases instructions.
Illustratively, the database db1 may be deleted by executing the mysql-boot, -ppassword, -h database IP, -p database port, and-e drop db1 instructions.
Illustratively, the database db2 may be created by executing the mysql-boot, -ppassword, -h database IP, -p database port, and create database db2 instructions.
Illustratively, the database db3 may be deleted by executing the drop database db3 instruction.
In the database operation method in the embodiment, the database can be operated by executing the instruction required for operating the database in the container, so that the operation instruction of the related database does not need to be directly executed on the server, and the convenience of database operation is improved.
EXAMPLE five
Based on the same application concept, a database operation device corresponding to the database operation method is further provided in the embodiments of the present application, and since the principle of solving the problem of the device in the embodiments of the present application is similar to that in the embodiments of the database operation method, the implementation of the device in the embodiments of the present application may refer to the description in the embodiments of the method, and repeated details are omitted.
The embodiment of the application provides a database operating device. Each module in the database operating apparatus in this embodiment is configured to perform each step in the above method embodiment. The database operation 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, an embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program performs the steps of the database client building method or the database operating method described in the above method embodiment.
The computer program product of the database client building method provided in the embodiment of the present application includes a computer-readable storage medium storing a program code, where instructions included in the program code may be used to execute the steps of the database client building method described in the foregoing method embodiment, which may be specifically referred to in the foregoing method embodiment, and are not described herein again.
The computer program product of the database operation method provided in the embodiment of the present application includes a computer-readable storage medium storing a program code, where instructions included in the program code may be used to execute the steps of the database operation method described in the above method embodiment, which may be specifically referred to in the above method embodiment, and are not described herein again.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart 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, functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent 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 or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to 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), a magnetic disk or an optical disk, and other various media capable of storing program codes. It is noted that, herein, relational terms such as first and second, and the like may be 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. Also, 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 identical elements in a process, method, article, or apparatus that comprises the element.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The above description is only for the 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 conceive of the changes or substitutions within the technical scope of the present application, and shall 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 (10)

1. A database client building method is characterized by comprising the following steps:
packaging a database client into a mirror image, wherein the database client is used for carrying out data operation on a database;
generating a target client container by pulling up the mirror image;
and executing the instruction in the database client by the target client container to verify the target client container, wherein the target client container is used for performing data operation on the database after the verification is successful.
2. The method of claim 1, further comprising:
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 a mirror comprises:
obtaining a packaging mirror image tool based on a basic mirror image of a 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, the Dockerfile is a native packaging mirror image tool of an application container engine docker, and the database client comprises a mysql client.
4. The method of claim 1, wherein executing the instructions in the database client via the target client container comprises:
executing a database client version validation instruction inside the target client container to verify whether the command in the database client can be executed.
5. The method of any of claims 1-4, wherein the target client container is granted target database privileges, wherein granting the target database privileges comprises: and authorizing the target database authority to the IP network segment of the target client container in a database server corresponding to the database client.
6. A method of database operation, comprising:
and performing data operation on the target database through the target client container constructed by the database client construction method of any one of claims 1 to 5.
7. A database client building apparatus, comprising:
the system comprises a packaging module, a database processing module and a data processing module, wherein the packaging module is used for packaging a database client into a mirror image, and the database client is used for carrying out data operation on a database;
the generating module is used for generating a target client container by pulling up the mirror image;
and the first verification module is used for executing the instruction in the database client through the target client container so as to verify the target client container, and after the verification is successful, the target client container is used for performing data operation on the database.
8. A database operating apparatus, comprising:
an operation module, configured to perform data operation on a target database through the target client container constructed by the database client construction method according to any one of claims 1 to 5.
9. An electronic device, comprising: a processor, a memory storing machine-readable instructions executable by the processor, the machine-readable instructions, when executed by the processor, to perform the steps of the method of any of claims 1 to 6 when the electronic device is run.
10. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, is adapted to carry out the steps of the method according to any one of claims 1 to 6.
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 true CN111708610A (en) 2020-09-25
CN111708610B 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
CN111708610B (en) 2024-02-27

Similar Documents

Publication Publication Date Title
JP6967534B2 (en) Resource allocation for database provisioning
US11429677B2 (en) Sharing common metadata in multi-tenant environment
US10515212B1 (en) Tracking sensitive data in a distributed computing environment
JP6871943B2 (en) Preformed instructions for mobile cloud services
CN111279314A (en) Providing tenant isolation in a multi-tenant API gateway using micro-service containers
US20170249393A1 (en) Method and browser plugin for creation of objects in a cloud-based object management system
US9838435B2 (en) Authenticator for user state management
US10733238B2 (en) Script manager for distributed systems
JP6306055B2 (en) Using free-form metadata for access control
US20160011911A1 (en) Managing parallel processes for application-level partitions
US8892585B2 (en) Metadata driven flexible user interface for business applications
JP6775013B2 (en) Self-describing a configuration with support for sharing data tables
US20190310844A1 (en) Multi-platform pattern-based user interfaces
CN108140098A (en) Establish the trust between container
US9372668B2 (en) Interconnecting portal components with dialog state transitions
CN114846447A (en) Techniques for deploying infrastructure resources using declarative provisioning tools
CN112805705A (en) General treatment
CN117296038A (en) Cross-publishing software libraries to module stores
US11360951B1 (en) Database migration systems and methods
US10592864B2 (en) Share token issuance for declarative document authoring
CN115039073A (en) Autonomic TERRAFORM across cloud infrastructure
US11093630B2 (en) Determining viewable screen content
CN111708610B (en) Database client construction method and database operation method
CN114730258A (en) User interface techniques for infrastructure orchestration services
US11727358B1 (en) Linking functionality between distinct document and workflow management systems

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
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.

CB02 Change of applicant information
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant