PAC manager is a GUI application for easily managing SSH/telnet connections on linux. It has all the features of commercial SecureCRT tool. It supports macro, cluster connections, RDP & VNC and lot more. It provides an tray icon area for quick access of the configured connections.
PAC Manager can be downloaded from here.
Kitty is a fork of putty (0.62 version), with all old features along with an extended features. It is one of the best (my view), open source ssh/telent client for windows.
Apachetop is a tool similar like mtop, mytop, top. It displays real time web server statistics. Apachetop parse log file and generate human readable output. It's a simple command line utility, used to monitor real time traffic.
apachetop -f /var/logs/httpd/access.log
Multiple log file can be provide to monitor.
Manual Link: http://linux.die.net/man/1/apachetop
There are many ways to truncate files on linux based systems. Few of them are discussed below.
Logrotate Utility: Discuss in detail on link http://krishcon.com/blogs/20130212/RotateTruncate-files-Linux-using-logrotate
The log files of any applications (LAMP) like apache, mysql, linux, php needs to be managed, if they are growing frequently on linux servers. Managing log file efficiently, prevents from high disk space utilization.
Logrotate is one of the functionality, available on all the linux based servers to manage log files. This tool rotates, compresses, and mails system logs
Configuration files: /etc/logrotate.conf
The duplicate records in a table can be found using below query.
SELECT *, count(pro) as cnt FROM list GROUP BY pro HAVING cnt > 1;
Illustration: The above query will find the duplicate records from list table. The cnt column will show that the duplicate records is available for how many times.
Database replication is one of the important part of the architecture, as it provides scalability, redudancy and backup solutions. It provides exact copy of database from master to another server (slave). Replication can help protection against hardware failure also.
Replication lag happens very frequently in the below senarios.
- Replication on a slow network
- Replication between external network
- Replication between two different data centers.
Many times, we see aborted connections in mysql error log file, while restoring backup, taking data dump (backup) or executing analytics (report) query on mysql server. This happens due to extremely poor network communication between the device. The mysql configuration variables related to this is below. The default value of these variables is 30 and 60.
Many times we need to change the timezone, as per our requirement. Most of OS images (centos, debian, ubuntu) doesn't comes with the proper timezone. I'm discussing one of the way to change the time on centos operating system below.
[root@localhost ~]# system-config-date
The above command will open up a GUI interface to change the date and timezone.
NTP stands for Network Time Protocol. This protocol is used to synchronize your Linux system's clock with an accurate time source. The below article shows the detailed steps to configure ntp in linux.
Login as a root user and install ntp using below command. (Here it's already installed)
Backup is one of the most important, part of the database administration. There are several ways to backup MySQL data. I'm discussing a very simple script, easy script to take backup of multiple databases. This script can be customized as, per the requirement.
One of most easiest and preferred way of MySQL installation is binary installation. While performing mysql binary install using the below command, run into following errors.
[root@localhost mysql]# scripts/mysql_install_db --user=mysql Installing MySQL system tables... ./bin/mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory Installation of system tables failed! Examine the logs in ./data for more information.
The guide show you on how to change the hostname on linux Centos. Login to the system using root or sudo. Reboot is required for both options (B) and (C) for the changes to take effect and permanent.
The below command will change the hostname of the server. Hostname command is used to change as well as read the hostname of the server. This change is not permanent and will vanish after reboot.
[root@localhost ~]# hostname db1.mylinux.com [root@localhost ~]# hostname db1.mylinux.com
Most of the time, we use string datatype column like char or varchar to store ip address values. There is a way to store ip address value in numeric datatype column like unsigned interger. There is miscellaneous functions INET_ATON(), INET_NTOA() using which it's possible
INET_ATON() Return the numeric value of an IP address
INET_NTOA() Return the IP address from a numeric value
Although, there are many ways to setup a reporting server depending on the requirements. Sharing one of those. Reporting Server provides reports i.e. daily, weekly, monthlty and quarterly reports to the clients. Data flow from many different servers (services) to one system called as Report Server. Client might be using more than one services. Therefore, it is necessary to collect the whole data at one place, analyze and generate reports for clients and billing purpose. This makes the data huge in TBs.
MySQL root user is meant for database administrators for administration task. Many times, I found it's being used as replication user and normal user for making connections to mysql database.
One of my clients did the same thing and later it was fixed.
MySQL and it's fork (Percona Server, MariaDB) contains default schema (database) test. Many times, i found it missing from clients mysql-server. It has it's own importance.
1. On master slave replication setup with below configuration parameters.
This makes the test schema useful for benchmarking purpose (sysbench, mybench, supersmack) without replicating the benchmark data on slave or new schema can be created if slave benchmark required.
Some times it's very difficult to find out exact issue. Specially When it's related with hardware. Similar scenario, i faced with a client. I have been provided with a new box to setup mysql server. After setup mysql along with other application, mysql frequently goes down without any comment in mysql error log file. Spending few days verifying os, logs, mysql and later i found the culprit using memtester tool. Thanks to memtester tool.
Working with clients, sometime I have to deal wih more than 300 tables within a schema. In order to identify tables, views, table size, alphabetical ordering of tables, engines etc. Information Schema is the best place to look for detailed information.
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 2
Server version: 5.2.2-MariaDB-gamma Source distribution