The MySQL client library can perform an automatic reconnect to the server if it finds that the connection is down when you attempt to send a statement to the server to be executed. In this case, the library tries once to reconnect to the server and send the statement again. Automatic reconnection can be convenient [...]
ANALYZE TABLE analyzes and stores the key distribution for a table. The MySQL query optimizer is the magic inside MySQL that decides which keys, if any, to use to in the query. ANALYZE helps query optimizer to make accurate decisions by detailed analysis of the data, unlike query optimizer which makes quick analysis. The command [...]
Here is a simple command to auto repair, check and optimize all the tables in all databases running on a MySQL server: mysqlcheck -u root -p –auto-repair –check –optimize –all-databases mysqlcheck is available in MySQL 3.23.38 and later. mysqlcheck uses the SQL statements CHECK TABLE, REPAIR TABLE, ANALYZE TABLE, and OPTIMIZE TABLE in a convenient [...]
Earlier versions of the sg device driver either have no version number (e.g. the original driver) or a version number starting with “2″. The drivers that support this new interface have a major version number of “3″. The sg version numbers are of the form “x.y.z” and the single number given by the SG_GET_VERSION_NUM ioctl() [...]
The sg driver permits user applications to send SCSI commands to devices that understand them. SCSI commands are 6, 10, 12 or 16 bytes long . The SCSI disk driver (sd), once device initialization is complete, only sends SCSI READ and WRITE commands. There a several other interesting things one might want to do, for [...]
The describe command gives you a list of all the data fields used in your database table. In the example, you can see that the table named test in the salesdata database keeps track of four fields: name, description, num, and date_modified.
The show tables command gives you a list of all the tables in your MySQL database, but you have to use the use command first to tell MySQL to which database it should apply the show tables command.
Another common feature of prepackaged applications written in MySQL is that they may require you to not only create the database, but also to create the tables of data inside them as part of the setup procedure. Fortunately, many of these applications come with scripts you can use to create the data tables automatically. Usually [...]
On many occasions you will not only have to create a database, but also have to create a MySQL username and password with privileges to access the database. It is not a good idea to use the root account to do this because of its universal privileges. MySQL stores all its username and password data [...]
You can limit users’ ability to browse the Internet with access control lists (ACLs). Each ACL line defines a particular type of activity, such as an access time or source network, they are then linked to an http_access statement that tells Squid whether or not to deny or allow traffic that matches the ACL. Squid [...]
Users configure their web browsers to use the Squid proxy server instead of going to the web directly. The Squid server then checks its web cache for the web information requested by the user. It will return any matching information that finds in its cache, and if not, it will go to the web to [...]
If you are trying to setup a transparent proxy on a Linux machine that has been configured as a bridge, you will need to add one additional iptables command to what we had in section 5. Specifically, you need to explicitly allow connections to the machine on port 3128 (or any other port squid is [...]
Setting up virtual hosts is fairly straightforward. I will go through the basics of setting up a secure virtual host. In these examples, I use theÂ .crtÂ andÂ .keyÂ file extensions. That is my personal way of avoiding confusion with the various files. With Apache, you can use any extension you choose – or no extension at all. All [...]
The SSL protocol includes two sub-protocols: the SSL record protocol and the SSL handshake protocol. The SSL record protocol defines the format used to transmit data. The SSL handshake protocol involves using the SSL record protocol to exchange a series of messages between an SSL-enabled server and an SSL-enabled client when they first establish an [...]
Unfortunately, there is no such things as a standard Linux installation. The wide variety of servers available, coupled with each particular distribution’s installation options, make providing a ready made list impossible. The best that can be done is show you how to list all running services, and point you in the right general direction. Now [...]