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


Difference between version 4 and version 3:

At line 2 changed 1 line.
the AppFuse database, the chances are the problem is one of three things:
the AppFuse database, the chances are you need to perform one of the following steps:
At line 4 changed 4 lines.
*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
!Table of Contents
* [1] Set a password for root user
* [2] Your root account is not setup correctly
* [3] The grants for the test user account are not being setup properly
* [4] Set the root password
At line 9 changed 2 lines.
The following describes how to re-initialising your root mysql account and
ensuring things are setup correctly so ant setup runs smoothly.
!!Set a password for root user [#1]
At line 12 changed 4 lines.
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).
To set a password for your mysql root user, edit the build.properties file and edit
these properties as neccesary:
At line 17 removed 2 lines.
If you are seeing an error message that says:
At line 20 changed 2 lines.
Invalid authorization specification message from server:
"Access denied for user: 'test@wl16lx1' (Using password: YES)"
#database.jar=${postgresql.jar}
#database.type=postgresql
#database.name=appfuse
#database.host=localhost
#database URL for creating other databases (doesn't work with pgsql)
#database.admin.url=jdbc:${database.type}://${database.host}/template1
#database.admin.username=postgres
#database.admin.password=postgres
#hibernate.dialect=net.sf.hibernate.dialect.PostgreSQLDialect
#database.driver_class=org.postgresql.Driver
#database.url=jdbc:${database.type}://${database.host}/${database.name}
At line 24 changed 4 lines.
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':
You should uncomment the password line to look like this:
At line 30 changed 3 lines.
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";
database.admin.password=myrootpassword
At line 35 changed 4 lines.
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).
Where myrootpassword is your root user password.
At line 38 added 21 lines.
!!Your root account is not setup correctly [#2]
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).
The users table also contains a 'host' column. The root user needs a record entry
in the users table for each 'host' it is going to login from. ie. 'mypc', 'localhost'
and the wildcard '%'.
Both the grants, and the host columns need to be setup correctly for ant setup to
run smoothly.
These instructions tell you how to setup the root user with no password. Once you
have ant setup successfully, you can set a password on the root account.
(Please note: You do not have to setup the root account in this way, it is possible
to perform the following steps and give the root user a password, see [1]. But
the following steps should work for you.)
At line 44 changed 3 lines.
$ mysql -u root
mysql> use mysql;
Database changed
{{{
$ mysql -u root
mysql> use mysql;
Database changed
At line 48 changed 1 line.
mysql> select user, host, password from user where user = "root";
mysql> select user, host, password from user where user = "root";
At line 50 changed 9 lines.
{{{
+------+-----------+----------+
| user | host | password |
+------+-----------+----------+
| root | localhost | |
| root | mypc | |
| root | % | |
+------+-----------+----------+
3 rows in set (0.00 sec)
+------+-----------+----------+
| user | host | password |
+------+-----------+----------+
| root | localhost | |
| root | mypc | |
| root | % | |
+------+-----------+----------+
3 rows in set (0.00 sec)
At line 69 changed 1 line.
mysqladmin -u root -p shutdown
mysqladmin -u root -p shutdown
At line 76 changed 2 lines.
(UNIX) killall mysqld
(Windows) Use task manager or stop the mysqld service
(UNIX) killall mysqld
(Windows) Use task manager or stop the mysqld service
At line 85 changed 1 line.
${MYSQL_HOME}/bin/mysqld_safe --skip-grant-tables &
${MYSQL_HOME}/bin/mysqld_safe --skip-grant-tables &
At line 90 changed 5 lines.
mysql -u root
use mysql;
delete from user where user='root';
commit;
FLUSH PRIVILEGES;
mysql -u root
use mysql;
delete from user where user='root';
commit;
FLUSH PRIVILEGES;
At line 101 changed 9 lines.
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;
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;
At line 131 added 9 lines.
Note: If you want to set a root password at this stage (and then specify it build.properties
as defined in [1]), then you need to modify the GRANT commands to:
{{{
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'
IDENTIFIED BY 'myrootpassword' WITH GRANT OPTION;
}}}
Replacing 'myrootpassword' to be what you want the root user password to be.
At line 114 changed 1 line.
Now, if you run ant setup you might be ok. If you are not, and you are getting error:
Now, if you run ant setup you should be ok, if you are still getting errors,
it is likely you need to perform the steps in [3]. If you are up and running,
you should not set the root password as described in [4].
At line 146 added 4 lines.
!!The grants for the test user account are not being setup properly [#3]
If you are seeing an error message that says:
At line 117 changed 2 lines.
java.sql.SQLException: Invalid authorization specification message from server:
"Access denied for user: 'test@wl16lx1' (Using password: YES)"
Invalid authorization specification message from server:
"Access denied for user: 'test@mypc' (Using password: YES)"
At line 120 removed 1 line.
Then follow the instructions at the top of this page to sort out the problem..
At line 122 changed 1 line.
Hopefully you are now up and running!
Then 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).
Here is an example of what a modified file might look like 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";
}}}
!!Set the root password [#4]
To set the root password, type the following commands :
{{{
$ mysql -u root
mysql> use mysql;
Database changed
}}}
Now we want to set the password field for any root user records in the users table.
Type this command:
{{{
UPDATE user SET Password=PASSWORD('myrootpassword')
WHERE User='root';
FLUSH PRIVILEGES;
}}}
Where myrootpassword is your root user password.

Back to AssistanceWithAntSetup, or to the Page History.