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....
Monday, November 1, 2010
Tuesday, October 12, 2010
Removing mySQL
sudo apt-get remove mysql-server
sudo apt-get autoremove mysql-server
sudo apt-get --purge remove
mysql-server
same for mysql-client.
Thursday, July 1, 2010
Setting-up and accessing Derby DB in Ubuntu
1. Download Derby bin distribution from here.
2. Extract it.
3. Set DERBY_HOME and add it to the path.
vi ~/.bashrc
Add as below;
export DERBY_HOME=/opt/software/db-derby-10.3.1.4-bin
export PATH=$PATH:$DERBY_HOME/bin
Then source bashrc
source ~/.bashrc
4. Run $DERBY_HOME/bin/startNetworkServer.sh
sh startNetworkServer
5. To use ij tool;
set DERBY_OPTS=-Dij.protocol=jdbc:derby://localhost/
Then type ij on the prompt to get the ij tool, where u can type in commands.
2. Extract it.
3. Set DERBY_HOME and add it to the path.
vi ~/.bashrc
Add as below;
export DERBY_HOME=/opt/software/db-derby-10.3.1.4-bin
export PATH=$PATH:$DERBY_HOME/bin
Then source bashrc
source ~/.bashrc
4. Run $DERBY_HOME/bin/startNetworkServer.sh
sh startNetworkServer
5. To use ij tool;
set DERBY_OPTS=-Dij.protocol=jdbc:derby://localhost/
Then type ij on the prompt to get the ij tool, where u can type in commands.
Monday, June 21, 2010
How to Run WSO2 Carbon products as a Unix Daemon
This KB by Azeez explains it very well - http://wso2.org/library/2769
Monday, June 14, 2010
Notes on Cloud!
Did a little lazy work.. Below is some notes I directly copied from an IBM white paper (soucre is given below).
Source :
Dispelling the vapor around cloud computing Drivers, barriers and considerations for public andnprivate cloud adoption
IBM Smart Business
Thought Leadership White Paper
January 2010
Source :
Dispelling the vapor around cloud computing Drivers, barriers and considerations for public andnprivate cloud adoption
IBM Smart Business
Thought Leadership White Paper
January 2010
What is cloud computing?
Cloud delivery models:
Features:
Cloud based service management capabilities that are essential:
Main elements in cloud architecture:
Sunday, June 13, 2010
How-to-make-awesome-tag-cloud
Excellent guide with simple steps - http://blog.frivolousmotion.com/2007/05/how-to-make-awesome-tag-cloud.html
Friday, June 11, 2010
VMware player in Ubuntu9.10
VWware player is a graphical interface tool which lets you open vm images.
To intsall this in ubuntu;
1 - You need to download VMPlayer (VMware Player for 32-bit Linux) from vmware website.
2 - apt-get the pre-requisites
To intsall this in ubuntu;
1 - You need to download VMPlayer (VMware Player for 32-bit Linux) from vmware website.
2 - apt-get the pre-requisites
sudo apt-get install build-essential linux-headers-$(uname -r)
3 - Give executable rights to the .bundle file that you downloaded in step 1
chmod +x VMware-Pl*.bundle
4 - Run the installer
gksudo bash ./VMware-Player*.bundle
After its installed, you can access VMware Player from Applications > System Tools > VMware Player
Monday, June 7, 2010
SSH commands
To connect from your local machine:
source: http://www.techotopia.com/index.php/Configuring_Ubuntu_Linux_Remote_Access_using_SSH
ssh -l username ipaddresss
To copy a file to a directory on a remote system:
scp filename username@host:path
filename - the name of the file to be uploaded to the remote system,
username - the name of user account to be used to log into the remote system, host - the real IP address or hostname of the system,
path - the directory into which the file should be copied.
To copy from the remote system to the local system:
scp username@ehost:path/filename
source: http://www.techotopia.com/index.php/Configuring_Ubuntu_Linux_Remote_Access_using_SSH
Thursday, June 3, 2010
WASP
WASP is a powerful web application framework built on PHP 5. WASP strives to allow web developers to make great applications with more fun and less code, but in the familiar playground of PHP.
WASP was written from the ground up in pure Object Oriented PHP5. WASP fully utilizes all of the enhancements made to PHP in version 5.
WASP was written from the ground up in pure Object Oriented PHP5. WASP fully utilizes all of the enhancements made to PHP in version 5.
Thursday, May 20, 2010
NoSQL
Came across the term "NoSQL" from one of the mail threads in WSO2 carbon-dev mailing list.
What is NoSQL, I didn't know it. Even wondered whether its a typo :p... can't obviously be. So googled;
Here's the wikipedia intro (until I read more detailed stuff later);
"NoSQL is a movement promoting a loosely defined class of non-relational data stores that break with a long history of relational databases. These data stores may not require fixed table schemas, usually avoid join operations and typically scale horizontally. Academics and papers typically refer to these databases as structured storage.
Notable production implementations include Google's BigTable and Amazon's Dynamo. However, there are also many publicly available open source variants including HBase and Cassandra."
REFERENCE:
NoSQL. (2010, May 14). In Wikipedia, the free encyclopedia,retrieved 21 May 2010, from http://en.wikipedia.org/wiki/NoSQL
What is NoSQL, I didn't know it. Even wondered whether its a typo :p... can't obviously be. So googled;
Here's the wikipedia intro (until I read more detailed stuff later);
"NoSQL is a movement promoting a loosely defined class of non-relational data stores that break with a long history of relational databases. These data stores may not require fixed table schemas, usually avoid join operations and typically scale horizontally. Academics and papers typically refer to these databases as structured storage.
Notable production implementations include Google's BigTable and Amazon's Dynamo. However, there are also many publicly available open source variants including HBase and Cassandra."
REFERENCE:
NoSQL. (2010, May 14). In Wikipedia, the free encyclopedia,retrieved 21 May 2010, from http://en.wikipedia.org/wiki/NoSQL
Wednesday, May 12, 2010
LGPL
LGPL - Lesser General Public License.
Also counts as the successor of the GNU Library Public License, version 2.
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
Monday, May 10, 2010
Postgres- basics
1. login to postgres -
sudo -u postgres psql postgres
2. Create a database
create database is_db;
3. grant permission
grant all on database is_db to postgres;
in above;
postgres is the user who was created at the time PostrSQL was installed.
4. to navigate to the files system from postgres prompt.
\cd c:cc\vv\vv\v\mmmm
5. run a script
\i postgre.sql
6. quit postgres
\q
sudo -u postgres psql postgres
2. Create a database
create database is_db;
3. grant permission
grant all on database is_db to postgres;
in above;
postgres is the user who was created at the time PostrSQL was installed.
4. to navigate to the files system from postgres prompt.
\cd c:cc\vv\vv\v\mmmm
5. run a script
\i postgre.sql
6. quit postgres
\q
Monday, April 26, 2010
Moved to Ubuntu 9.10
After all my effort of fighting away the virus attacks in my WinXP environment, I decided to move to Ubuntu. I feel the time and resource put on virus scanners, isn't worth it. So I installed Ubuntu 9.10 and setup my test environment there.
This blog is about the test enviro nment setting-up (which can be useful next time I think of a change)
Software that were gathered;
Sun JDK1.6 - jdk-6u2-linux-i586.bin
idea - idea-8.0.tar.gz
ant - apache-ant-1.7.0-bin.zip
maven - maven-2.0.7-bin.tar.gz
tomcat - apache-tomcat-6.0.10.zip
directoryStudio - ApacheDirectoryStudio-linux-x86-1.5.3.v20100330.tar.gz
jboss - jboss-5.0.0.GA.zip Installation and setting-up;
Sun JDK
- navigate to folder u hv the bin distro and run it
sh ./jdk-6u2-linux-i586.bin
OR
sudo apt-get install sun-java6-jdk sun-java6-jre
IDEA
- Unpack the IntelliJ IDEA distribution file
tar -xvz idea-8.0.tar.gz
- Go to IDEA_HOM/bin and type sh idea.sh
ant
Simply unzip the zip distro
maven
untar the tar.gz distribution
tomcat
unzip the distro
directoryStudio
untar the tar.gz distribution
After installing the software, set the home path in bashrc
-type at promt;
sudo vi ~/.bashrc
-Change below;
export JAVA_HOME=/opt/software/java/jdk1.6.0_02export PATH=$PATH:$JAVA_HOME/bin
export JDK_HOME=$JAVA_HOME
export IDEA_HOME=/opt/software/idea/idea-9013
export PATH=$PATH:$IDEA_HOME/bin
export ANT_HOME=/opt/software/ant/apache-ant-1.7.0
export PATH=$PATH:$ANT_HOME/bin
export MAVEN_HOME=/opt/software/maven/maven-2.0.7
export PATH=$PATH:MAVEN_HOME/bin
Subscribe to:
Posts (Atom)
-
1. Download Derby bin distribution from here . 2. Extract it. 3. Set DERBY_HOME and add it to the path. vi ~/.bashrc Add as below; e...
-
Came across the term "NoSQL" from one of the mail threads in WSO2 carbon-dev mailing list. What is NoSQL, I didn't know it. ...