Dear Maxim, Thank you for your prompt response. It worked perfectly. For the benefit of OM community, below is the summary of issue and resolution [USE CASE].
Could we import a OM 3.0.7 database content into OM 3.1.2 installation? Do the tables, rows and columns accurately mapped across 3.0.x to 3.1.x? Is there a specific option that needs to be given in ./admin.sh command? Thank you. =========================================================== USE CASE: ACCESS DENIED WHILE IMPORTING DATABASE CONTENT =================================== 1. Compile, install and configure OM 3.1.2. Environment: CentOS 7.3, MariaDB 10.x, JDK 1.8_u102 2. Declare environmental variables: $RED5_HOME=[path_to_dist/red5] $OM_CONTEXT=[installation_name_in_webapps] 3. For backing up: ./admin.sh -v -b -file test.data.backup.zip 4. Compile and install another instance of OM 3.1.2. 5. For restoring: ./admin.sh -v -i -file test.data.backup.zip --db-type mysql --drop --db-name test_db_312 --db-user [username_of_user_in_db] --db-pass [password_of_user_in_db] ---------- Result: 3 ERRORS ---------- [ERROR] [main] org.apache.openmeetings.cli.Admin - Install failed org.apache.openjpa.util.UserException: A connection could not be obtained for driver class "com.mysql.jdbc.Driver" and URL "jdbc:mysql://localhost:3306/test_db_312? ... Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up. … Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Access denied for user ''@'localhost' to database 'test_db_312' Sincerely, Hemant K. Sabat Coscend Communications Solutions Web site: www.Coscend.com <http://www.Coscend.com> ------------------------------------------------------------------ CONFIDENTIALITY NOTICE: See 'Confidentiality Notice Regarding E-mail Messages from Coscend Communications Solutions' posted at: http://www.Coscend.com/Terms_and_Conditions.html -----Original Message----- From: Maxim Solodovnik [mailto:[email protected]] Sent: Tuesday, August 30, 2016 12:13 AM To: dev <[email protected]>; [email protected] Subject: Re: OM3.1.2 Restore Error: Seeking Help You need to specify "db-user"/"db-pass" command-line options On Tue, Aug 30, 2016 at 11:42 AM, Coscend@OM <[email protected] <mailto:[email protected]> > wrote: > Dear OpenMeetings Developers, > > > > We are backing up and restoring database content of OM 3.1.2 from one > instance to another. While restoring, we are getting a database > connection refused error. We would appreciate any vectors to resolve the > issue. > Below > are the use case, the commands we are using, resulting errors and > error log. > > > > > --------- > > USE CASE > > --------- > > 1. Compiled, installed and configured OM 3.1.2. Environment: CentOS > 7.3, MariaDB 10.x, JDK 1.8_u102 > > 2. Declared environmental variables: > > $RED5_HOME=[path_to_dist/red5] > > $OM_CONTEXT=[installation_name_in_webapps] > > 3. For backing up: ./admin.sh -v -b -file test.data.backup.zip > > 4. Compiled and installed another instance of OM 3.1.2. > > 5. For restoring: ./admin.sh -v -i -file test.data.backup.zip > --db-type mysql --drop --db-name test_db_312 > > > > ---------- > > Result: 3 ERRORS > > ---------- > > [ERROR] [main] org.apache.openmeetings.cli.Admin - Install failed > > org.apache.openjpa.util.UserException: A connection could not be > obtained for driver class "com.mysql.jdbc.Driver" and URL > "jdbc:mysql://localhost:3306/test_db_312? > > . > > Caused by: > com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: > Could > not create connection to database server. Attempted reconnect 3 times. > Giving up. > > . > > Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: > Access > denied for user ''@'localhost' to database 'test_db_312' > > > > ========== > > ERROR LOG > > ========= > > [ERROR] [main] org.apache.openmeetings.cli.Admin - Install failed > > org.apache.openjpa.util.UserException: A connection could not be > obtained for driver class "com.mysql.jdbc.Driver" and URL > "jdbc:mysql://localhost:3306/test_db_312?autoReconnect= > true&useUnicode=true& > createDatabaseIfNotExist=true&characterEncoding=utf-8& > connectionCollation=ut > f8_general_ci&cachePrepStmts=true&cacheCallableStatements= > true&cacheServerCo > nfiguration=true&useLocalSessionState=true&elideSetAutoCommits=true& > alwaysSe > ndSetIsolation=false&enableQueryTimeouts=false& > prepStmtCacheSize=3000&prepSt > mtCacheSqlLimit=1000". You may have specified an invalid URL. > > at > org.apache.openjpa.jdbc.schema.DataSourceFactory. > newConnectException(DataSou > rceFactory.java:272) > > at > org.apache.openjpa.jdbc.schema.DataSourceFactory. > installDBDictionary(DataSou > rceFactory.java:258) > > at > org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl. > getConnectionFactory(JDBC > ConfigurationImpl.java:733) > > at > org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl. > getDataSource(JDBCConfigu > rationImpl.java:878) > > at > org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl. > getDataSource2(JDBCConfig > urationImpl.java:920) > > at > org.apache.openjpa.jdbc.schema.SchemaTool.<init>(SchemaTool.java:132) > > at > org.apache.openmeetings.cli.Admin.runSchemaTool(Admin.java:475) > > at org.apache.openmeetings.cli.Admin.immediateDropDB(Admin. > java:500) > > at org.apache.openmeetings.cli.Admin.dropDB(Admin.java:466) > > at org.apache.openmeetings.cli.Admin.process(Admin.java:268) > > at org.apache.openmeetings.cli.Admin.main(Admin.java:528) > > Caused by: > com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: > Could > not create connection to database server. Attempted reconnect 3 times. > Giving up. > > at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > > at > sun.reflect.NativeConstructorAccessorImpl.newInstance( > NativeConstructorAcces > sorImpl.java:62) > > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance( > DelegatingConstruc > torAccessorImpl.java:45) > > at > java.lang.reflect.Constructor.newInstance(Constructor.java:423) > > at com.mysql.jdbc.Util.handleNewInstance(Util.java:404) > > at com.mysql.jdbc.Util.getInstance(Util.java:387) > > at > com.mysql.jdbc.SQLError.createSQLException(SQLError.java:917) > > at > com.mysql.jdbc.SQLError.createSQLException(SQLError.java:896) > > at > com.mysql.jdbc.SQLError.createSQLException(SQLError.java:885) > > at > com.mysql.jdbc.SQLError.createSQLException(SQLError.java:860) > > at > com.mysql.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:2 > 163) > > at > com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2088) > > at > com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:806) > > at > com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47) > > at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > > at > sun.reflect.NativeConstructorAccessorImpl.newInstance( > NativeConstructorAcces > sorImpl.java:62) > > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance( > DelegatingConstruc > torAccessorImpl.java:45) > > at > java.lang.reflect.Constructor.newInstance(Constructor.java:423) > > at com.mysql.jdbc.Util.handleNewInstance(Util.java:404) > > at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl. > java:410) > > at > com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java: > 328) > > at > org.apache.openjpa.jdbc.schema.SimpleDriverDataSource. > getSimpleConnection(Si > mpleDriverDataSource.java:91) > > at > org.apache.openjpa.jdbc.schema.AutoDriverDataSource. > getConnection(AutoDriver > DataSource.java:39) > > at > org.apache.openjpa.jdbc.schema.SimpleDriverDataSource. > getConnection(SimpleDr > iverDataSource.java:60) > > at > org.apache.openjpa.lib.jdbc.DelegatingDataSource. > getConnection(DelegatingDat > aSource.java:116) > > at > org.apache.openjpa.lib.jdbc.DecoratingDataSource. > getConnection(DecoratingDat > aSource.java:92) > > at > org.apache.openjpa.jdbc.schema.DataSourceFactory. > installDBDictionary(DataSou > rceFactory.java:250) > > ... 9 common frames omitted > > Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: > Access > denied for user ''@'localhost' to database 'test_db_312' > > at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > Method) > > at > sun.reflect.NativeConstructorAccessorImpl.newInstance( > NativeConstructorAcces > sorImpl.java:62) > > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance( > DelegatingConstruc > torAccessorImpl.java:45) > > at > java.lang.reflect.Constructor.newInstance(Constructor.java:423) > > at com.mysql.jdbc.Util.handleNewInstance(Util.java:404) > > at com.mysql.jdbc.Util.getInstance(Util.java:387) > > at > com.mysql.jdbc.SQLError.createSQLException(SQLError.java:942) > > at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3966) > > at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3902) > > at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2526) > > at com.mysql.jdbc.MysqlIO.changeDatabaseTo(MysqlIO.java:1958) > > at > com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableA > uthentication(MysqlIO.j > ava:1890) > > at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1228) > > at > com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2253) > > at > com.mysql.jdbc.ConnectionImpl.connectWithRetries(ConnectionImpl.java:2 > 104) > > ... 25 common frames omitted > > > > Thank you. > > > > Sincerely, > > > > Hemant K. Sabat > > > > Coscend Communications Solutions > > Web site: <http://www.coscend.com/> www.Coscend.com <http://www.Coscend.com> > > ------------------------------------------------------------------ > > CONFIDENTIALITY NOTICE: See 'Confidentiality Notice Regarding E-mail > Messages from Coscend Communications Solutions' posted at: > <http://www.coscend.com/Terms_and_Conditions.html> > http://www.Coscend.com/Terms_and_Conditions.html > > > > > > > > -- WBR Maxim aka solomax ----- No virus found in this message. Checked by AVG - www.avg.com <http://www.avg.com> Version: 2016.0.7752 / Virus Database: 4649/12907 - Release Date: 08/29/16
