Corrupt database file
I seem to have encountered a corrupt database file, and was wondering if anyone could shed some light onto how this occurred. I was able to restore from a backup, so I'm OK now, but I'd like to know how to avoid this in the future. I'm running MySql-max 4.0.18, using InnoDB tables. It looks like the database crashed, and I was able to restart without issue, however if would then periodically crash again because of the same error. The error log looks like this: 040407 03:09:31 mysqld started 040407 3:09:31 InnoDB: Started /usr/local/mysql/bin/mysqld: ready for connections. Version: '4.0.18-max-log' socket: '/tmp/mysql.sock' port: 3306 InnoDB: Database page corruption on disk or a failed InnoDB: file read of page 54349. InnoDB: You may have to recover from a backup. 040408 14:37:38 InnoDB: Page dump in ascii and hex (16384 bytes): len 16384; hex [DUMP OMITTED BY ME] InnoDB: stored checksum 2429221792, prior-to-4.0.14-form stored checksum 3343942943 InnoDB: Page lsn 5 4204235448, low 4 bytes of lsn at page end 4204235448 InnoDB: Page may be an index page where index id is 0 3068 InnoDB: and table raytheon/item_segment_value index PRIMARY InnoDB: Database page corruption on disk or a failed InnoDB: file read of page 54349. InnoDB: You may have to recover from a backup. InnoDB: It is also possible that your operating InnoDB: system has corrupted its own file cache InnoDB: and rebooting your computer removes the InnoDB: error. InnoDB: If the corrupt page is an index page InnoDB: you can also try to fix the corruption InnoDB: by dumping, dropping, and reimporting InnoDB: the corrupt table. You can use CHECK InnoDB: TABLE to scan your table for corruption. InnoDB: Look also at section 6.1 of InnoDB: http://www.innodb.com/ibman.html about InnoDB: forcing recovery. InnoDB: Ending processing because of a corrupt database page. Number of processes running now: 0 040408 14:37:38 mysqld restarted 040408 14:37:38 InnoDB: Database was not shut down normally. InnoDB: Starting recovery from log files... InnoDB: Starting log scan based on checkpoint at InnoDB: log sequence number 6 89092023 InnoDB: Doing recovery: scanned up to log sequence number 6 89092249 InnoDB: Last MySQL binlog file position 0 172112082, file name ./king1-bin.004 040408 14:37:38 InnoDB: Flushing modified pages from the buffer pool... 040408 14:37:38 InnoDB: Started /usr/local/mysql/bin/mysqld: ready for connections. Version: '4.0.18-max-log' socket: '/tmp/mysql.sock' port: 3306 = -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Error dropping databases
I am trying to drop several InnoDB and am unable to do so. I login to the command line client and enter drop database [db_name]; and then get this error: ERROR 1217: Cannot delete or update a parent row: a foreign key constraint fails Why am I unable to drop these databases? Tom = -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Problems connecting to MySql on WebSphere 5.1
Mark, Did you ever have any luck looking into this? I have found that if I explicitly set the user and password parameters for each database in WebSphere (rather than using a container managed JAAS authentication entry), I still get the error listed below, however the database connections will work. But it seems that their is a problem with connection pooling, whereby the connections become stale over time and cause an exception to be thrown next time they are accessed. None of this was a problem in 5.0, so I've also asked IBM if there is something they might have changed in the 5.1 upgrade. Tom --- Mark Matthews [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tom O'Neil wrote: I've been running an application on WebSphere 5.0 (Linux) that uses the MySql Connector/J 3.10 to connect to a MySql-max 4.0.15 database (also on Linux). All was working fine, until I recently installed WebSphere 5.1. Now my datasources (configured exactly as before) no longer work - WebSphere seems unable to find them. When I start the server, I get the following error when my application starts: [2/19/04 16:04:40:481 EST] 3c6d95c5 DSConfigurati W DSRA0174W: Warning: GenericDataStoreHelper is being used. [2/19/04 16:04:40:891 EST] 3c6d95c5 ConnectionFac I J2CA0122I: Resource reference jdbc/staging could not be located, so default values of the following are used: [Resource-ref settings] res-auth: 1 (APPLICATION) res-isolation-level: 0 (TRANSACTION_NONE) res-sharing-scope:true (SHAREABLE) res-resolution-control: 999 (undefined) [Other attributes] isCMP1_x: false (not CMP1.x) isJMS: false (not JMS) Has anyone else had problems with WAS 5.1 access MySql datasources? Tom, Make sure you're using 'com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource' as the datasource implementation class that you plug into your WebSphere config...For some reason, no other classes (Driver or plain DataSource) seem to work in 5.1sp1 or newer. FYI, I just tested this yesterday in WS 6.0 preview, and it has the same issue. -Mark - -- Mr. Mark Matthews MySQL AB, Software Development Manager, J2EE and Windows Platforms Office: +1 708 332 0507 www.mysql.com Meet the MySQL Team! April 14-16, 2004 http://www.mysql.com/uc2004/ -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.3 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFANV/qtvXNTca6JD8RAnWcAKCD9n3If9DLMSJqOwc4ygbNpt+hsgCgmxQ4 Hd/VPa5IieQfH+Y/jnZfciM= =W/GZ -END PGP SIGNATURE- = -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Problems connecting to MySql on WebSphere 5.1
I've been running an application on WebSphere 5.0 (Linux) that uses the MySql Connector/J 3.10 to connect to a MySql-max 4.0.15 database (also on Linux). All was working fine, until I recently installed WebSphere 5.1. Now my datasources (configured exactly as before) no longer work - WebSphere seems unable to find them. When I start the server, I get the following error when my application starts: [2/19/04 16:04:40:481 EST] 3c6d95c5 DSConfigurati W DSRA0174W: Warning: GenericDataStoreHelper is being used. [2/19/04 16:04:40:891 EST] 3c6d95c5 ConnectionFac I J2CA0122I: Resource reference jdbc/staging could not be located, so default values of the following are used: [Resource-ref settings] res-auth: 1 (APPLICATION) res-isolation-level: 0 (TRANSACTION_NONE) res-sharing-scope:true (SHAREABLE) res-resolution-control: 999 (undefined) [Other attributes] isCMP1_x: false (not CMP1.x) isJMS: false (not JMS) Has anyone else had problems with WAS 5.1 access MySql datasources? Tom [EMAIL PROTECTED] = -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Problems connecting to MySql on WebSphere 5.1
Mark, I am using the 'com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource' class, which worked fine in 5.0. I've done some further debugging and figured out a way to get the datasource to at least run. If I explicitly pass the user and password parameters (along with serverName, databaseName, and port), rather than use the JAAS authentication entry I created, I still get the same error as below, however the datasource does in fact work. If I try to use the JAAS entry, it actually connects to the server, which gives the following error: Access denied for user: '[EMAIL PROTECTED]' (Using password: NO) Passing the login as parameters gives me the error below, but my code can, in fact, access the datasource. [2/19/04 21:57:33:376 EST] 3c66be23 DSConfigurati W DSRA0174W: Warning: GenericDataStoreHelper is being used. [2/19/04 21:57:33:706 EST] 3c66be23 ConnectionFac I J2CA0122I: Resource reference jdbc/staging could not be located, so default values of the following are used: [Resource-ref settings] res-auth: 1 (APPLICATION) res-isolation-level: 0 (TRANSACTION_NONE) res-sharing-scope:true (SHAREABLE) res-resolution-control: 999 (undefined) [Other attributes] isCMP1_x: false (not CMP1.x) isJMS: false (not JMS) [2/19/04 21:57:34:287 EST] 3c66be23 WSRdbDataSour I DSRA8203I: Database product name : MySQL [2/19/04 21:57:34:287 EST] 3c66be23 WSRdbDataSour I DSRA8204I: Database product version : 4.0.15-max [2/19/04 21:57:34:287 EST] 3c66be23 WSRdbDataSour I DSRA8205I: JDBC driver name : MySQL-AB JDBC Driver [2/19/04 21:57:34:287 EST] 3c66be23 WSRdbDataSour I DSRA8206I: JDBC driver version : mysql-connector-java-3.0.10-stable ( $Date: 2004/01/13 21:56:18 $, $Revision: 1.27.2.33 $ ) Tom --- Mark Matthews [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tom O'Neil wrote: I've been running an application on WebSphere 5.0 (Linux) that uses the MySql Connector/J 3.10 to connect to a MySql-max 4.0.15 database (also on Linux). All was working fine, until I recently installed WebSphere 5.1. Now my datasources (configured exactly as before) no longer work - WebSphere seems unable to find them. When I start the server, I get the following error when my application starts: [2/19/04 16:04:40:481 EST] 3c6d95c5 DSConfigurati W DSRA0174W: Warning: GenericDataStoreHelper is being used. [2/19/04 16:04:40:891 EST] 3c6d95c5 ConnectionFac I J2CA0122I: Resource reference jdbc/staging could not be located, so default values of the following are used: [Resource-ref settings] res-auth: 1 (APPLICATION) res-isolation-level: 0 (TRANSACTION_NONE) res-sharing-scope:true (SHAREABLE) res-resolution-control: 999 (undefined) [Other attributes] isCMP1_x: false (not CMP1.x) isJMS: false (not JMS) Has anyone else had problems with WAS 5.1 access MySql datasources? Tom, Make sure you're using 'com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource' as the datasource implementation class that you plug into your WebSphere config...For some reason, no other classes (Driver or plain DataSource) seem to work in 5.1sp1 or newer. FYI, I just tested this yesterday in WS 6.0 preview, and it has the same issue. -Mark - -- Mr. Mark Matthews MySQL AB, Software Development Manager, J2EE and Windows Platforms Office: +1 708 332 0507 www.mysql.com Meet the MySQL Team! April 14-16, 2004 http://www.mysql.com/uc2004/ -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.3 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFANV/qtvXNTca6JD8RAnWcAKCD9n3If9DLMSJqOwc4ygbNpt+hsgCgmxQ4 Hd/VPa5IieQfH+Y/jnZfciM= =W/GZ -END PGP SIGNATURE- = -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
MySql JDBC connection pooling in Websphere
I have configured WAS Express 5.0 to connect to MySql 4.0, however I am unable to open any connections. I know that the connection to the MySql server works, because if I change any of the connection parameters (port, database name, login), the JDBC driver returns the appropriate error message. I have tried using both the MySql Connector 2.0.14 and 3.0.3 JDBC drivers to connect. Within WAS 5.0, I have created a user-defined JDBC provider and my datasource uses the com.ibm.websphere.rsadapter.ConnectJDBCDataStoreHelper data source helper class. The error I get is listed below (this was using MySql Connector 2.0.14). I get a similar error using 3.0.3, but that makes sense because the beta documentation states that Connection.getTypeMap() has not been implemented. Does anyone have any ideas as to what could be going on here? Method createManagedConnctionWithMCWrapper caught an exception during creation of the ManagedConnection for resource jdbc/raytheon, throwing ResourceAllocationException. Original exception: com.ibm.ws.exception.WsException: DSRA0080E: An exception was received by the Data Store Adapter. See original exception message: null. at com.ibm.ws.rsadapter.exceptions.DataStoreAdapterException.init(DataStoreAdapterException.java:251) at com.ibm.ws.rsadapter.exceptions.DataStoreAdapterException.init(DataStoreAdapterException.java:172) at com.ibm.ws.rsadapter.exceptions.DataStoreAdapterException.init(DataStoreAdapterException.java:125) at com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl.initializeConnectionProperties(WSRdbManagedConnectionImpl.java:584) at com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl.init(WSRdbManagedConnectionImpl.java:359) at com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.createManagedConnection(WSManagedConnectionFactoryImpl.java:506) at com.ibm.ejs.j2c.poolmanager.FreePool.createManagedConnectionWithMCWrapper(FreePool.java:1106) at com.ibm.ejs.j2c.poolmanager.FreePool.createOrWaitForConnection(FreePool.java:897) at com.ibm.ejs.j2c.poolmanager.PoolManager.reserve(PoolManager.java:1065) at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:560) at com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:374) at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:205) at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection(WSJdbcDataSource.java:180) at com.ds.data.ConnectionManager.getConnection(ConnectionManager.java:51) at com.ds.business.navigation.NavControl.init(NavControl.java:57) at com.ds.business.navigation.NavControl.init(NavControl.java:40) at com.ds.business.util.AppSettings.init(AppSettings.java:33) at com.ds.presentation.util.Application.init(Application.java:25) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doInit(StrictServletInstance.java:82) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._init(StrictLifecycleServlet.java:147) at com.ibm.ws.webcontainer.servlet.PreInitializedServletState.init(StrictLifecycleServlet.java:270) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.init(StrictLifecycleServlet.java:113) at com.ibm.ws.webcontainer.servlet.ServletInstance.init(ServletInstance.java:175) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at com.ibm.ws.webcontainer.webapp.WebAppServletManager.addServlet(WebAppServletManager.java:761) at com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadServlet(WebAppServletManager.java:257) at com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadAutoLoadServlets(WebAppServletManager.java:453) at com.ibm.ws.webcontainer.webapp.WebApp.loadServletManager(WebApp.java:1233) at com.ibm.ws.webcontainer.webapp.WebApp.init(WebApp.java:273) at com.ibm.ws.webcontainer.srt.WebGroup.loadWebApp(WebGroup.java:317) at com.ibm.ws.webcontainer.srt.WebGroup.init(WebGroup.java:194) at com.ibm.ws.webcontainer.WebContainer.addWebApplication(WebContainer.java:950) at com.ibm.ws.runtime.component.WebContainerImpl.install(WebContainerImpl.java:133) at com.ibm.ws.runtime.component.WebContainerImpl.start(WebContainerImpl.java:360) at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:401) at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:743) at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:337) at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:531) at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:254) at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:232) at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:343) at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:234) at