Raible's Wiki

Raible Designs
Wiki Home
News
Recent Changes

AppFuse

Homepage
  - Korean
  - Chinese
  - Italian
  - Japanese

QuickStart Guide
  - Chinese
  - French
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish
  - Japanese

User Guide
  - Korean
  - Chinese

Tutorials
  - Chinese
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish

FAQ
  - Korean

Latest Downloads

Other Applications

Struts Resume
Security Example
Struts Menu

Set your name in
UserPreferences


Referenced by
AppFuseQuickStart
AppFuseQuickStart_cn
AppFuseQuickStart_it
AppFuseQuickStart_jp
AppFuseQuickStart_pt
AppFuseQuickStart_zh
AppFuseSupport




JSPWiki v2.2.33

[RSS]


Hide Menu

AssistanceWithAntSetup


This is version 2. It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]


If you are having problems with the root user account accessing mysql and setting up the AppFuse database, the chances are the problem is one of three things:
  • You have specified a password for the root user (but not changed build.properties to specify it)
  • You do not have the grants setup correctly for the root user
  • You do not have the 'host' column in the mysql users table setup correctly

The following describes how to re-initialising your root mysql account and ensuring things are setup correctly so ant setup runs smoothly.

When you login to mysql there are a number of databases available to you. One of these databases is called mysql which is the 'system' database. Within the mysql database, there is a table called 'users' which holds all the mysql user information, along with their grants (their privileges).

If you are seeing an error message that says:

Invalid authorization specification message from server: "Access denied for user: 'test@wl16lx1' (Using password: YES)"

Then your problem is NOT the root account and you need to change metadata/sql/mysql-create.sql to specify your hostname (along with your domain name if you have one, else just your hostname). Below, I have given an example if your hostname is 'mypc':

create database if not exists appfuse;
grant all privileges on appfuse.* to test@localhost identified by "test";
grant all privileges on appfuse.* to test@mypc identified by "test";

Now, presuming it is the root account that you are getting errors with, here is how you reset the mysql DB to setup the root user with no password (to get you going with ant setup - you can add a root password after you have setup the appfuse DB).

In this example, we will pretend your hostname is 'mypc'. Also, where ${MYSQL_HOME} is shown, please replace that with the path to your mysql installation. At the end of these steps, you should be able to login to your mysql database and see this:

$ mysql -u root mysql> use mysql; Database changed

mysql> select user, host, password from user where user = "root";

+------+-----------+----------+
| user | host      | password |
+------+-----------+----------+
| root | localhost |          |
| root | mypc      |          |
| root | %         |          |
+------+-----------+----------+
3 rows in set (0.00 sec)

and if you execute select * from user where user = "root"; we want to see Y's on all the grant columns within the user table, which denotes that the root user has all the neccesary grant options to be able to setup the appfuse database and give the test user privileges on it.

First we want to stop the mysql db, so execute this command:

mysqladmin -u root -p shutdown

If mysql is still running (check the process on UNIX or use TaskManager on Windows), then kill the process:

(UNIX) killall mysqld
(Windows) Use task manager or stop the mysqld service

Now we want to restart mysql but bypass the authentication tables so we can go in and change the user database table, so now execute this command (UNIX command given but for Windows, leaving out the ampersand):

${MYSQL_HOME}/bin/mysqld_safe --skip-grant-tables &

Now log back into mysql and remove any old root entries in your user table:

mysql -u root
use mysql;
delete from user where user='root';
commit;
FLUSH PRIVILEGES;

Now we want to setup the root user using the GRANT command, so execute the following commands (Note you should change mypc to your hostname or hostname.domainname:

mysql -u root
use mysql;
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
FLUSH PRIVILEGES;
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;
GRANT ALL PRIVILEGES ON *.* TO 'root'@'mypc' WITH GRANT OPTION;
FLUSH PRIVILEGES;
quit;

We now have the root user setup properly, lets restart mysql without bypassing the authentication stuff.. Stop mysql using the instructions above once more. Now, if you run ant setup you might be ok. If you are not, and you are getting error:

java.sql.SQLException: Invalid authorization specification message from server: "Access denied for user: 'test@wl16lx1' (Using password: YES)"
Then follow the instructions at the top of this page to sort out the problem..

Hopefully you are now up and running!



Go to top   More info...   Attach file...
This particular version was published on 06-Nov-2006 13:52:44 MST by BenGill.