Thursday, October 25, 2012

Acl in linux



1.To set acl for a folder :

# setfacl -m u:username:rwx foldername

2.To set acl for solder and their sub folder.

.#setfacl -R -m u:username:rwx foldername 

3.To view acl for a folder :
#getfacl foldername

4.To remove acl for a folder :
setfacl -b u:username:rwx foldername

 
 
 

Tuesday, October 23, 2012

How to import store proceedure in mysql

To fix this.

Export store procedure from existing database with below command;

#mysqldump -p --no-create-db --no-create-info --no-data --routines DBNAME > DBNAME_23Oct2012.sql
 
And imoprt .sql file to running db.
 
#mysql -u root -p DBNAME < DBNAME_23Oct2012.sql  
 
 
Restart Mysql DB
 
To check Store procedure in Mysql
 
#Login into mysql DB and type the below command
 
SHOW PROCEDURE STATUS;
SHOW FUNCTION STATUS;
 
Thats it!!!!

Thursday, October 18, 2012

Starting MySQL.Manager of pid-file quit without updating fi[FAILED]

Am getting below eror on of my mysql server while starting mysql service"Starting MySQL.Manager of pid-file quit without updating fi[FAILED] "


 To resolve this issue i tried the below
# ps -ef | grep -i mysql
kill the all running process 

Try to start mysql
#services mysqld start

It worked for me..



Wednesday, October 10, 2012

How to import and Export Mysql db

To export mysqlDB:


1.Type the below command to export mysql db:

# mysqldump -u root -p dbname> dbname11092012.sql

To import mysql DB:

1.Go to file location where you saved  backup db and type following command.

 2.login into mysql and create new database.

> create databases newdb

3.exit from sql and type as following

# mysql -u root -p  newdb < db_04102012-0700.sql

[where newdb is newly created db and db_04102012-0700.sql is going to restore newly created db.]

Friday, October 5, 2012

How to Allow MySQL Client to Connect to Remote MySQL server

If you try to connect to a remote MySQL database from your client system, you will get “ERROR 1130: Host is not allowed to connect to this MySQL server” message as shown below.

# mysql -h 10.10.28.8 -u root -p
Enter password:
ERROR 1130: Host '10.10.28.8' is not allowed to connect to this MySQL server


1.Try to telnet server from client machie

# telnet 192.168.1.8 3306
host 10.10.28.8 is not allowed to connect to this mysql server



 2.To allow a specific client ip-address (10.10.28.8) to access the mysql database running on a server,

# mysql -u root -p
Enter password:

mysql> use mysql

mysql> GRANT ALL ON *.* to root@'10.10.28.8' IDENTIFIED BY '$dfg!23'; 

mysql> FLUSH PRIVILEGES;
 

That's it.....It should work!!!!


  

To resolve!! Starting jboss-as: chown: missing operand after `/var/run/jboss-as' Try `chown --help' for more information.in Jboss 7

While starting Jboss service i am getting following error meesage in jboss7.

 "Starting jboss-as: chown: missing operand after `/var/run/jboss-as'Try `chown --help' for more information."


To over come this ,

#vim /usr/local/jboss-as/standalone/configuration/standalone.xml

 and add the below line into standalone.xml file

# Set defaults.
JBOSS_USER=jboss
export JBOSS_USER









Now we can start the jboss server as usual without any error message.
#/etc/init.d/jboss start

Enjoy!!!!...