If you discovered that proxying your webserver with varnish breaks PhpMyAdmin I’ve got the solution:

Problem is that the backend webserver, apache2 or nginx doesn’t even know it’s running behind another software.

Varnish does a completely normal request to webserver. Most times this isn’t any problem at all.

PhpMyAdmin tries to be “smart” and figure out its absolute URL and I run the apache2 or nginx backend on port 80.

The solution is to force an URL.

Add the following line to “config.inc.php“, changing the obvious:

$cfg['PmaAbsoluteUri'] = 'http://yourdomain.com/phpmyadmin/';

Enjoy!

PhpMyAdmin by default allows you to import only 2 MB file. In many cases this is just way too little.

In order to increase the values you need to alter your php.ini settings. For example put these in your php.ini to import 50 MB files:

post_max_size = 50M
upload_max_filesize = 50M

You can also create a .htaccess file with the above contents in the phpMyAdmin directory:

php_value post_max_size 50M
php_value upload_max_filesize 50M

Backs up all databases, saves the last 4 copies.

!/bin/bash

# modify the following :
export DB_BACKUP=”/home/user/mysql_backup/”
export DB_USER=”root”
export DB_PASSWD=”********”

echo “MySQL_Backup”
echo “———————-”
echo “* Rotating 4 backups…”
rm -rf $DB_BACKUP/04
mv $DB_BACKUP/03 $DB_BACKUP/04
mv $DB_BACKUP/02 $DB_BACKUP/03
mv $DB_BACKUP/01 $DB_BACKUP/02
mkdir $DB_BACKUP/01

echo “* Creating new backup…”
mysqldump –user=$DB_USER –password=$DB_PASSWD –all-databases | bzip2 > $DB_BACKUP/01/mysql-`date +%Y-%m-%d`.bz2
echo “———————-”
echo “Done”
exit 0

This guide will cover installing and updating Apache 2, MySQL 5 and PHP 5 on Debian Linux.

Step 1. To start with, its important to make sure apt-get is the latest version.

apt-get update && apt-get upgrade

* This line will update your aptitude to the latest version information and then upgrade the applications on your computer.

Step 2. Next, lets install Apache2.

apt-get install apache2

* This will install and provide basic configuration for apache2.
*  The default web directory will is /var/www and the Apache 2 configuration can be found in /etc/apache2/.

Continue Reading…

Do you want to recover the MySQL root password. its by no means, easy. But its quite simple if you follow the procedure. You will have to follow this step-by-step processes.

  1. Step 1: Stop the MySQL server process.
  2. Step 2: Start the MySQL (mysqld) server/daemon process with the –skip-grant-tables option so that it will not prompt for a password.
  3. Step 3: Connect to the MySQL server as the root user.
  4. Step 4: Set a new root password.
  5. Step 5: Exit and restart the MySQL server.

Here are the commands you need to type for each step (log in as the root user):

Step 1 : Stop the MySQL service:

Continue Reading...

Page 5 of 512345