Archive for the ‘Mysql’ Category

linux server status monitoring simple script

Create the following scripts in a file and call the file in crontab at desired intervals
echo “……………………. SERVER MONITORING REPORT ……………………..” > /scripts/report.txt
echo “APACHE SERVER:-” >> /scripts/report.txt
/sbin/service httpd status >> /scripts/report.txt
echo “MYSQL SERVER:-” >> /scripts/report.txt
/sbin/service mysqld status >> /scripts/report.txt
echo “SSH/SFTP:-” >> /scripts/report.txt
/sbin/service sshd status >> /scripts/report.txt
echo “SENDMAIL:-” >> /scripts/report.txt
/etc/init.d/sendmail status [...]

How to insert a CSV file in to mysql database through mysql console

When you want to insert larger CSV file in to a mysql database using  PhpMyadmin or any other GUI tools it may take long time or even it  may be stopped. You can easily Import the CSV file in to mysql database using mysql command.  Log on to the server and  open mysql command and [...]

Mysql takes 100 % CPU

I have seen that when executing a mysql query the cpu usage becomes 100 % and it takes a long time to execute the query.  I have executed the same query thorugh phpmyadmin and that time also it took a long time to execute also mysql consumes 100 % cpu .  I have done some [...]

Mysql database replication

Install mysql server on both server and client machine
Settings in Server
Editi My.conf
log-bin = mysql-bin
server-id = 1
binlog-do-db=DBNAME1
binlog-do-db=DBNAME2
# Backing up Master Database
mysqldump -u root -p –routines –add-drop-table –master-data –databases DBNAME1 DBNAME2 > master.sql
musql -uroot -p
CREATE USER ‘repluser’@’%’ IDENTIFIED BY ‘password’;
GRANT PROCESS , SUPER , REPLICATION SLAVE , REPLICATION CLIENT ON * . * TO ‘repluser’@’%’ IDENTIFIED BY [...]


Fatal error: Call to undefined function wp_list_addonn() in /home/hellosys/public_html/wp-content/themes/Grante/sidebar.php on line 106