how to restore mysql database backup.
[root@LITESPEED ~]# mysql -u admin -p databasename < databasebackupfile.sql
Enter password:
After the run above command enter the mysql password.
Where
-u = user
admin = user name
-p = password
How to take MySQL database backup...
MySQL database backup:-
This article describes how you can take the backup of MySQL databases. MySQL is default database in Linux Operating System. It’s a great database engine. If your database server goes down, you could lose your important data, so you must always have backup of it. Command mysqldump is easy command for taking mysql database backup, it’s a Linux shell mysql command. You need root access of server to run mysqldump command. There are two ways of MySQL database backup. i.e. manually and automatically.
Manual Method:- Logged in server as root user and run the below command.
[root@localhost~]# mysqldump --opt -u admin -p databasename > databasename.sql
Enter password:
After the run above command enter the mysql admin password.
Where
-u = User
admin = Mysql user name
-p = Password
Automatic Method:- This method is depends on cron job (Scheduler).
You can set the automatic method using cron job. By default crontabs rpm is installed in Linux server.
STEP 1:- Check crond service is running in server or not? If it is not, start it.
[root@localhost ~]# service crond status
crond (pid 1416) is running...
[root@localhost ~]# service crond start
Starting crond: [ OK ]
STEP 2:- Then set the scheduler on desire time. Edit the crontab and put the script in it and save the same.
[root@localhost ~]# crontab -e
55 23 * * * mysqldump --opt --user=admin --password='xyzabc123' databasename | gzip > /root/mysqlbackup/databasename.sql.gz
Upgrade PHP version with Plesk
Upgrade PHP version with Plesk Control Panel:-
In order to upgrade PHP 5 on a Linux server with plesk to the latest version perform the following steps: You need to be logged in server as root user to do this.
STEP 1:- Check the PHP version before upgrading by using below command.
[root@localhost~]# php -v
PHP 5.1.6 (cli) (built: Nov 29 2010 16:47:37)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
with the ionCube PHP Loader v3.1.16, Copyright (c) 2002-2006, by ionCube Ltd.
STEP 2:- Run the below command.
[root@localhost~]# wget -q -O - http://atomicorp.com/installers/atomic.sh | sh
In above script all php packages are available. It contains the stable tree of ART packages.
STEP 3:- Then upgrade or update the php version.
[root@localhost~]# yum update php
OR
[root@localhost~]# yum upgrade php
STEP 4:- Confirm the PHP version is upgraded successfully or not by using below command.
[root@localhost~]# php -v
PHP 5.3.3 (cli) (built: Mar 30 2011 13:51:54)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with the ionCube PHP Loader v4.0.10, Copyright (c) 2002-2011, by ionCube Ltd.
STEP 5:- Restart the Web service or Plesk Control Panel service.
[root@localhost~]# service httpd restart
OR
[root@localhost~]# service psa restart