CN113849487A - Database management method, device, equipment and medium - Google Patents

Database management method, device, equipment and medium Download PDF

Info

Publication number
CN113849487A
CN113849487A CN202111454649.7A CN202111454649A CN113849487A CN 113849487 A CN113849487 A CN 113849487A CN 202111454649 A CN202111454649 A CN 202111454649A CN 113849487 A CN113849487 A CN 113849487A
Authority
CN
China
Prior art keywords
icon
target
installation
database
shortcut
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
CN202111454649.7A
Other languages
Chinese (zh)
Other versions
CN113849487B (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.)
Zhongguancun Smart City Co Ltd
Original Assignee
Zhongguancun Smart City 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 Zhongguancun Smart City Co Ltd filed Critical Zhongguancun Smart City Co Ltd
Priority to CN202111454649.7A priority Critical patent/CN113849487B/en
Publication of CN113849487A publication Critical patent/CN113849487A/en
Application granted granted Critical
Publication of CN113849487B publication Critical patent/CN113849487B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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/21Design, administration or maintenance of databases
    • G06F16/211Schema design and management
    • 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/24Querying
    • G06F16/245Query processing
    • 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
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/04817Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance using icons
    • 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/451Execution arrangements for user interfaces

Abstract

The invention discloses a database management method, a device, equipment and a medium, comprising the following steps: running a target management program on a target server; generating a shortcut installation icon corresponding to an installation subprogram according to the installation subprogram used for installing the target database in the target management program; generating a shortcut operation icon corresponding to an operation subprogram according to the operation subprogram used for operating the target database in the target management program; and constructing a graphical interface corresponding to the target management program according to the shortcut installation icon and the shortcut operation icon. According to the method and the system, one-key installation and related management operation of the database at the server side are achieved through the constructed graphical interface, the situation that complex command lines are used for completing installation and management of the database is avoided, the complexity of operation and maintenance of the database is greatly reduced, the installation efficiency and the management efficiency of the database are improved, in addition, technical dependence on technicians is reduced, the operation and maintenance cost is greatly reduced, and loss caused by data risk is reduced.

Description

Database management method, device, equipment and medium
Technical Field
The present invention relates to the field of electronic digital data processing technologies, and in particular, to a database management method, apparatus, device, and medium.
Background
The MySQL (Structured Query Language) database is a relational database management system that stores data in different tables instead of putting all data in one large repository, which increases speed and flexibility.
However, the construction of the MySQL database is complex, and the construction of the MySQL database can be well completed by professional technicians with rich experience in the related technology. The operation of building the MySQL database is complicated, so that the MySQL database is inconvenient to use.
Disclosure of Invention
By providing the database management method, device, equipment and medium, the technical problem that the MySQL database is inconvenient to use due to the fact that operation for building the MySQL database is complex in the prior art is solved, the building mode of the MySQL database is simplified, and the building efficiency of the MySQL database is improved.
In a first aspect, the present application provides a database management method, including:
running a target management program on a target server;
generating a shortcut installation icon corresponding to an installation subprogram according to the installation subprogram used for installing the target database in the target management program;
generating a shortcut operation icon corresponding to an operation subprogram according to the operation subprogram used for operating the target database in the target management program;
and constructing a graphical interface corresponding to the target management program according to the shortcut installation icon and the shortcut operation icon.
Further, according to an installation subprogram used for installing a target database in a target management program, a shortcut installation icon corresponding to the installation subprogram is generated, and the method comprises the following steps:
converting the installation subprogram into an installation script file;
and generating a shortcut installation icon according to the installation script file.
Further, after the graphical interface corresponding to the target management program is constructed according to the shortcut installation icon and the shortcut operation icon, the method further comprises the following steps:
acquiring installation operation aiming at a shortcut installation icon in a graphical interface;
and responding to the installation operation, and running an installation subprogram to finish the server side installation of the target database on the target server.
Further, according to an operation subprogram used for operating a target database in the target management program, a shortcut operation icon corresponding to the operation subprogram is generated, and the method comprises the following steps:
converting the operation subprogram into an operation script file;
and generating a shortcut operation icon according to the operation script file.
Further, after the graphical interface corresponding to the target management program is constructed according to the shortcut installation icon and the shortcut operation icon, the method further comprises the following steps:
acquiring management operation aiming at a shortcut operation icon in a graphical interface;
and responding to the management operation to manage the target database.
Further, the shortcut operation icon includes at least one of a multi-instance build icon, a database build icon, a library build icon, a cluster build icon, a database backup icon, a database restore icon, a binlog parse icon, a user build icon, a restore on demand icon, a state monitoring tuning icon, and a database versioning icon.
Further, when the shortcut operation icon is the on-demand recovery icon, after a graphical interface corresponding to the target database is constructed according to the shortcut installation icon and the shortcut operation icon, the method further includes:
acquiring management operation aiming at an on-demand recovery icon in a graphical interface;
responding to the management operation of the on-demand recovery icon, and acquiring target rollback time of the running master library in the target database;
according to the acquired log file of the operating master library, controlling a delay slave library in a target database to backup target data in the operating master library; the delayed slave library is a slave library with a backup time different from the updating time of the running master library by a preset time interval, and the target data is data in the running master library before the target rollback time;
and after the delayed slave library finishes the backup of the target data, taking the delayed slave library as a new running master library.
Further, after the target management program is run on the target server, the method further comprises:
adding at least one associated server in the target management program;
after a graphical interface corresponding to the target management program is constructed according to the shortcut installation icon and the shortcut operation icon, the method further comprises the following steps:
acquiring installation operation aiming at a shortcut installation icon in a graphical interface;
responding to installation operation, and determining a server to be installed from a target server and at least one associated server;
and running an installation subprogram on the server to be installed so as to complete the server-side installation of the target database on the server to be installed.
Further, after the graphical interface corresponding to the target management program is constructed according to the shortcut installation icon and the shortcut operation icon, the method further comprises the following steps:
acquiring management operation aiming at a shortcut operation icon in a graphical interface;
responding to the management operation, and determining a server to be managed from the target server and at least one associated server;
and running the operation subprogram on the server to be managed so as to complete the management operation of the target database on the server to be managed.
In a second aspect, the present application provides a database management apparatus, comprising:
the running module is used for running the target management program on the target server;
the generation module is used for generating a shortcut installation icon corresponding to an installation subprogram according to the installation subprogram used for installing the target database in the target management program;
the generation module is used for generating a shortcut operation icon corresponding to an operation subprogram according to the operation subprogram used for operating the target database in the target management program;
and the construction module is used for constructing a graphical interface corresponding to the target management program according to the shortcut installation icon and the shortcut operation icon.
One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:
the method comprises the steps that a target management program runs on a target server; generating a shortcut installation icon corresponding to an installation subprogram according to the installation subprogram used for installing the target database in the target management program; generating a shortcut operation icon corresponding to an operation subprogram according to the operation subprogram used for operating the target database in the target management program; and constructing a graphical interface corresponding to the target management program according to the shortcut installation icon and the shortcut operation icon. According to the MySQL database management method and system, one-key installation and related management operation of the MySQL database at the server side are achieved through the constructed graphical interface, installation and management of the MySQL database are avoided by using complex command lines, the operation and maintenance complexity of the MySQL database is greatly reduced, the installation efficiency and the management efficiency of the MySQL database are improved, in addition, technical dependence on technical personnel is reduced, the operation and maintenance cost is greatly reduced, loss caused by data risk is reduced, and user experience is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
FIG. 1 is a schematic flow chart of a database management method provided herein;
FIG. 2 is a schematic structural diagram of a target server and an association server provided in the present application;
fig. 3 is a schematic structural diagram of a database management apparatus provided in the present application.
Detailed Description
By providing the database management method, the technical problem that the MySQL database is inconvenient to use due to the fact that operation of building the MySQL database is complex in the prior art is solved.
In order to solve the technical problems, the general idea of the embodiment of the application is as follows:
a database management method, comprising: running a target management program on a target server; generating a shortcut installation icon corresponding to an installation subprogram according to the installation subprogram used for installing the target database in the target management program; generating a shortcut operation icon corresponding to an operation subprogram according to the operation subprogram used for operating the target database in the target management program; and constructing a graphical interface corresponding to the target management program according to the shortcut installation icon and the shortcut operation icon.
The embodiment runs a target management program on a target server; generating a shortcut installation icon corresponding to an installation subprogram according to the installation subprogram used for installing the target database in the target management program; generating a shortcut operation icon corresponding to an operation subprogram according to the operation subprogram used for operating the target database in the target management program; and constructing a graphical interface corresponding to the target management program according to the shortcut installation icon and the shortcut operation icon. According to the MySQL database management method and system, one-key installation and related management operation of the MySQL database at the server side are achieved through the constructed graphical interface, installation and management of the MySQL database are avoided by using complex command lines, the operation and maintenance complexity of the MySQL database is greatly reduced, the installation efficiency and the management efficiency of the MySQL database are improved, in addition, technical dependence on technical personnel is reduced, the operation and maintenance cost is greatly reduced, loss caused by data risk is reduced, and user experience is improved.
In order to better understand the technical solution, the technical solution will be described in detail with reference to the drawings and the specific embodiments.
First, it is stated that the term "and/or" appearing herein is merely one type of associative relationship that describes an associated object, meaning that three types of relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
The MySQL database has the advantages of high speed and high flexibility, and meanwhile, the problems of complex construction, complex management and incapability of realizing fixed-point backspacing exist, so that on one hand, the construction cost and the maintenance cost of the MySQL database are high, and on the other hand, the use difficulty of the MySQL database is also improved.
The embodiment provides a database management method as shown in fig. 1, which is mainly applied to MySQL databases, and the method includes steps S11-S14.
In step S11, the target management program is run on the target server.
In step S12, a shortcut installation icon corresponding to the installation subprogram is generated from the installation subprogram for installing the target database in the target management program.
In step S13, a shortcut icon corresponding to the operation subprogram is generated based on the operation subprogram for operating the target database in the target management program.
And step S14, constructing a graphical interface corresponding to the target management program according to the shortcut installation icon and the shortcut operation icon.
The target management program can be a web (network) application program which is independently operated and constructed on the target server, and the web application program can call the operating system class library so as to realize the execution of the operating system command. By executing operating system commands, common operations on the target server may be further implemented.
The target management program integrates an installation subprogram for installing the target database and also integrates an operation subprogram for operating the target database. The web application program can provide a web graphical interface, and common operation on the server side can be achieved through the shortcut installation icon and the shortcut operation icon in the web graphical interface.
In this embodiment, the step S12 of generating the shortcut installation icon and the step S13 of generating the shortcut operation icon may be performed simultaneously or sequentially, and the order between the step S12 and the step S13 is not limited in this embodiment.
Specifically, the target management program is operated on the target server, the shortcut installation icon can be generated according to the installation subprogram, when the shortcut installation icon is triggered, the installation subprogram can be triggered to operate, and then the target database is automatically installed. Specifically, the present embodiment converts the installation subprogram into an installation script file; and generating a shortcut installation icon according to the installation script file.
When the installation operation aiming at the shortcut installation icon in the graphical interface is obtained, the target management program responds to the installation operation and runs the installation subprogram so as to complete the server installation of the target database on the target server.
In the related art, when a user needs to install a client installation program, a source code needs to be downloaded from an official website of the MySQL database, then the source code is compiled and installed, and an installation environment is provided for installing the MySQL database, so that the MySQL database is complex to install and the installation process is complicated. Moreover, the above operation needs a skilled person with a great experience to realize. On one hand, the MySQL database is complex to install, so that the MySQL database is inconvenient to use, low in operation efficiency and low in user experience, and on the other hand, the MySQL database can be installed well by technical personnel with rich experience, so that the requirement on the technical personnel for installing the MySQL database is high, and the installation cost of the MySQL database is high.
In the embodiment, the installation operation for the shortcut installation icon in the graphical interface is obtained, that is, the trigger signal of the shortcut installation icon is obtained by the operator, and the client responds to the installation operation, so that the client installation program is automatically installed to complete the client installation of the target database. Therefore, the installation mode of the MySQL database is greatly simplified, the experience requirements of practitioners for the MySQL database are reduced, on one hand, the operation steps of the MySQL database are simplified, the use difficulty of the MySQL database is reduced, the use efficiency of the MySQL database is improved, on the other hand, the operation time of the MySQL database is shortened, and the time cost is saved.
In summary, in the embodiment, the target management program is run on the target server, the shortcut installation icon corresponding to the installation subprogram in the target management program is generated, and the target database can be automatically installed on the target server by clicking the shortcut installation icon, so that not only is the operation of installing the database simplified, but also the efficiency of installing the database is improved, the requirements on the technical experience of the operator are also reduced, the errors caused by manual operation are avoided, and further the convenience of installing the database is improved.
The object management program is operated on the object server, the shortcut operation icon can be generated according to the operation subprogram, when the shortcut operation icon is triggered, the operation subprogram can be triggered to operate, and then corresponding operation on the object database is automatically completed. Specifically, the present embodiment converts the operation subprogram into an operation script file; and generating a shortcut operation icon according to the operation script file.
When the management operation aiming at the shortcut operation icon in the graphical interface is acquired, the target management program responds to the management operation and runs the operation subprogram, so that the target database is correspondingly managed.
The shortcut operation icon comprises at least one of a multi-instance building icon, a database building icon, a slave library building icon, a cluster building icon, a database backup icon, a database recovery icon, a binlog analysis icon, a user building icon, an on-demand recovery icon, a state monitoring and optimizing icon and a database version customizing icon.
The multi-instance building icon can build a plurality of independent databases on the server quickly by one key. The database creation icon may create a single database. Creating the icon from the library can be done quickly from the library by one key. The cluster building icon can be based on a preset cluster template, and the cluster building can be quickly realized by one key, for example, the cluster template can be a cluster template with one master (library) and multiple slaves (libraries). The database backup icon can realize the database backup operation quickly by one key. The database restore icon may restore the specified database data. The binlog parsing icon can perform analysis search and the like on log contents. The user-created icon may be a one-touch quick-create user. The icon can be restored as required to quickly return back at a fixed point, so that errors of the database are avoided. The state monitoring and optimizing icon can monitor the operation parameters of the server and the operation parameters of the database, and can provide database adjustment suggestions when some common errors or abnormal conditions occur. The database version custom icon may adjust the installation and operation subroutines in the target hypervisor according to different server types.
In this embodiment, the management subprogram corresponding to each different management operation is converted into a corresponding operation script file, and then a shortcut operation icon corresponding to each preset management operation can be generated according to each operation script file.
In this embodiment, by acquiring a management operation for any shortcut icon in the graphical interface, that is, acquiring a trigger signal for any shortcut icon, a corresponding management subprogram in the target management program is run, so as to implement a management operation for the target database.
Specifically, when the shortcut operation icon is a multi-instance creation icon and trigger operation for the multi-instance creation icon is acquired, integrating the binary program compiled by the official open-source MySQL, creating a directory structure by using a preset instance, customizing a corresponding start script file and configuration file for each instance, constructing a multi-instance running environment, and further establishing a plurality of databases which are independent of each other on the target server. More specifically, environments based on different Linux platforms can be customized by a Linux kernel type and a glibc version type. Therefore, by triggering the shortcut icon, multi-instance quick installation deployment can be realized depending on the automation script. On one hand, multi-instance creation can be realized by one key, operation steps of multi-instance creation are reduced, and a complex process of multi-instance creation is simplified, and on the other hand, technical experience requirements on operators are reduced, so that multi-instance creation in the MySQL database is more convenient, quicker and simpler.
When the shortcut icon is a creation icon from the library and a trigger operation for creating the icon from the library is acquired, the client can be enabled to automatically run the related program created from the library depending on the web application (the related program operation can be split into a plurality of specific commands or scripts, and the specific commands or scripts are mutually associated), and a technician does not need to manually create the shortcut icon through a code line. On one hand, the slave library can be created by one key, so that the operation steps of creating the slave library are reduced, the complex flow of creating the slave library is simplified, and on the other hand, the technical experience requirements on operators are reduced, so that the slave library in the MySQL database is more convenient, quicker and simpler to create.
When the shortcut operation icon is a cluster creation icon and the trigger operation for the cluster creation icon is acquired, the database cluster can be quickly built depending on a pre-built database cluster template. The database cluster building can be performed through a database middleware (e.g., proxy, third party Mycat), or the database cluster building can be performed without the database middleware, which is not limited herein. On one hand, the database cluster can be quickly created, the operation steps for creating the database cluster are reduced, the complex process for creating the database cluster is simplified, and on the other hand, the technical experience requirements for operators are reduced, so that the database cluster in the MySQL database is more convenient, quicker and simpler to create.
When the shortcut icon is an on-demand restore icon and a management operation for the on-demand restore icon in the graphical interface is acquired, steps S21 to S23 may be specifically implemented.
Step S21, responding to the management operation of the on-demand recovery icon, and acquiring the target rollback time of the main library in the target database;
step S22, according to the acquired log file of the operation master library, controlling the delayed slave library in the target database to backup the target data in the operation master library; the delayed slave library is a slave library with a backup time different from the updating time of the running master library by a preset time interval, and the target data is data in the running master library before the target rollback time;
and step S23, after the delayed slave library completes the backup of the target data, the delayed slave library is used as a new operation master library.
In specific implementation, when the on-demand recovery icon is triggered, the input box of the target rollback moment of the running master library is popped up in the graphical interface; by the target rollback time filled in the input box, the log file (i.e. bin) of the running master library can be inquired, and the delayed slave library is controlled to backup the target data in the running master library before the target rollback time based on the log file. And when the delayed slave library finishes the backup of the target data, the delayed slave library is used as a new operation master library to operate. In addition, a corresponding delayed slave library may be additionally established for the new operation master library, and of course, an existing slave library may also be converted into a temporary slave library for use, which is not limited herein.
It should be noted that the delayed slave library mentioned in this embodiment is not synchronized with the data update of the running master library, and although the delayed slave library in this embodiment is also a backup library, when the on-demand recovery icon is not triggered, the backup time of the delayed slave library always differs from the update time of the running master library by a preset time interval. That is, the time interval between the latest data backed up by the delayed slave library and the latest data in the running master library is a preset time interval.
For example, the generation time of the latest data in the master library is 06 minutes 58 seconds at 14 times 11/10/2002, and the generation time of the latest data in the delayed slave library is 06 minutes 58 seconds at 14 times 11/9/2002, that is, a time interval of 24 hours is different between the master library and the delayed slave library.
When misoperation occurs in 06 minutes 58 seconds at 11 months, 10 days and 14 days in 2002 in the running master library, data in the original delay slave library is only backed up to 06 minutes 58 seconds at 11 months, 9 days and 14 days in 2002, when the on-demand recovery icon is triggered, the target rollback time can be 06 minutes 57 seconds at 14 days at 11 months, 10 days and 14 days in 2002, and at the moment, the data needs to be backed up to 06 minutes 57 seconds at 14 days at 11 months, 10 days and 10 days in 2002 by the delay slave library. After the delayed slave library backs up the data to 06 minutes 57 seconds after 11, 10, 14, 2002, the existing running master library can be abandoned, and the delayed slave library is used as a new running master library to run.
Of course, when the on-demand recovery icon is triggered, fixed-point rollback may be performed by a specific sql statement, which is not limited herein.
When the shortcut operation icon is a state monitoring and optimizing icon and trigger operation aiming at the state monitoring and optimizing icon is obtained, corresponding performance indexes of performance, master-slave architecture, cluster state and the like of the target database are collected and displayed in a graphical mode, and if some performance indexes exceed conventional parameters, preset optimizing suggestions can be given according to corresponding index types for technical staff to refer to, and optimizing operation of the target database is completed. On one hand, the performance parameters of the database operation are displayed in one key mode and are graphically displayed, so that technicians can conveniently check the performance parameters, on the other hand, preset tuning suggestions can be given according to abnormal performance indexes, experience requirements on the technicians are reduced, and database tuning difficulty is simplified.
In summary, in the embodiment, through the graphical interface, the relevant management operation of the MySQL database is realized, the situation that the MySQL database is managed by using a complex command line is avoided, the complexity of operation and maintenance of the MySQL database is greatly reduced, in addition, the technical dependence on technical personnel is reduced, the operation and maintenance cost is greatly reduced, and the loss caused by data risk is also reduced.
On the basis of the above scheme, the present embodiment also provides the following extension scheme.
Step S31, after running the target management program on the target server, adding at least one associated server in the target management program.
For example, as shown in fig. 2, where node 1 is the target server installed with the target hypervisor, and node 2, node 3, and node 4 are 3 associated servers added in the target hypervisor.
After a graphical interface corresponding to the target management program is constructed according to the shortcut installation icon and the shortcut operation icon, the method further comprises the following steps:
in step S32, an installation operation for the shortcut installation icon in the graphical interface is acquired.
Step S33, in response to the installation operation, determining a server to be installed from the target server and the at least one associated server.
And step S34, running an installation subprogram on the server to be installed so as to complete the server-side installation of the target database on the server to be installed.
When the installation operation of the shortcut installation icon is acquired, the server to be installed of the database is determined through the man-machine interaction interface, and then the installation subprogram is run on the server to be installed, so that the server-side installation of the target database on the server to be installed is completed.
Because the way of installing the database on the other associated servers is the same as the way of installing the database on the target server, the process of installing the database on the other associated servers can refer to the process of installing the database on the target server, and details are not repeated here.
For example, when an installation operation for the shortcut installation icon is detected, if it is determined that the target server and the associated server corresponding to the node 3 in fig. 2 need to install the database through the human-computer interaction interface, the associated server corresponding to the target server and the node 3 is determined as a server to be installed, and then installation subroutines are respectively run on the target server and the associated server corresponding to the node 3, so as to implement installation of the target database.
In summary, in the embodiment, the target management program is run on the target server, the shortcut installation icon corresponding to the installation subprogram in the target management program is generated, and by clicking the shortcut installation icon, the target database can be automatically installed on the target server, and the target database can also be automatically installed on other servers associated with the target server, so that the efficiency of installing the database is improved, the requirements on the technical experience of the operator are reduced, the errors caused by manual operation are avoided, and the convenience of installing the database is further improved.
On the basis of the above scheme, the present embodiment also provides the following extension scheme.
After a graphical interface corresponding to the target management program is constructed according to the shortcut installation icon and the shortcut operation icon, the method further comprises the following steps:
step S41, acquiring management operation aiming at the shortcut operation icon in the graphical interface;
step S42, responding to the management operation, determining a server to be managed from the target server and at least one associated server;
in step S43, an operation subprogram is run on the server to be managed to complete the management operation of the target database on the server to be managed.
When the management operation on the shortcut operation icon is acquired, a server to be managed, which needs to operate the database, can be determined through the man-machine interaction interface, and then a corresponding operation subprogram is run on the server to be managed, so that the management operation of the target database on the server to be managed is completed.
Since the way of managing the database on the other associated servers is the same as the way of managing the database on the target server, the process of managing the database on the other associated servers may refer to the process of managing the database on the target server, and will not be described herein again.
In summary, in this embodiment, through the graphical interface, not only the MySQL database on the target server can be subjected to the relevant management operation, but also the databases on other servers associated with the target server can be subjected to the relevant management operation, thereby avoiding the use of a complex command line to complete the management of the MySQL database, greatly reducing the complexity of the operation and maintenance of the MySQL database, in addition, reducing the technical dependence on technical personnel, greatly reducing the operation and maintenance cost, and also reducing the loss caused by data risk.
Therefore, the embodiment builds the icon through multiple instances, the multiple instances are built rapidly, and a large amount of manpower is saved; and the database instance deployed by the method has clear structure and is easier to manage and transplant than MySQL deployed by an official scheme.
According to the embodiment, the cluster building can be quickly realized through the cluster building icon, so that an administrator with less experience can easily use the MySQL cluster.
In this embodiment, by integrating common operation and maintenance management operations, some specific operation and maintenance functions (e.g., creation from a library, creation by a user, database backup, recovery on demand, status monitoring, etc.) may be implemented, and some specific operations with finer granularity (e.g., recovery from misoperation) may also be implemented; operation and maintenance personnel do not need to search operation methods with different requirements, so that the influence of misoperation is reduced, the working efficiency can be improved, and the technical requirements on the operation and maintenance personnel are reduced.
According to the embodiment, the rollback remedy of the database misoperation is realized through the misoperation recovery function, the database can be rolled back according to the specific time point and the specific sql statement of the misoperation, and the risk caused by the database misoperation is greatly reduced.
According to the method and the system, operation and maintenance personnel can be effectively guided to tune through monitoring and tuning related functions, and the complexity of database tuning is simplified.
Based on the same inventive concept, the present embodiment provides a database management apparatus as shown in fig. 3, the apparatus including:
an execution module 31 for executing the target management program on the target server;
the generating module 32 is used for generating a shortcut installation icon corresponding to an installation subprogram according to the installation subprogram used for installing the target database in the target management program;
the generating module 32 is configured to generate a shortcut icon corresponding to an operation subprogram according to the operation subprogram used for operating the target database in the target management program;
and the building module 33 is configured to build a graphical interface corresponding to the target management program according to the shortcut installation icon and the shortcut operation icon.
The generating module 32 is specifically configured to:
converting the installation subprogram into an installation script file;
and generating a shortcut installation icon according to the installation script file.
The apparatus also includes a response module to:
acquiring installation operation aiming at a shortcut installation icon in a graphical interface;
and responding to the installation operation, and running an installation subprogram to finish the server side installation of the target database on the target server.
The generating module 32 is specifically configured to: converting the operation subprogram into an operation script file;
and generating a shortcut operation icon according to the operation script file.
The response module is further to: acquiring management operation aiming at a shortcut operation icon in a graphical interface; and responding to the management operation to manage the target database.
The shortcut operation icon comprises at least one of a multi-instance building icon, a database building icon, a slave library building icon, a cluster building icon, a database backup icon, a database recovery icon, a binlog parsing icon, a user building icon, an on-demand recovery icon, a state monitoring and optimizing icon and a database version customizing icon.
The response module is specifically configured to:
acquiring management operation aiming at an on-demand recovery icon in a graphical interface;
responding to the management operation of the on-demand recovery icon, and acquiring target rollback time of the running master library in the target database;
according to the acquired log file of the operating master library, controlling a delay slave library in a target database to backup target data in the operating master library; the delayed slave library is a slave library with a backup time different from the updating time of the running master library by a preset time interval, and the target data is data in the running master library before the target rollback time;
and after the delayed slave library finishes the backup of the target data, taking the delayed slave library as a new running master library.
The device still includes:
the adding module is used for adding at least one associated server in the target management program;
the response module is further to:
acquiring installation operation aiming at a shortcut installation icon in a graphical interface;
responding to installation operation, and determining a server to be installed from a target server and at least one associated server;
and running an installation subprogram on the server to be installed so as to complete the server-side installation of the target database on the server to be installed.
The response module is further to:
acquiring management operation aiming at a shortcut operation icon in a graphical interface;
responding to the management operation, and determining a server to be managed from the target server and at least one associated server;
and running the operation subprogram on the server to be managed so as to complete the management operation of the target database on the server to be managed.
Since the electronic device described in this embodiment is an electronic device used for implementing the method for processing information in this embodiment, a person skilled in the art can understand the specific implementation manner of the electronic device of this embodiment and various variations thereof based on the method for processing information described in this embodiment, and therefore, how to implement the method in this embodiment by the electronic device is not described in detail here. Electronic devices used by those skilled in the art to implement the method for processing information in the embodiments of the present application are all within the scope of the present application.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (10)

1. A database management method, the method comprising:
running a target management program on a target server;
generating a shortcut installation icon corresponding to an installation subprogram according to the installation subprogram used for installing a target database in the target management program;
according to an operation subprogram used for operating the target database in the target management program, generating a shortcut operation icon corresponding to the operation subprogram;
and constructing a graphical interface corresponding to the target management program according to the shortcut installation icon and the shortcut operation icon.
2. The method of claim 1, wherein the generating a shortcut installation icon corresponding to an installation subprogram according to the installation subprogram for installing a target database in the target management program comprises:
converting the installation subprogram into an installation script file;
and generating the shortcut installation icon according to the installation script file.
3. The method of claim 1, wherein after building a graphical interface corresponding to the target management program based on the quick install icon and the quick action icon, the method further comprises:
acquiring installation operation aiming at the shortcut installation icon in the graphical interface;
and responding to the installation operation, and running the installation subprogram to finish the server installation of the target database on the target server.
4. The method of claim 1, wherein the generating a shortcut operation icon corresponding to an operation subprogram according to the operation subprogram for operating the target database in the target management program comprises:
converting the operation subprogram into an operation script file;
and generating the shortcut operation icon according to the operation script file.
5. The method of claim 1, wherein after building a graphical interface corresponding to the target management program based on the quick install icon and the quick action icon, the method further comprises:
acquiring management operation aiming at the shortcut operation icon in the graphical interface;
and responding to the management operation to manage the target database.
6. The method of claim 1, wherein the shortcut icon includes at least one of a multi-instance build icon, a database build icon, a create from library icon, a cluster build icon, a database backup icon, a database restore icon, a binlog parse icon, a user create icon, a restore on demand icon, a state monitoring tuning icon, and a database versioning icon.
7. The method of claim 1, wherein when the shortcut icon is an on-demand restore icon, after constructing a graphical interface corresponding to the target database based on the shortcut install icon and the shortcut icon, the method further comprises:
acquiring management operation aiming at the on-demand recovery icon in the graphical interface;
responding to the management operation of the on-demand recovery icon, and acquiring target rollback time of a running main library in the target database;
according to the acquired log file of the operating master library, controlling a delay slave library in the target database to backup the target data in the operating master library; the delayed slave library is a slave library with a backup time different from the updating time of the running master library by a preset time interval, and the target data is data in the running master library before the target rollback time;
and after the delayed slave library finishes the backup of the target data, taking the delayed slave library as a new operation master library.
8. The method of claim 1, wherein after running the target hypervisor on the target server, the method further comprises:
adding at least one associated server in the target management program;
after a graphical interface corresponding to the target management program is constructed according to the shortcut installation icon and the shortcut operation icon, the method further comprises the following steps:
acquiring installation operation aiming at the shortcut installation icon in the graphical interface;
responding to the installation operation, and determining a server to be installed from the target server and the at least one associated server;
and running the installation subprogram on the server to be installed so as to complete the server installation of the target database on the server to be installed.
9. The method of claim 8, wherein after building a graphical interface corresponding to the target management program based on the quick install icon and the quick action icon, the method further comprises:
acquiring management operation aiming at the shortcut operation icon in the graphical interface;
responding to the management operation, and determining a server to be managed from the target server and the at least one associated server;
and running the operation subprogram on the server to be managed so as to complete the management operation of the target database on the server to be managed.
10. A database management apparatus, the apparatus comprising:
the running module is used for running the target management program on the target server;
the generation module is used for generating a shortcut installation icon corresponding to an installation subprogram according to the installation subprogram used for installing a target database in the target management program;
the generation module is used for generating a shortcut operation icon corresponding to an operation subprogram according to the operation subprogram used for operating the target database in the target management program;
and the construction module is used for constructing a graphical interface corresponding to the target management program according to the shortcut installation icon and the shortcut operation icon.
CN202111454649.7A 2021-12-02 2021-12-02 Database management method, device, equipment and medium Active CN113849487B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111454649.7A CN113849487B (en) 2021-12-02 2021-12-02 Database management method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111454649.7A CN113849487B (en) 2021-12-02 2021-12-02 Database management method, device, equipment and medium

Publications (2)

Publication Number Publication Date
CN113849487A true CN113849487A (en) 2021-12-28
CN113849487B CN113849487B (en) 2022-03-11

Family

ID=78982576

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111454649.7A Active CN113849487B (en) 2021-12-02 2021-12-02 Database management method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN113849487B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020124245A1 (en) * 2000-08-14 2002-09-05 Alvin Maddux Method and apparatus for advanced software deployment
CN1731738A (en) * 2005-08-30 2006-02-08 西安交通大学 Automated quick deployment method for large-scale computer cluster node
CN105867925A (en) * 2016-03-29 2016-08-17 联想(北京)有限公司 Shortcut establishing method and electronic device
CN107102875A (en) * 2017-04-20 2017-08-29 广州番禺职业技术学院 Info workstation SMT Station Management software installation methods
CN108632375A (en) * 2018-05-09 2018-10-09 四川华创世纪科技有限公司 A kind of online upgrading method for distributed deployment service software program
US20200394056A1 (en) * 2019-06-14 2020-12-17 Citrix Systems, Inc. On-demand applications
CN113110835A (en) * 2021-03-03 2021-07-13 南阳柯丽尔科技有限公司 Layout management method, device, medium and equipment for medical operating system interface

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020124245A1 (en) * 2000-08-14 2002-09-05 Alvin Maddux Method and apparatus for advanced software deployment
CN1731738A (en) * 2005-08-30 2006-02-08 西安交通大学 Automated quick deployment method for large-scale computer cluster node
CN105867925A (en) * 2016-03-29 2016-08-17 联想(北京)有限公司 Shortcut establishing method and electronic device
CN107102875A (en) * 2017-04-20 2017-08-29 广州番禺职业技术学院 Info workstation SMT Station Management software installation methods
CN108632375A (en) * 2018-05-09 2018-10-09 四川华创世纪科技有限公司 A kind of online upgrading method for distributed deployment service software program
US20200394056A1 (en) * 2019-06-14 2020-12-17 Citrix Systems, Inc. On-demand applications
CN113110835A (en) * 2021-03-03 2021-07-13 南阳柯丽尔科技有限公司 Layout management method, device, medium and equipment for medical operating system interface

Also Published As

Publication number Publication date
CN113849487B (en) 2022-03-11

Similar Documents

Publication Publication Date Title
CN113396393A (en) Dynamic auto-configuration of multi-tenant PAAS components
CN111324417B (en) Component control method and device of Kubernetes cluster, electronic equipment and medium
CN102142024B (en) Use in distributed data base and increase progressively seizure to carry out logical data backup and rollback
US8640098B2 (en) Offline configuration and download approach
US9626271B2 (en) Multivariate metadata based cloud deployment monitoring for lifecycle operations
US20160077919A1 (en) Methods and apparatus to perform site recovery of a virtual data center
CN110019138B (en) Automatic transfer table space migration method and system based on Zabbix
EP3418918B1 (en) Generation and graphical display of data transform provenance metadata
CN110162334B (en) Code management method, device and storage medium
CN109240716B (en) Big data platform version management and rapid iterative deployment method and system
CN113342387A (en) Automatic software upgrading method, updating client and updating server
CN113778486A (en) Containerization processing method, device, medium and equipment for code pipeline
US20150242282A1 (en) Mechanism to update software packages
CN110795105A (en) Automatic compiling and deploying method and system for power distribution automation master station system
CN113849487B (en) Database management method, device, equipment and medium
US20160147528A1 (en) System and method for updating content without downtime
CN111147291B (en) Service maintenance method and device
CN116149713B (en) Program upgrading method and device for all-level equipment under tree-type heterogeneous network
US10963227B2 (en) Technique for transforming a standard messaging component to a customized component
JP5052472B2 (en) Program setting information switching system and switching method
CN116069358A (en) Method, device and storage medium for upgrading data in distributed database
CN110764785A (en) Power industry cloud platform tool chain based on open source assembly and cloud platform operation and maintenance method
US10642594B2 (en) System and method for updating monitoring software using content model with validity attributes
KR101762861B1 (en) Programmable computation system using one or more function modules, method for processing information using one or more function modules and computer program for the same
CN114721686A (en) Configuration data updating method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant