1. Create backup
$ mysqldump -u root -proot regdb > /home/yumani/Documents/regdb_back.sql
2. Restore
Create a database in mysql and the grant user access
mysql > create database regdb;
mysql > grant all on regdb.* to wso2bam@'%' identified by 'wso2bam';
$ mysql -u root -proot regdb < /home/yumani/Documents/regdb_back.sql
A place where I keep a note of simple but useful technical tips and memorable posts....
Showing posts with label mysql. Show all posts
Showing posts with label mysql. Show all posts
Monday, November 1, 2010
Tuesday, October 12, 2010
Removing mySQL
sudo apt-get remove mysql-serversudo apt-get autoremove mysql-server sudo apt-get --purge remove mysql-serversame for mysql-client.Tuesday, May 11, 2010
mySQL - basics
A note copied from someone blogged in web . Was extremely handy when I was picking mysql commands from here and there ...
Install MySql database:
sudo apt-get install mysql-server
Start MySql server:
/etc/init.d/mysql start
Stop MySql server:
/etc/init.d/mysql stop
Restart MySql server:
/etc/init.d/mysql restart
Check the status of MySql server:
/etc/init.d/mysql status
List mysql packages
dpkg -l mysql
uninstall mysql server
apt-get --purge remove mysql-server-5.0
re-install mysql server
apt-get --reinstall install mysql-server-5.0
Invoking mysql command-line tool
Install MySql database:
sudo apt-get install mysql-server
Start MySql server:
/etc/init.d/mysql start
Stop MySql server:
/etc/init.d/mysql stop
Restart MySql server:
/etc/init.d/mysql restart
Check the status of MySql server:
/etc/init.d/mysql status
List mysql packages
dpkg -l mysql
uninstall mysql server
apt-get --purge remove mysql-server-5.0
re-install mysql server
apt-get --reinstall install mysql-server-5.0
Invoking mysql command-line tool
mysql --user=user_name --password=your_password db_name
To allow remote connectionshttp://www.debianhelp.co.uk/remotemysql.htm
Subscribe to:
Posts (Atom)
-
Got to know this is how command line looping is used: while [ 1 ] do ls -al ; sleep 60 done Applying this to stress command...
-
Here are steps: Open the file you need to edit :sp /path/to/the/file/... and open the file that you need to copy from (this will split...