Friday, March 23, 2012

Error 1130: #HY000 Host ‘hostname’ is not allowed to connect to this MySQL server

The below are the most common errors, when connecting remotely to MySQL Server from MySQL Client.

Error 1130: #HY000 Host ‘hostname’ is not allowed to connect to this MySQL server

Cause: The host that you are using to connect MySQL Server does not have privilege

Solution: Grant required privileges
GRANT ON *.* TO ‘user’@'hostname' IDENTIFIED BY ‘password’ ;
For ex:- if you are connecting as root then use below syntax
Mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@’test-server’ IDENTIFIED BY ‘test’ ;

Now you should able to see a new user in mysql.user table.
Mysql> select host,user from mysql.user;
+------+---------------------------
| User | Host
+------+---------------------------
| root | test-server
+------+---------------------------

If you want to grant privilege to a host on specific database try below syntax.
mysql> GRANT ALL PRIVILEGES ON test.* TO 'root'@’test-server’ IDENTIFIED BY ‘test’ ;

Error 1130: #HY000 Host ‘IP address’ is not allowed to connect to this MySQL server

Cause: The user host IP address is not allowed to connect to MySQL Server

Solution: Grant the privilege to host IP address
mysql> GRANT ALL PRIVILEGES ON *.* TO ‘user’@’IPADDRESS’ IDENTIFIED BY ‘password’ ;
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@’x.x.x.x’ IDENTIFIED BY ‘test’ ;

ERROR 1045 (28000): Access denied for user 'root'@hostname' (using password: NO)

Cause: The root user is password protected and you need to use password parameter in order to connect

Solution: - Try to connect MySQL Server using below command
# mysql -u root -h test-server –p

ERROR 1045 (28000): Access denied for user 'root'@hostname' (using password: YES)

Cause: The 'root'@hostname' doesn’t have privilege to connect MySQL Server

Solution: - Grant permission using below command.
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@hostname' IDENTIFIED BY ‘password’

Regards,
Satishbabu Gunukula
http://www.oracleracexpert.com

Thursday, March 22, 2012

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'

I was working on MySQL Server setup and modified the default location of MySQL datadir. After I restart the MySQL, I was unable to connect and receiving below error.

#mysql –u root
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'


Cause:
When we restart mysql server, it creates a mysql.sock file under socket variable path. The default location is /var/lib/mysql/mysql.sock.

I have updated the new location in /etc/my.cnf file.

[mysqld]
datadir=/opt/mysql/data
socket=/opt/mysql/mysql.sock


I can see the new file under /opt/mysql/mysql.sock, but I still receive the same error and not able to connect to MySQL.

I have modified the socket path under [mysqld], but the parameter was missing under [client] section. When I was trying to connect using MySQL client, it could not able to find mysql.sock file.

Solution:
Add [client] section in /etc/my.cnf

[client]
socket=/opt/mysql/mysql.sock

I have restarted MySQL in order to take effect of new changes in my.cnf

# service mysql stop
# service mysql start

MySQL Client able to find mysql.sock file and I was able to connect.

[root@iwebsql etc]# mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.5.21 MySQL Community Server (GPL)

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

If you don’t want to restart mysql then use below command to tell client to use /opt/mysql/mysql.sock file

#mysql -u root –socket=/opt/mysql/mysql.sock

You may receive the same error, if mysqld didn't start. You can try below solution.

# /etc/init.d/mysqld start
# mysql –u root

Regards
Satishbabu Gunukula
http://www.oracleracexpert.com

Wednesday, February 22, 2012

Oracle ACE Award

Hi Everyone,

I am happy to share with you that I have received Oracle ACE Award. I am really honored to receive this Award for my contribution towards Oracle community.

I would like to take this opportunity to thank all my family, friends, colleagues and followers for their support.

Please take a moment to look at my Oracle ACE profile – Satishbabu Gunukula

Regards,
Satishbabu Gunukula, Oracle ACE
http://www.oracleracexpert.com

Thursday, February 16, 2012

Could Not Get DeploymentManager When Deploying or Undploying Agile

When deploying and un-deploying Oracle Agile application, users may receive error "Could not get DeploymentManager”.

Problem: You will receive below error when Agile unable to deploy/un-deploy using admin_client.jar utility

Failed at "Could not get DeploymentManager".

This is typically the result of an invalid deployer URI format being supplied, the target server not being in a started state or incorrect authentication details being supplied.

More information is available by enabling logging -- please see the Oracle Containers for J2EE Configuration and Administration Guide for details.


Cause 1:- The deployment command uses opmn request port 6003 by default. You will receive the error If the install used different opmn port (6004)

Solution:- Replace the port from 6003 to 6004 in DeployAgilePLM.sh or UndeployAgilePLM.sh script

deployer:oc4j:[rmis]:opmn://host[:opmnPort]/[iASInstanceName] /oc4jInstanceName

Cause 2:- If the server name changed from fully qualified name to short name or vice versa then admin_client.jar utility unable to deploy and you will receive the error.

Solution:- Replace fully qualified name to short name or vice versa in DeployAgilePLM.sh or UndeployAgilePLM.sh script and run the script.

In some cases, the application may hang with following error message when deploying the Agile Application. It is due to the version mismatch or Admin Data Schema Version not present

07/12/11 06:26:30 Notification ==>Initialize link ends...
07/12/11 06:26:30 Notification ==>Initialize integration begins...
07/12/11 06:26:30 Notification ==>Initialize integration ends...
07/12/11 06:26:30 Notification ==>Initialize JavaClient begins...
07/12/11 06:26:30 Notification ==>Initialize JavaClient ends...
07/12/11 06:26:30 Notification ==>Started application : Agile
07/12/11 06:26:30 Notification ==>Binding web application(s) to site default-web-site begins...
07/12/11 06:26:30 Notification ==>Binding application web-module for application Agile to site default-web-site under context root Agile
07/12/11 06:26:31 Notification ==>Initializing Servlet: com.agile.ui.pcm.InitServlet for web application application

You will see below message in default_group_home_default_group_1.log

07/12/11 13:26:32 ++++++++++++++++++++++++++++++++++++++++++++++++
07/12/11 13:26:32 + +
07/12/11 13:26:32 + Admin Data Schema Version NOT PRESENT!!!
07/12/11 13:26:32 + Admin Server Schema Version : 9.3.185.0
07/12/11 13:26:32 + +
07/12/11 13:26:32 ++++++++++++++++++++++++++++++++++++++++++++++++

Solution: Install the correct version or enter correct database information in agile.properties files, if version mismatch. Please refer Note 569229.1 for more information.

Please refer the link How to Deploy and Un-deploy Agile application.

Regards,
Satishbabu Gunukula
http://www.oracleracexpert.com

How to Deploy and Un-deploy Oracle Agile Application

Whenever you are applying the patches to Oracle Agile environment, you need to Un-deploy and deploy the application.

Before you apply the patch you must Un-deploy the Agile application. After successful installation of the patch you must deploy the agile application in order to take effect of the applied patch.

Un-Deploy Agile application:-Go to Agile home directory and run below command
$ cd $/agileDomain/bin
$./ UndeployAgilePLM.sh

Where password is the oc4jadmin user password

12/02/09 14:04:10 Notification ==>Application UnDeployer for Agile STARTS.
12/02/09 14:04:11 Notification ==>Removing all web binding(s) for application Agile from all web site(s)
12/02/09 14:04:19 Notification ==>Application UnDeployer for Agile COMPLETES.

Follow the steps to apply a Patch in Oracle Agile environment
1. Check PMN processes are running on the Agile Server.

2. Stop the OPMN processes
$ opmnctl stopall

3. Unzip the patch to a temporary directory
For Unix
$/tmp//Install_Patch.sh
For Windows
C:\temp\\Install_Patch.bat

You will get a message “Is the Agile Application already undeployed? (y/n) “. You must enter Y inorder to proceed further.

Ignore the message "Enter Passphrase for keystore:" and let the installation continue

When the installation is completed, the “INSTALLATION SUCCESSFUL” message will appear and press the return key to complete the installation.

4. Start OPMN processes
$ opmnctl startall

Deploy Agile application:-After successful installation of the patch deploy the Agile application

$ cd $/agileDomain/bin
$./DeployAgilePLM.sh

Where password is the oc4jadmin user password
12/02/09 14:06:50 Notification ==>Application Deployer for Agile STARTS.
………………………
……………………….
12/02/09 14:07:35 Notification ==>Binding web application(s) to site default-web-site ends...

12/02/09 14:07:35 Notification ==>Application Deployer for Agile COMPLETES. Operation time: 45434 msecs

Check the status of the agile application
$ opmnctl status

Make sure to check applied patch from application. If Deploy and Un-deploys fails with some reason then you will not see the applied patch in Application.

. Launch the application and login
. Click on help --> About Agile
. You should see the patch number under “updated versions”

Regards,
Satishbabu Gunukula
http://www.oracleracexpert.com