<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "MySQL database problem"]]></title>
		<link>http://mango.serotoninsoftware.com/forum/posts/list/2.page</link>
		<description><![CDATA[Latest messages posted in the topic "MySQL database problem"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>MySQL database problem</title>
				<description><![CDATA[ When I try to convert the derby database into MySQL database. I got the following exception:<br /> <br /> Exception sending context initialized event to listener instance of class com.serotonin.mango.MangoContextListener<br /> com.serotonin.ShouldNeverHappenException: org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [select ds.id, ds.name, ds.dataSourceType, ds.enabled,   vrt.updateSeconds,   mbs.updateSeconds, mbs.commPortId, mbs.baudRate, mbs.flowControlIn, mbs.flowControlOut, mbs.dataBits,   mbs.stopBits, mbs.parity, mbs.encoding, mbs.echo,   mbi.updateSeconds, mbi.transportType, mbi.host, mbi.port from dataSources ds   left join dataSourceVrt vrt on vrt.dataSourceId = ds.id  left join dataSourceMbs mbs on mbs.dataSourceId = ds.id  left join dataSourceMbi mbi on mbi.dataSourceId = ds.id];[b] nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'mango.datasourcevrt' doesn't exist[/b]<br /> 	at com.serotonin.mango.db.upgrade.DBUpgrade.checkUpgrade(DBUpgrade.java:87)<br /> 	at com.serotonin.mango.db.DatabaseAccess.initialize(DatabaseAccess.java:133)<br /> 	at com.serotonin.mango.MangoContextListener.databaseInitialize(MangoContextListener.java:24<img src="http://mango.serotoninsoftware.com/forum//images/smilies/b2eb59423fbf5fa39342041237025880.gif"  /><br /> 	at com.serotonin.mango.MangoContextListener.contextInitialized(MangoContextListener.java:85)<br /> 	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934)<br /> 	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429)<br /> 	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)<br /> 	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)<br /> 	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)<br /> 	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:987)<br /> 	at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:909)<br /> 	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:495)<br /> 	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206)<br /> 	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)<br /> 	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)<br /> 	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)<br /> 	at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)<br /> 	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)<br /> 	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)<br /> 	at org.apache.catalina.core.StandardService.start(StandardService.java:516)<br /> 	at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)<br /> 	at org.apache.catalina.startup.Catalina.start(Catalina.java:583)<br /> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br /> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br /> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br /> 	at java.lang.reflect.Method.invoke(Method.java:597)<br /> 	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:28<img src="http://mango.serotoninsoftware.com/forum//images/smilies/b2eb59423fbf5fa39342041237025880.gif"  /><br /> 	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)<br /> <br /> Can anyone tell me what is the problem?<br /> <br /> Thanks ]]></description>
				<guid isPermaLink="true">http://mango.serotoninsoftware.com/forum/posts/preList/249/1097.page</guid>
				<link>http://mango.serotoninsoftware.com/forum/posts/preList/249/1097.page</link>
				<pubDate><![CDATA[Mon, 7 Dec 2009 02:09:15]]> GMT</pubDate>
				<author><![CDATA[ leolee22]]></author>
			</item>
			<item>
				<title>Re:MySQL database problem</title>
				<description><![CDATA[ What version of Mango are you starting from?]]></description>
				<guid isPermaLink="true">http://mango.serotoninsoftware.com/forum/posts/preList/249/1098.page</guid>
				<link>http://mango.serotoninsoftware.com/forum/posts/preList/249/1098.page</link>
				<pubDate><![CDATA[Mon, 7 Dec 2009 09:37:23]]> GMT</pubDate>
				<author><![CDATA[ mlohbihler]]></author>
			</item>
			<item>
				<title>Re:MySQL database problem</title>
				<description><![CDATA[ I am using mango 1.7.0. <br /> <br /> I downloaded it from this link <a class="snap_shots" href="http://mango.serotoninsoftware.com/downloads/mango-1.7.0.zip" target="_blank" rel="nofollow">http://mango.serotoninsoftware.com/downloads/mango-1.7.0.zip</a>]]></description>
				<guid isPermaLink="true">http://mango.serotoninsoftware.com/forum/posts/preList/249/1112.page</guid>
				<link>http://mango.serotoninsoftware.com/forum/posts/preList/249/1112.page</link>
				<pubDate><![CDATA[Mon, 7 Dec 2009 21:50:54]]> GMT</pubDate>
				<author><![CDATA[ leolee22]]></author>
			</item>
			<item>
				<title>Re:MySQL database problem</title>
				<description><![CDATA[ That error is mentioning a table that hasn't been in Mango since version 0.7.0. This means that the environment that you are converting from is somehow corrupted. When you remove the "convert" properties and stuff from the env.properties file, can you get back to your old install?]]></description>
				<guid isPermaLink="true">http://mango.serotoninsoftware.com/forum/posts/preList/249/1114.page</guid>
				<link>http://mango.serotoninsoftware.com/forum/posts/preList/249/1114.page</link>
				<pubDate><![CDATA[Mon, 7 Dec 2009 23:01:40]]> GMT</pubDate>
				<author><![CDATA[ mlohbihler]]></author>
			</item>
			<item>
				<title>Re:MySQL database problem</title>
				<description><![CDATA[ Hi,<br /> <br /> I get the error "Table/View 'DATASOURCEVRT' does not exist" according to com.seroronin.ShouldNeverHappenException when it checkUpgrades(DBUpgrade.java:8<img src="http://mango.serotoninsoftware.com/forum//images/smilies/b2eb59423fbf5fa39342041237025880.gif"  />.Its version is 1.8.0.]]></description>
				<guid isPermaLink="true">http://mango.serotoninsoftware.com/forum/posts/preList/249/1204.page</guid>
				<link>http://mango.serotoninsoftware.com/forum/posts/preList/249/1204.page</link>
				<pubDate><![CDATA[Sat, 19 Dec 2009 07:56:06]]> GMT</pubDate>
				<author><![CDATA[ cznc]]></author>
			</item>
			<item>
				<title>Re:MySQL database problem</title>
				<description><![CDATA[ Did you create the tables before running Mango, or let Mango create the tables itself? Mango automatically checks if the users table is missing and if so creates all tables. Otherwise it checks what version the database is and upgrades if necessary.<br /> <br /> If you ran the create script yourself, the database will not have been properly set up, which would result in this error.]]></description>
				<guid isPermaLink="true">http://mango.serotoninsoftware.com/forum/posts/preList/249/1205.page</guid>
				<link>http://mango.serotoninsoftware.com/forum/posts/preList/249/1205.page</link>
				<pubDate><![CDATA[Sat, 19 Dec 2009 21:31:20]]> GMT</pubDate>
				<author><![CDATA[ mlohbihler]]></author>
			</item>
			<item>
				<title>Re:MySQL database problem</title>
				<description><![CDATA[ I'm having problems upgrading to mySQL. The tables get created in mySQL during start up, but something else during the execution fails. There is no data in the mySQL DB. <br /> <br /> env.properties  set up as per instruction. All Data from from derby was gone when I restored the env.properties to default settings. I'm using version 1.8.<br /> <br /> Some of the exceptions I get.<br /> <br /> SEVERE: A web application registered the JBDC driver [org.apache.derby.jdbc.AutoloadedDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.<br /> 15-Feb-2010 2:45:44 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc<br /> SEVERE: A web application registered the JBDC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.<br /> <br /> <br /> EVERE: Exception sending context initialized event to listener instance of class com.serotonin.mango.MangoContextListener<br /> org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [   create table events ( id int not null auto_increment, typeId int not null, typeRef1 int not null, typeRef2 int not null, activeTs bigint not null, rtnApplicable char(1) not null, rtnTs bigint, rtnCause int, alarmLevel int not null, message longtext, ackTs bigint, ackUserId int primary key (id)<img src="http://mango.serotoninsoftware.com/forum//images/smilies/8a80c6485cd926be453217d59a84a888.gif" /> type=InnoDB; ]; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(id)<img src="http://mango.serotoninsoftware.com/forum//images/smilies/8a80c6485cd926be453217d59a84a888.gif" /> type=InnoDB' at line 1<br /> 	at org.springframework.jdbc.support.SQLExceptionSubclassTranslator.translate(SQLExceptionSubclassTranslator.java:7<img src="http://mango.serotoninsoftware.com/forum//images/smilies/b2eb59423fbf5fa39342041237025880.gif"  /><br /> 	at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.translate(SQLErrorCodeSQLExceptionTranslator.java:237)<br /> 	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:406)<br /> 	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:42<img src="http://mango.serotoninsoftware.com/forum//images/smilies/b2eb59423fbf5fa39342041237025880.gif"  /><br /> 	at com.serotonin.mango.db.BasePooledAccess.runScript(BasePooledAccess.java:89)<br /> 	at com.serotonin.mango.db.BasePooledAccess.createSchema(BasePooledAccess.java:106)<br /> 	at com.serotonin.mango.db.MySQLAccess.newDatabaseCheck(MySQLAccess.java:66)<br /> 	at com.serotonin.mango.db.DatabaseAccess.initialize(DatabaseAccess.java:86)<br /> 	at com.serotonin.mango.MangoContextListener.databaseInitialize(MangoContextListener.java:24<img src="http://mango.serotoninsoftware.com/forum//images/smilies/b2eb59423fbf5fa39342041237025880.gif"  /><br /> 	at com.serotonin.mango.MangoContextListener.contextInitialized(MangoContextListener.java:85)<br /> 	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972)<br /> 	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)<br /> 	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)<br /> 	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)<br /> 	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)<br /> 	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1041)<br /> 	at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:964)<br /> 	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)<br /> 	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)<br /> 	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)<br /> 	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)<br /> 	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)<br /> 	at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)<br /> 	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)<br /> 	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)<br /> 	at org.apache.catalina.core.StandardService.start(StandardService.java:516)<br /> 	at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)<br /> 	at org.apache.catalina.startup.Catalina.start(Catalina.java:593)<br /> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br /> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br /> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br /> 	at java.lang.reflect.Method.invoke(Method.java:597)<br /> 	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)<br /> 	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)<br /> Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(id)<img src="http://mango.serotoninsoftware.com/forum//images/smilies/8a80c6485cd926be453217d59a84a888.gif" /> type=InnoDB' at line 1<br /> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)<br /> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)<br /> 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)<br /> 	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)<br /> 	at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)<br /> 	at com.mysql.jdbc.Util.getInstance(Util.java:381)<br /> 	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1030)<br /> 	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)<br /> 	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3515)<br /> 	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3447)<br /> 	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1951)<br /> 	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2101)<br /> 	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:254<img src="http://mango.serotoninsoftware.com/forum//images/smilies/b2eb59423fbf5fa39342041237025880.gif"  /><br /> 	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2477)<br /> 	at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:741)<br /> 	at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:587)<br /> 	at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:266)<br /> 	at org.springframework.jdbc.core.JdbcTemplate$1ExecuteStatementCallback.doInStatement(JdbcTemplate.java:421)<br /> 	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:395)<br /> 	... 31 more<br /> <br /> <br /> <br /> ]]></description>
				<guid isPermaLink="true">http://mango.serotoninsoftware.com/forum/posts/preList/249/1412.page</guid>
				<link>http://mango.serotoninsoftware.com/forum/posts/preList/249/1412.page</link>
				<pubDate><![CDATA[Mon, 15 Feb 2010 17:03:59]]> GMT</pubDate>
				<author><![CDATA[ chrapchp]]></author>
			</item>
			<item>
				<title>Re:MySQL database problem</title>
				<description><![CDATA[ There is a bug in the MySQL create script (found in the "db" directory). Add a comma at the end of line 264 and try again.<br /> <br /> [code]  ackUserId int,<br /> [/code]]]></description>
				<guid isPermaLink="true">http://mango.serotoninsoftware.com/forum/posts/preList/249/1413.page</guid>
				<link>http://mango.serotoninsoftware.com/forum/posts/preList/249/1413.page</link>
				<pubDate><![CDATA[Mon, 15 Feb 2010 17:14:37]]> GMT</pubDate>
				<author><![CDATA[ mlohbihler]]></author>
			</item>
			<item>
				<title>MySQL database problem</title>
				<description><![CDATA[ Made the correction, dropped the mysql tables., restared app. Now works. Thanks.]]></description>
				<guid isPermaLink="true">http://mango.serotoninsoftware.com/forum/posts/preList/249/1415.page</guid>
				<link>http://mango.serotoninsoftware.com/forum/posts/preList/249/1415.page</link>
				<pubDate><![CDATA[Mon, 15 Feb 2010 19:34:10]]> GMT</pubDate>
				<author><![CDATA[ chrapchp]]></author>
			</item>
	</channel>
</rss>
