Use Delphi to solve the problem of no graphical interface in the MySQL database

Source: Internet
Author: User
Tags mysql client

MySQL is a sophisticated SQLManagement system, although it is not an open source product, but in some cases you can use it freely. For UNIX and OS/2 platforms, MySQL is basically free of charge. In addition, MySQL is a real multi-user, multi-thread SQL database server. Because of its powerful functions, flexibility, and rich application programming interfaces (API) as well as the sophisticated system structure, it is favored by the majority of Free Software enthusiasts and even commercial software users, especially with Apache and PHPThe combination of/perl provides powerful impetus for the establishment of database-based Dynamic websites. Although MySQL is still under development, it has provided a rich and extremely useful feature set.Database

MySQL is designed to be fast, robust, and easy to use. We need to select an SQL Server because it can process large databases on any non-expensive hardware platform, and the speed is also very fast. mysq has been using the MySQL database website since 1996, more than half of these databases have more than 40 databases, including 10,000 tables, of which more than 500 tables have more than 7 million rows, which is about 100 GB ). However, when developing a MySQL database, all MySQL tables and user creation are created using the SQL language. The built-in winmysqladmin can only view databases, but cannot edit and modify them. To perform operations, you can only use SQL to implement these operations. You must be familiar with MySQL syntax. For a user who has just started to use SQL, there are undoubtedly many obstacles and it is inconvenient for future maintenance. Other tools are available, but the functions are incomplete and the running effect is not satisfactory. If the application developers can use Delphi to implement the functions of MySQL, design the graphic interface for business requirements, and implement it, just like those of large databases such OracleIn the same way as DBA studio. MySQL will be icing on the cake. This system is a very popular system that solves the problem of MySQL maintenance without a graphical interface. Implementation SchemeBased on the urgent demand for business support and network management, we decided to develop a graphical management tool for MySQL. We carefully examined some solutions. (1) Use the API function library provided by MySQL. Many well-known MYSQL client tools are implemented in this way, as is the well-known winmysql tool. This can be implemented in most development tools. For example, Vc, Delphi, and VB can be implemented by calling third-party APIs. But it is not easy for everyone to have high requirements on programmers and be familiar with a set of MySQL API functions. This method cannot be used in ASP or other programs because it does not support COM objects. (2) Use the myodbc driver. You can download the myodbc driver at www.mysql.com, which is a database interface provided by MySQL for visual development tools. Download the full installation package and install it directly. You can also just register the dynamic connection library by uninstalling the installation package and placing the myodbc. dll file WindowsIn the/system or WINNT/system32 directory, it depends on whether your system is Win9x or WINNT (Win2k ). Open a plain text editor, such as editplus and notpad, and save the following paragraph as a registry file and run it. Windows Registry Editor Version 4.00 if you use Win2k, replace it with Windows Registry Editor Version 5.00 [hkey_lo CAL _ MacHine/software/ODBC/odbcinst. INI/myodbc driver] "usagecount" = DWORD: 00000002 "driver" = "C: // winnt // system32 // myodbc. DLL "" setup "=" C: // winnt // system32 // myodbc. DLL "" sqllevel "=" 1 "" fileusage "=" 0 "driverodbcver" = "02.50" "connectfunctions" = "yyy" "apilevel" = "1" cptimeout" = "120" [HKEY_LOCAL_MACHINE/software/ODBC/odbcinst. INI/ODBC drivers] "myodbc driver" = "installed" is a graphical development tool. We chose the excellent software that is currently popular with Delphi to manage mysql users and tables. As a rad tool, Delphi is widely used for its rapid compilation and friendly visual interface. Most importantly, Delphi provides many ready-to-use controls. In addition, you can buy special controls developed by a third party, or download free controls from the Internet. These controls are sufficient for general application system development. Main functionsFunction Structure:

1. database management includes database creation, database deletion, database backup, and database recovery. 2. User management, mainly for user addition and deletion. Maintenance of user passwords, log management, etc. 3. table Management. create a table B. delete A Table C. table dictionary management D. modifying the table structure E. table Structure replication F. record clearing G. increase or delete record 4. the SQL code generator of MySQL database includes selecting records from a table, selecting fields, and creating a table. You can also directly execute code by adding SQL statements such as deletion and table Association. NotesIn this solution, you need to monitor the overall running status of the MySQL server, the running status of important processes, and the records of the system and user logs. For example, when both Delphi and MySQL operate on tables, tables are often locked and need to be controlled. To implement this solution, developers must perform a systematic analysis and design on system development, and handle other situations in special ways. The consideration of these situations not only relieves unnecessary troubles during development, but also effectively ensures the normal operation of the information security system and achieves good operation results.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.