Saturday, January 29, 2011

MySQL - Tools


Here I have laid out several programs, monitors and software clients. How to enable the protocol requests and how to configure the correct encoding told on other pages.

MySQL-monitoring

Script mybeep similar to the known mytop. It keeps track of requests processed by a demon and gives information about them. The distinctive features of my script as follows:
  • The format in which information is presented much more primitive. So, my script does not require any modules of the terminal.
  • When the number of executed tasks is reduced, the script generates a short beep.
I use this script when you have to actively work with large amounts of data. For example, to consolidate multiple databases of different formats volume in millions of records. In such cases, a request may take a few minutes and have a similar opoveschalku that the request is processed, it is very helpful.
The script is written in Perl. All the settings inside. Uses FreeBSD-device / dev / speaker. Ensure that the program has the right to write everything (right configured in / etc / devfs.conf).
See also how to configure the logging of SQL-queries .

MySQL-info

Two shell-script. One shows all the information on all tables accessible databases. The second is similar, but shows the query results show create table.
The necessary connection parameters can easily be put directly into the TV scripts. Now it is a root without a password.

CGI-terminal

In the section for the CGI-developers , you can download CGI-terminal to work with MySQL.

Adding Users

From considerations of basic protection from himself, for every project I create a new database, and for each database - a single user with rights only to the base.

- Creating a database CREATE DATABASE joomla; - create a user (no rights) GRANT USAGE ON *.* TO 'joomla' @ 'localhost'; - give the new user rights only to a new base GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP ON `joomla` .* TO 'joomla' @ 'localhost'; - set a user password SET PASSWORD FOR joomla @ localhost = PASSWORD ('wiki'); 

If you need a password, it should be put, now it is not.

Setting Encoding

Tips and comments on the encoding in MySQL , I issued a separate page.

MySQL-Documentation

In those days, when the documentation for MySQL can be downloaded only one large HTML-file, I wrote a Perl-script , to split the file. In this case, all cross-references, including the index remain operational.
Now the script is largely lost its relevance, as developers now provide documentation in many formats, including a set of HTML-files. Nevertheless, with the help of my script, you can split the documentation for more convenient for you to pieces.

0 Comments:

Post a Comment