Thursday, September 22, 2011

user adding for ssh

useradd -d /var/www/xyz.com.tr/musteri  -s /bin/bash -g sshd musteri

Installing PHP5 on fedora


--ref:  http://www.howtoforge.com/installing-apache2-with-php5-and-mysql-support-on-fedora-12-lamp-p2
---
We can install PHP5 and the Apache PHP5 module as follows:

yum install php

We must restart Apache afterwards:

/etc/init.d/httpd restart

--Testing PHP5 / Getting Details About Your PHP5 Installation

The document root of the default web site is /var/www/html. We will now create a small PHP file (info.php) in that directory and call it in a browser. The file will display lots of useful details about our PHP installation, such as the installed PHP version.

vi /var/www/html/info.php

<?php
phpinfo();
?>


Now we call that file in a browser (e.g. http://192.168.0.100/info.php):

Installing Apache2 on linux


--ref:  http://www.howtoforge.com/installing-apache2-with-php5-and-mysql-support-on-fedora-12-lamp-p2
---
 yum install httpd
--Now, start the Apache/httpd
 chkconfig httpd on
 /etc/init.d/httpd start

Enable root login in GUI on Fedora 12



Login as Normal User.
#Open the terminal and use vim or gedit to open the /etc/pam.d/gdm
$:  su
Password: enter password
#:  nano /etc/pam.d/gdm

Comment the following line  'auth required pam_succeed_if.so user !=root quiet'

# auth required pam_succeed_if.so user != root quiet

Do the same for "/etc/pam.d/gdm-password"

Save the file and logout from GUI. Now you can login as root

install PhpMyAdmin on Linux (CentOS/fedora)


--Login as a root user or

# su
--Move to your web directory

# cd /var/www/html
--Download the desired PhpMyAdmin package


--Choose either of the command depending on the version you server support. phpMyAdmin-2.11.3 is compatible with PHP 4+ and MySQL 3+ and phpMyAdmin-3.2.4 compatible with PHP 5 and MySQL 5.

# wget -c http://sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/3.4.5/phpMyAdmin-3.4.5-english.tar.gz/download
--Unzip and extract the files
# tar xvfz phpMyAdmin-3.4.5-english.tar.gz
--Rename the extrcted folder to phpmyadmin
# mv phpMyAdmin-3.4.5-english phpmyadm
--Move to the new folder
# cd phpmyadmin

--copy the smaple config and make a new conig file
# cp config.sample.inc.php config.inc.php
--Edit the config.inc.php file

# nano config.inc.php

--Go to the flilowing line and change to ‘http’

………
$cfg['Servers'][$i]['auth_type'] = ‘http’; # default is cookies

……..
To save the edited file press “Ctrl+o” and press “Enter” key

To exit file press “Ctrl+x”
Restart the webserver
# /sbin/service httpd restart

CentOS/Fedora core Linux PHP installation


--
http://www.webtatic.com/packages/php53/

If you would like to install PHP use yum command
# yum install php
or
#yum --enablerepo=webtatic install php

--To get MySQL support in PHP, we can install the php-mysql package. It's a good idea to install some other PHP5 modules as well as you might need them for your applications. You can search for available PHP5 modules like this:'

yum search php
--Pick the ones you need and install them like this:
yum install php-mysql php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-eaccelerator php-magickwand php-magpierss php-mapserver php-mbstring php-mcrypt php-mssql php-shout php-snmp php-soap php-tidy

--Now restart Apache2:

---If you would like to upgrade PHP use yum command
# rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm

Installing MySQL 5 on linux fedora/centos



---
---To install MySQL, we do this:

#yum install mysql mysql-server

--Then we create the system startup links for MySQL (so that MySQL starts automatically whenever the system boots) and start the MySQL server:

#chkconfig --levels 235 mysqld on
#/etc/init.d/mysqld start

--Run  to set a password for the user root (otherwise anybody can access your MySQL database!).

#mysqladmin -u root password yourrootsqlpassword
#mysqladmin -h server1.example.com -u root password yourrootsqlpassword

--restart apache
on centos

#/sbin/service httpd restart

On fedora
#/etc/init.d/httpd restart

Apache (httpd) start or stop or restart on centos



to restart
#/sbin/service httpd restart

to start:

#/sbin/service httpd start

to stop:

#/sbin/service httpd stop

cronjob service Verify on RHEL / CentOS / Fedora Linux,



--You can simply use any one of the following command to see if crond is running or not, enter:
# pgrep crond
OR
# service crond status
Sample output:

--crond (pid 4370) is running...If it is not running type the following two command to start crond:
# chkconfig crond on
# service crond start
--Verify cron is running by viewing log file, enter:
# tail -f /var/log/cron
--A note about Debian / Ubuntu Linux Cron service
--Under Debian and Ububtu Linux cron logs its action logged to the syslog facility i.e. use /var/log/messages file:
# tail -f /var/log/messages
--Find out if cron daemon is running or not, enter:
# pgrep cron

Thursday, July 14, 2011

How to change a file's/folder owner and group in Linux

#To change the owner of a file or directory, the command chown is used.
chown username <file or directory>

  For recurssivly
  chown -R username <file or directory>

#To change the group of a file or directory, the command 'chgrp' is used.
chgrp groupname <file or directory>

  For recurssivly
  chgrp -R groupname <file or directory>

Tuesday, May 17, 2011

Monday, April 25, 2011

How To enable Debuging on SQL server


On the computer that is running the instance of the Database Engine, use the Windows Firewall Control Panel application to specify the following information:
·         Add TCP port 135 to the exceptions list.
·         Add the program sqlservr.exe to the exceptions list. By default, sqlservr.exe is installed in C:\Program Files\Microsoft SQL Server\MSSQL10.InstanceName\MSSQL\Binn, where InstanceName is MSSQLSERVER for the default instance, and the instance name for any named instance.
·         If the domain policy requires network communications to be done through IPsec, you must also add UDP port 4500 and UDP port 500 to the exception list.
Optionally, you can manually configure the program and port exceptions by using Windows Firewall to specify the following information:
·         Add TCP port 135 to the exceptions list.
·         Add program ssms.exe (SQL Server Management Studio) to the exceptions list. By default, ssms.exe is installed in C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE.
To add a Windows login account as sysadmin

A user who already has sysadmin privileges must execute the following:
         sp_addsrvrolemember 'Domain\Name', 'sysadmin'

where Domain\Name represents the Windows login account.

Note:       By default, Windows administrators on a computer that is running SQL Server are SQL Server sysadmins on that computer.

Monday, April 18, 2011

MSSQL backup restore method on MSSQL management studio

Following is the one of the Backup restore method on MSSQL server
Open Microsoft SQL Server Management Studio and login with admin privileges.
Expand database server name -- > databases -- > Right click select New Database as shown below.










Then it will redirect to the new DB creating window as shown below window, new DB name at database name and click ok (here can see where data files will store under path column).

 

The new DB will add to the list of databases as shown below.

















To restore the backup file Right click on test (new ) database à Tasks à Restore à Database, as shown below









Then it will redirect to restore database-test window as shown below.

       1.Database name
 2. Select From device (need to be chose from where you are going table the backup file)
 3.  By click on browser button select database backup file.
 4.  Then it will add to select the database backup sets to restore section and check the box as show below.
 5.  The click on options.















Then below window will appear
6.       Check the BOX Overwrite the existing database

7.       Select the test database “mdf” file path, By Right clicking on DBàppropertiesàfileàright side plan UNDER database files section under path column “mdf” file can find(or while creating new DB under path column “mdf” file path can be find as above screen in this post)

8.        Select the test database “ldf” file path, By Right clicking on DBàppropertiesàfileàright side plan UNDER database files section under path column ”ldf” file can find(or while creating new DB under path column “ldf” file path can be find as above screen in this post)
        9.   Select recovery state as Leave database ready to use by rolling back uncommitted transaction.




















10.       Then click on Ok, then restoring process will start, once restoring complete the completed successfully window will appear click on OK.

Friday, April 1, 2011

how to use Selenium RC.

Wizzard,
For example for java:

1.Download Selenium RC from openqa site.
2.Start any java IDE.
3.Create new project.
4.Add to your project classpath selenium-java-client-driver.jar
5.Record your test to from Selenium IDE and translate it to java code (Selenium IDE has automation translation feature).
6.Look for example tests in \selenium-remote-control-0.9.0 java\source\test\java\com\thoughtworks\selenium
and create your test using examples.
7.Run selenium server from console (You need initialized java environment variable to do this) like: java -jar selenium-server -proxyInjectionMode.
8.Run your test in IDE.
9.Enjoy..

How to install selenium IDE on firefox

You need to:
1. Install Mozilla Firefox first.
2. Go to openqa.org and click on the Selenium IDE link.
3. Click on the latest installable version available and just wait for it to install.
4. You can access Selenium IDE in Mozilla from Tools-> Selenium IDE.

Tuesday, March 29, 2011

Export or import data between MSExcell and MSSQL DB


to upload excell sheet data to db need to give following permission on webserver.

give MS excell permmissions under Administrator tools-->component services --> Mycomputer --> DCOM Config -->Microsoft excell application --> (Right click go to properties --> under security tab select customize permissins and click on Edit button and add ASP.NET user, ISER, IIS_WAN user with full permissions)


and in web.config page add as follows
<system.web>
<identity impersonate="true" userName="administrator" password="Transexpress1"/>
</system.web>

Wednesday, March 23, 2011

VirtualHost Examples: Using the ServerPath directive

This document attempts to answer the commonly-asked questions about setting up virtual hosts.

These scenarios are those involving multiple web sites running on a single server, via name-based or IP-based virtual hosts.

We have a server with two name-based vhosts. In order to match the correct virtual host a client must send the correct Host: header. Old HTTP/1.0 clients do not send such a header and Apache has no clue what vhost the client tried to reach (and serves the request from the primary vhost). To provide as much backward compatibility as possible we create a primary vhost which returns a single page containing links with an URL prefix to the name-based virtual hosts.
##############################################
Server configuration

NameVirtualHost 172.20.30.40

<VirtualHost 172.20.30.40>
# primary vhost
DocumentRoot /www/subdomain
RewriteEngine On
RewriteRule ^/.* /www/subdomain/index.html
# ...
</VirtualHost>

<VirtualHost 172.20.30.40>
DocumentRoot /www/subdomain/sub1
ServerName http://www.sub1.domain.tld/
ServerPath /sub1/
RewriteEngine On
RewriteRule ^(/sub1/.*) /www/subdomain$1
# ...
</VirtualHost>

<VirtualHost 172.20.30.40>
DocumentRoot /www/subdomain/sub2
ServerName http://www.sub2.domain.tld/
ServerPath /sub2/
RewriteEngine On
RewriteRule ^(/sub2/.*) /www/subdomain$1
# ...
</VirtualHost>
##############################################
Due to the ServerPath directive a request to the URL http://www.sub1.domain.tld/sub1/ is always served from the sub1-vhost.
A request to the URL http://www.sub1.domain.tld/ is only served from the sub1-vhost if the client sent a correct Host: header. If no Host: header is sent the client gets the information page from the primary host.
Please note that there is one oddity: A request to http://www.sub2.domain.tld/sub1/ is also served from the sub1-vhost if the client sent no Host: header.
The RewriteRule directives are used to make sure that a client which sent a correct Host: header can use both URL variants, i.e., with or without URL prefix.

VirtualHost Examples: Migrating a name-based vhost to an IP-based vhost

This document attempts to answer the commonly-asked questions about setting up virtual hosts.

These scenarios are those involving multiple web sites running on a single server, via name-based or IP-based virtual hosts.

The name-based vhost with the hostname http://www.example2.org/ (from our name-based example, setup 2) should get its own IP address. To avoid problems with name servers or proxies who cached the old IP address for the name-based vhost we want to provide both variants during a migration phase.
The solution is easy, because we can simply add the new IP address (172.20.30.50) to the VirtualHost directive.
##############################################
Server configuration

Listen 80
ServerName http://www.example1.com/
DocumentRoot /www/example1

NameVirtualHost 172.20.30.40

<VirtualHost 172.20.30.40 172.20.30.50>
DocumentRoot /www/example2
ServerName http://www.example2.org/
# ...
</VirtualHost>

<VirtualHost 172.20.30.40>
DocumentRoot /www/example3
ServerName http://www.example3.net/
ServerAlias *.example3.net
# ...
</VirtualHost>
##############################################
The vhost can now be accessed through the new address (as an IP-based vhost) and through the old address (as a name-based vhost).

VirtualHost Examples: Using _default_ vhosts

This document attempts to answer the commonly-asked questions about setting up virtual hosts.

These scenarios are those involving multiple web sites running on a single server, via name-based or IP-based virtual hosts.

_default_ vhosts for all ports

Catching every request to any unspecified IP address and port, i.e., an address/port combination that is not used for any other virtual host.
##############################################
Server configuration
<VirtualHost _default_:*>
DocumentRoot /www/default
</VirtualHost>
##############################################

Using such a default vhost with a wildcard port effectively prevents any request going to the main server.

A default vhost never serves a request that was sent to an address/port that is used for name-based vhosts. If the request contained an unknown or no Host: header it is always served from the primary name-based vhost (the vhost for that address/port appearing first in the configuration file).

You can use AliasMatch or RewriteRule to rewrite any request to a single information page (or script).
_default_ vhosts for different ports

Same as setup 1, but the server listens on several ports and we want to use a second _default_ vhost for port 80.

##############################################
Server configuration

<VirtualHost _default_:80>
DocumentRoot /www/default80
# ...
</VirtualHost>
<VirtualHost _default_:*>
DocumentRoot /www/default
# ...
</VirtualHost>
#############################################
The default vhost for port 80 (which must appear before any default vhost with a wildcard port) catches all requests that were sent to an unspecified IP address. The main server is never used to serve a request.
_default_ vhosts for one port

We want to have a default vhost for port 80, but no other default vhosts.
###############################
Server configuration
<VirtualHost _default_:80>
DocumentRoot /www/default
...
</VirtualHost>
################################
A request to an unspecified address on port 80 is served from the default vhost any other request to an unspecified address and port is served from the main server.

VirtualHost Examples: Using Virtual_host and mod_proxy together

This document attempts to answer the commonly-asked questions about setting up virtual hosts.

These scenarios are those involving multiple web sites running on a single server, via name-based or IP-based virtual hosts.

The following example allows a front-end machine to proxy a virtual host through to a server running on another machine. In the example, a virtual host of the same name is configured on a machine at 192.168.111.2. The ProxyPreserveHost On directive is used so that the desired hostname is passed through, in case we are proxying multiple hostnames to a single machine
##############################################
<VirtualHost *:*>
ProxyPreserveHost On
ProxyPass / http://192.168.111.2/
ProxyPassReverse / http://192.168.111.2/
ServerName hostname.example.com
</VirtualHost>
##############################################

VirtualHost Examples: Mixed name-based and IP-based vhosts

This document attempts to answer the commonly-asked questions about setting up virtual hosts.

These scenarios are those involving multiple web sites running on a single server, via name-based or IP-based virtual hosts.

On some of my addresses, I want to do name-based virtual hosts, and on others, IP-based hosts.

##############################################
Server configuration
Listen 80
NameVirtualHost 172.20.30.40

<VirtualHost 172.20.30.40>
DocumentRoot /www/example1
ServerName http://www.example1.com/
</VirtualHost>

<VirtualHost 172.20.30.40>
DocumentRoot /www/example2
ServerName http://www.example2.org/
</VirtualHost>

<VirtualHost 172.20.30.40>
DocumentRoot /www/example3
ServerName http://www.example3.net/
</VirtualHost>

# IP-based
<VirtualHost 172.20.30.50>
DocumentRoot /www/example4
ServerName http://www.example4.edu/
</VirtualHost>

<VirtualHost 172.20.30.60>
DocumentRoot /www/example5
ServerName http://www.example5.gov/
</VirtualHost>
##############################################

VirtualHost Examples: Mixed port-based and ip-based virtual hosts

This document attempts to answer the commonly-asked questions about setting up virtual hosts.

These scenarios are those involving multiple web sites running on a single server, via name-based or IP-based virtual hosts.

The server machine has two IP addresses (172.20.30.40 and 172.20.30.50) which resolve to the names http://www.example1.com/ and http://www.example2.org/ respectively. In each case, we want to run hosts on ports 80 and 8080.
##############################################
Server configuration

Listen 172.20.30.40:80
Listen 172.20.30.40:8080
Listen 172.20.30.50:80
Listen 172.20.30.50:8080

<VirtualHost 172.20.30.40:80>
DocumentRoot /www/example1-80
ServerName http://www.example1.com/
</VirtualHost>

<VirtualHost 172.20.30.40:8080>
DocumentRoot /www/example1-8080
ServerName http://www.example1.com/
</VirtualHost>

<VirtualHost 172.20.30.50:80>
DocumentRoot /www/example2-80
ServerName http://www.example1.org/
</VirtualHost>

<VirtualHost 172.20.30.50:8080>
DocumentRoot /www/example2-8080
ServerName http://www.example2.org/
</VirtualHost>
##############################################

VirtualHost Examples: IP-based virtual hosting

This document attempts to answer the commonly-asked questions about setting up virtual hosts.

These scenarios are those involving multiple web sites running on a single server, via name-based or IP-based virtual hosts.

The server has two IP addresses (172.20.30.40 and 172.20.30.50) which resolve to the names http://www.example1.com/ and http://www.example2.org/ respectively.
##############################################
Server configuration

Listen 80

<VirtualHost 172.20.30.40>
DocumentRoot /www/example1
ServerName http://www.example1.com/
</VirtualHost>

<VirtualHost 172.20.30.50>
DocumentRoot /www/example2
ServerName http://www.example2.org/
</VirtualHost>
###############################################

Requests for any address not specified in one of the <VirtualHost> directives (such as localhost, for example) will go to the main server, if there is one.

VirtualHost Examples: Running different sites on different ports.

This document attempts to answer the commonly-asked questions about setting up virtual hosts.

These scenarios are those involving multiple web sites running on a single server, via name-based or IP-based virtual hosts.

You have multiple domains going to the same IP and also want to serve multiple ports. By defining the ports in the "NameVirtualHost" tag, you can allow this to work. If you try using <VirtualHost name:port> without the NameVirtualHost name:port or you try to use the Listen directive, your configuration will not work.
##############################################
Server configuration

Listen 80
Listen 8080

NameVirtualHost 172.20.30.40:80
NameVirtualHost 172.20.30.40:8080

<VirtualHost 172.20.30.40:80>
ServerName http://www.example1.com/
DocumentRoot /www/domain-80
</VirtualHost>

<VirtualHost 172.20.30.40:8080>
ServerName http://www.example1.com/
DocumentRoot /www/domain-8080
</VirtualHost>

<VirtualHost 172.20.30.40:80>
ServerName http://www.example2.org/
DocumentRoot /www/otherdomain-80
</VirtualHost>

<VirtualHost 172.20.30.40:8080>
ServerName http://www.example2.org/
DocumentRoot /www/otherdomain-8080
</VirtualHost>

##############################################

VirtualHost Examples: Serving the same content on different IP addresses (such as an internal and external address)

This document attempts to answer the commonly-asked questions about setting up virtual hosts.

These scenarios are those involving multiple web sites running on a single server, via name-based or IP-based virtual hosts.

The server machine has two IP addresses (192.168.1.1 and 172.20.30.40). The machine is sitting between an internal (intranet) network and an external (internet) network. Outside of the network, the name server.example.com resolves to the external address (172.20.30.40), but inside the network, that same name resolves to the internal address (192.168.1.1).

The server can be made to respond to internal and external requests with the same content, with just one VirtualHost section.

##############################################
Server configuration

NameVirtualHost 192.168.1.1
NameVirtualHost 172.20.30.40

<VirtualHost 192.168.1.1 172.20.30.40>
DocumentRoot /www/server1
ServerName server.example.com
ServerAlias server
</VirtualHost>

##############################################

Now requests from both networks will be served from the same VirtualHost.

Note: 
On the internal network, one can just use the name server rather than the fully qualified host name server.example.com.
Note also that, in the above example, you can replace the list of IP addresses with *, which will cause the server to respond the same on all addresses.

VirtualHost Examples: Name-based hosts on more than one IP address

This document attempts to answer the commonly-asked questions about setting up virtual hosts.
These scenarios are those involving multiple web sites running on a single server, via name-based or IP-based virtual hosts.

Note: Any of the techniques discussed here can be extended to any number of IP addresses.
The server has two IP addresses. On one (172.20.30.40), we will serve the "main" server, server.domain.com and on the other (172.20.30.50), we will serve two or more virtual hosts.############################################################################
Server configuration
Listen 80

# This is the "main" server running on 172.20.30.40
ServerName server.domain.com
DocumentRoot /www/mainserver

# This is the other address
NameVirtualHost 172.20.30.50

<VirtualHost 172.20.30.50>
DocumentRoot /www/example1
ServerName http://www.example1.com/
# Other directives here ...
</VirtualHost>

<VirtualHost 172.20.30.50>
DocumentRoot /www/example2
ServerName http://www.example2.org/
# Other directives here ...
</VirtualHost>
###############################################################################
Any request to an address other than 172.20.30.50 will be served from the main server. A request to 172.20.30.50 with an unknown hostname, or no Host: header, will be served from http://www.example1.com/

VirtualHost Examples1: Running several name-based web sites on a single IP address

This document attempts to answer the commonly-asked questions about setting up virtual hosts.

These scenarios are those involving multiple web sites running on a single server, via name-based or IP-based virtual hosts.

Your server has a single IP address, and multiple aliases (CNAMES) point to this machine in DNS. You want to run a web server for http://www.example1.com/ and http://www.example2.org/ on this machine.

#########################################################
Server configuration
# Ensure that Apache listens on port 80
Listen 80
# Listen for virtual host requests on all IP addresses
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot /www/example1
ServerName http://www.example1.com/
# Other directives here
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /www/example2
ServerName http://www.example2.org/
# Other directives here
</VirtualHost>
##########################################################
The asterisks match all addresses, so the main server serves no requests. Due to the fact that http://www.example1.com/ is first in the configuration file, it has the highest priority and can be seen as the default or primary server. That means that if a request is received that does not match one of the specified ServerName directives, it will be served by this first VirtualHost.

Note: You can, if you wish, replace * with the actual IP address of the system. In that case, the argument to VirtualHost must match the argument to NameVirtualHost:
###############################
NameVirtualHost 172.20.30.40
<VirtualHost 172.20.30.40>
# etc ...
###############################
However, it is additionally useful to use * on systems where the IP address is not predictable - for example if you have a dynamic IP address with your ISP, and you are using some variety of dynamic DNS solution. Since * matches any IP address, this configuration would work without changes whenever your IP address changes.

The above configuration is what you will want to use in almost all name-based virtual hosting situations. The only thing that this configuration will not work for, in fact, is when you are serving different content based on differing IP addresses or ports

Tuesday, January 25, 2011

To "On" register globals on windows hosting at godaddy.com

To "On" register globals on windows hosting at godaddy.com

uploaded php.ini file with disred tags
register_globals = On
extension=php_mysql.dll

and

Log in to your Account Manager.
From the Products section, click Web Hosting.
Next to the hosting account you want to use, click Launch.
In the Content section of the Hosting Control Center, click the IIS Management icon.
Click Recycle App Pool and follow any prompts.
Reload the phpinfo.php page to see if the desired changes have taken effect

Wednesday, January 19, 2011

Quary for BACKUP and RESTORE in SQL Server -- Full Backups

# At a minimum you need to verify three things on this screen. First, that the correct database is selected. Second, that the backup type is set to FULL. Finally you need to choose the backup file name. On the Options tab you can specify whether SQL Server should replace or append the backup to the backup file. Keep in mind that the backup file is relative to where SQL Server is installed and not where you're running SSMS

# If you want to issue a backup statement yourself you can use SSMS to script it out for you. Click the Script button at the top of the dialog box and SSMS will generate this SQL statement for you:


BACKUP DATABASE [AdventureWorks] TO 
    DISK = N'\\nas\Backup\L40\SQL2005\AdventureWorks_backup_200702120215.bak'
    WITH NOFORMAT, NOINIT,  NAME = N'AdventureWorks-Full Database Backup',
    SKIP, NOREWIND, NOUNLOAD,  STATS = 10

How to restore large mySQL script file in to mysql server from console using xampp server on linux

## create DB then,
## Login to mysql prompt by using following command

/opt/lampp/bin/mysql -u root  

## then it will redirect to mysql prompt as follows

mysql>

## then login to require db by using use command

mysql>use <dbname>

## for help

mysql>\help

## To restore db kept SQL script file at root folder and run filloing command

mysql>\. <scriptfilename.sql>