Dear all,
This is how we changed the password for jasperdb in MySQL and in jasperserver.
Change the password in MySQL
This is an example of how to modify the password for jasperdb in MySQL
C:\\Program Files\\MySQL\\MySQL Server 5.1\\bin>mysql -u root -pMyS3cr3t! -h 127.0.0.1 -P 3306
Welcome to the MySQL monitor. Commands end with ; or \\g.
Your MySQL connection id is 4
Server version: 5.1.39-community MySQL Community Server (GPL)
Type 'help;' or '\\h' for help. Type '\\c' to clear the current input statement.
mysql> UPDATE mysql.user SET Password=PASSWORD('?MyJ@sperPW') where User='jasperdb';
Query OK, 2 rows affected (0.03 sec)
Rows matched: 2 Changed: 2 Warnings: 0
mysql> flush privileges;
Query OK, 0 rows affected (0.08 sec)
mysql> quit
Bye
C:\\Program Files\\MySQL\\MySQL Server 5.1\\bin>
Modifications to context.xml and jasperserver.xml
Look for the file jasperserver.xml in “C:\\Program Files\\Apache Software Foundation\\Tomcat 6.0\\conf\\Catalina\\localhost\\". If it exists then it is preferred by Apache TomCat. The file context.xml in the webapps\\jasperserver\\META-INF directory is ignored.
Also look for the file context.xml in “C:\\Program Files\\Apache Software Foundation\\Tomcat 6.0\\webapps\\jasperserver\\META-INF\\”
Modify the file or the files as in this example:
<Context path="/jasperserver"
debug="5" reloadable="true" crossContext="true">
<!-- maxActive: Maximum number of dB connections in pool. Make sure you
configure your mysqld max_connections large enough to handle
all of your db connections. Set to 0 for no limit.
-->
<!-- maxIdle: Maximum number of idle dB connections to retain in pool.
Set to -1 for no limit. See also the DBCP documentation on this
and the minEvictableIdleTimeMillis configuration parameter.
-->
<!-- maxWait: Maximum time to wait for a dB connection to become available
in ms, in this example 10 seconds. An Exception is thrown if
this timeout is exceeded. Set to -1 to wait indefinitely.
-->
<Resource name="jdbc/jasperserver" auth="Container" type="javax.sql.DataSource"
maxActive="100" maxIdle="30" maxWait="10000"
username="jasperdb" password="?MyJ@sperPW'" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://127.0.0.1:3306/jasperserver?useUnicode=true&characterEncoding=UTF-8"/>
<Resource name="jdbc/sugarcrm" auth="Container" type="javax.sql.DataSource"
maxActive="100" maxIdle="30" maxWait="10000"
username="jasperdb" password="?MyJ@sperPW'" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://127.0.0.1:3306/sugarcrm?useUnicode=true&characterEncoding=UTF-8"/>
<Resource name="jdbc/foodmart" auth="Container" type="javax.sql.DataSource"
maxActive="100" maxIdle="30" maxWait="10000"
username="jasperdb" password="?MyJ@sperPW'" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://127.0.0.1:3306/foodmart"/>
</Context>
Configuration
- Windows 2008 Server
- JRE 6 Update 13 and Update 16
- Apache TomCat 6.0.18 and 6.0.20
- MySQL Server 5.1.34 and 5.1.39
- Apache TomCat 6.0.18 and 6.0.20
- jasperserver 3.1.0
Kind regards,