<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>A Problem Shared . . . &#187; Databases</title>
	<atom:link href="http://www.moorlandit.net/index.php/category/databases/feed" rel="self" type="application/rss+xml" />
	<link>http://www.moorlandit.net</link>
	<description>A blog of problems . . . and solutions</description>
	<lastBuildDate>Thu, 19 Aug 2010 15:18:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Deleting Microsoft SQL Server 2000 from Windows 7 Sync Center</title>
		<link>http://www.moorlandit.net/index.php/2009/07/deleting-microsoft-sql-server-2000-from-windows-7-sync-center-99?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=deleting-microsoft-sql-server-2000-from-windows-7-sync-center</link>
		<comments>http://www.moorlandit.net/index.php/2009/07/deleting-microsoft-sql-server-2000-from-windows-7-sync-center-99#comments</comments>
		<pubDate>Tue, 14 Jul 2009 13:28:51 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[Windows 7]]></category>
		<category><![CDATA[Sync Center]]></category>

		<guid isPermaLink="false">http://www.moorlandit.net/?p=99</guid>
		<description><![CDATA[If you have to install Microsoft SQL Server 2000 on Windows 7 you&#8217;ll find that Windows Sync Center automatically starts at Windows startup. Opening Sync Center will show that Microsoft SQL Server 2000 has been automatically added and cannot be deleted. To remove this sync partnership you need to edit the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SyncMgr\Handlers Find [...]]]></description>
			<content:encoded><![CDATA[<p>If you have to install Microsoft SQL Server 2000 on Windows 7 you&#8217;ll find that Windows Sync Center automatically starts at Windows startup. Opening Sync Center will show that Microsoft SQL Server 2000 has been automatically added and cannot be deleted.</p>
<p>To remove this sync partnership you need to edit the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SyncMgr\Handlers</p>
<p>Find the branch that refers to Microsoft SQL Server and delete it. Sync Center should then not start up again at reboot (unless you have have other Sync Partnerships).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.moorlandit.net/index.php/2009/07/deleting-microsoft-sql-server-2000-from-windows-7-sync-center-99/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP mssql_connect() unable to connect to server</title>
		<link>http://www.moorlandit.net/index.php/2008/11/php-mssql_connect-unable-to-connect-to-server-78?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=php-mssql_connect-unable-to-connect-to-server</link>
		<comments>http://www.moorlandit.net/index.php/2008/11/php-mssql_connect-unable-to-connect-to-server-78#comments</comments>
		<pubDate>Wed, 12 Nov 2008 09:47:27 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[php mssql]]></category>

		<guid isPermaLink="false">http://www.moorlandit.net/?p=78</guid>
		<description><![CDATA[Running PHP on a Windows 2003 Server and connecting to Microsoft SQL Server 2000 Service Pack 4 we found that sometimes the PHP script could connect to the SQL Server but most of the time we&#8217;d get &#8216;mssql_connect() unable to connect to server&#8217;. After Googling the problem I found a lot of references to needing [...]]]></description>
			<content:encoded><![CDATA[<p>Running PHP on a Windows 2003 Server and connecting to Microsoft SQL Server 2000 Service Pack 4 we found that sometimes the PHP script could connect to the SQL Server but most of the time we&#8217;d get &#8216;mssql_connect() unable to connect to server&#8217;.</p>
<p>After Googling the problem I found a lot of references to needing NTWDBLIB.DLL version 2000.80.194.0 rather than the 2000.2.8.0 version that ships with PHP. I copied the DLL from with Windows\system32 folder to the PHP folder and that fixed the problem, for 2minutes! &#8211; then we were back to &#8216;mssql_connect() unable to connect to server&#8217;.</p>
<p>I also saw lots of references to Named Pipes and TCP/IP connections so I went into the SQL Server Client Network Utility. Both Named Pipes and TCP/IP were enabled so I changed the protocol order to move Named Pipes above TCP/IP and that fixed the problem &#8211; permanently.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.moorlandit.net/index.php/2008/11/php-mssql_connect-unable-to-connect-to-server-78/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Losing data on MySQL SQL restore</title>
		<link>http://www.moorlandit.net/index.php/2008/09/losing-data-on-mysql-sql-restore-62?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=losing-data-on-mysql-sql-restore</link>
		<comments>http://www.moorlandit.net/index.php/2008/09/losing-data-on-mysql-sql-restore-62#comments</comments>
		<pubDate>Fri, 19 Sep 2008 15:08:28 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.moorlandit.net/?p=62</guid>
		<description><![CDATA[I recently had to backup and restore a MySQL database so I dumped the whole database into a SQL file but when I came to restore I found that in one of the biggest tables a lot of the data was missing. Looking at the warnings when I ran the restore query I found I [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had to backup and restore a MySQL database so I dumped the whole database into a SQL file but when I came to restore I found that in one of the biggest tables a lot of the data was missing.</p>
<p>Looking at the warnings when I ran the restore query I found I had:</p>
<p>           Error Code: 2006 &#8211; MySQL server has gone away</p>
<p>I looked up this error and it seems the MySQL server&#8217;s max_allowed_packet setting was too low compared to the size of bulk inserts that the restore file was trying to do.</p>
<p>I increased the max_allowed_packet setting to 16M and ran it again and all was well!</p>
<p>See <a href="http://dev.mysql.com/doc/refman/5.0/en/packet-too-large.html">http://dev.mysql.com/doc/refman/5.0/en/packet-too-large.html</a> for details.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.moorlandit.net/index.php/2008/09/losing-data-on-mysql-sql-restore-62/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Microsoft Access &amp; MySQL &#8211; Lock Violations</title>
		<link>http://www.moorlandit.net/index.php/2008/09/microsoft-access-mysql-lock-violations-60?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=microsoft-access-mysql-lock-violations</link>
		<comments>http://www.moorlandit.net/index.php/2008/09/microsoft-access-mysql-lock-violations-60#comments</comments>
		<pubDate>Tue, 16 Sep 2008 11:54:50 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[Access MySQL Lock]]></category>

		<guid isPermaLink="false">http://www.moorlandit.net/?p=60</guid>
		<description><![CDATA[One issue I&#8217;ve found using Microsoft Access as a front end to MySQL is that when running an update query I often got an error saying the record was not updated due to a lock violation. It turns out if the data Access is updating is the same as the existing values then it gives [...]]]></description>
			<content:encoded><![CDATA[<p>One issue I&#8217;ve found using Microsoft Access as a front end to MySQL is that when running an update query I often got an error saying the record was not updated due to a lock violation. It turns out if the data Access is updating is the same as the existing values then it gives this message, for instance if you wee trying to set a column value to 1 and the column value was already 1.</p>
<p>I&#8217;ve found two ways around this: Firstly you could loop through the records to be updated and check if the values actually do need updating or simply suppress the warning in VBA code using docmd.showwarnings false followed by docmd.showwarnings true after running the query.</p>
<p>This would however suppress all warnings whilst the query is running so if there are any other errors you won&#8217; know about it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.moorlandit.net/index.php/2008/09/microsoft-access-mysql-lock-violations-60/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Step by Step MySQL Replication</title>
		<link>http://www.moorlandit.net/index.php/2008/09/step-by-step-mysql-replication-47?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=step-by-step-mysql-replication</link>
		<comments>http://www.moorlandit.net/index.php/2008/09/step-by-step-mysql-replication-47#comments</comments>
		<pubDate>Fri, 05 Sep 2008 14:24:15 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.moorlandit.net/?p=47</guid>
		<description><![CDATA[Here&#8217;s a quick checklist on how to setup replication. http://docs.hp.com/en/5991-7432/ar01s05.html gives more information. First on the master server&#8217;s my.cnf or my.ini file comment out these lines: #skip-networking #bind-address            = 127.0.0.1 Then in the [mysqld] section add: log-bin=mysql-bin server-id=1 Then restart MySQL with /etc/init.d/mysql restart Now create a user on the master that the slave can use to [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a quick checklist on how to setup replication.</p>
<p><a href="http://docs.hp.com/en/5991-7432/ar01s05.html">http://docs.hp.com/en/5991-7432/ar01s05.html</a> gives more information.</p>
<p>First on the master server&#8217;s my.cnf or my.ini file comment out these lines:</p>
<blockquote><p>#skip-networking<br />
#bind-address            = 127.0.0.1</p></blockquote>
<p>Then in the [mysqld] section add:</p>
<blockquote><p>log-bin=mysql-bin</p>
<p>server-id=1</p></blockquote>
<p>Then restart MySQL with</p>
<blockquote><p>/etc/init.d/mysql restart</p></blockquote>
<p>Now create a user on the master that the slave can use to connect:</p>
<blockquote><p>GRANT REPLICATION SLAVE ON *.* TO &#8216;slave_user&#8217;@'%&#8217; IDENTIFIED BY &#8216;&lt;SOME PASSWORD&gt;&#8217;;</p>
<p>GRANT REPLICATION CLIENT ON *.* TO &#8216;slave_user&#8217;@'%&#8217;;</p></blockquote>
<p>Then get the master status with:</p>
<blockquote><p>FLUSH PRIVILEGES;</p>
<p>USE exampledb;</p>
<p>FLUSH TABLES WITH READ LOCK;</p>
<p>SHOW MASTER STATUS;</p></blockquote>
<p>Make a note of log file name and position &#8211; you&#8217;ll need it later. Then backup the master database and restore to the slave or copy it using SQLYog.</p>
<p>Then add to the slave&#8217;s my.cnf or my.ini file:</p>
<blockquote><p>server-id=2 </p></blockquote>
<p>and restart the slave MySQL server then execute:</p>
<blockquote><p>STOP SLAVE;</p>
<p>CHANGE MASTER TO </p>
<p>MASTER_HOST=&#8217;&lt;MASTER IP ADDRESS&gt;&#8217;,</p>
<p>MASTER_USER=&#8217;slave_user&#8217;,</p>
<p>MASTER_PASSWORD=&#8217;XXXXX&#8217;,</p>
<p>MASTER_LOG_FILE=&#8217;mysql-bin.000001&#8242;,</p>
<p>MASTER_LOG_POS=98;</p>
<p>START SLAVE;</p></blockquote>
<p>Sorry if this is short on detail but this is just my experience on how to get replication working, the detail can be Googled elsewhere <img src='http://www.moorlandit.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.moorlandit.net/index.php/2008/09/step-by-step-mysql-replication-47/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL remote connection problems</title>
		<link>http://www.moorlandit.net/index.php/2008/09/mysql-remote-connection-problems-41?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=mysql-remote-connection-problems</link>
		<comments>http://www.moorlandit.net/index.php/2008/09/mysql-remote-connection-problems-41#comments</comments>
		<pubDate>Fri, 05 Sep 2008 09:05:19 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.moorlandit.net/?p=41</guid>
		<description><![CDATA[I&#8217;ve been experimenting with running MySQL on different operating systems and LAMP/WAMP/OAMP platforms and as I always wanted to connect to the database server from a PC on my LAN I have kept coming across connection errors. So far I&#8217;ve figured out that the following steps fix most of the connection issues. I should say [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been experimenting with running MySQL on different operating systems and LAMP/WAMP/OAMP platforms and as I always wanted to connect to the database server from a PC on my LAN I have kept coming across connection errors.</p>
<p>So far I&#8217;ve figured out that the following steps fix most of the connection issues. I should say that these connection errors are not really errors but due to MySQL being locked down for security. I&#8217;m not advising anyone to take these steps on a production server until they&#8217;ve researched the implications but for me experimenting with lots of different MySQL installs safely behind my company firewall it&#8217;s a quick fix to get started.</p>
<p><strong>1. IP Binding</strong></p>
<p>Most default MySQL installs seem to lock the server down to only accept connections from the localhost 127.0.0.1 address. If you want to access the MySQL server from anywhere else you&#8217;ll have to edit this line in the my.cnf or my.ini file:</p>
<blockquote><p>bind-address=127.0.0.1</p></blockquote>
<p>I usually just enter a # at the beginning of the line for a quick and dirty fix but you might want to look into more secure options on a production server.</p>
<p><strong>2. Allowed users and hosts</strong></p>
<p>Secondly most MySQL installs only allow the root user to connect from certain hosts. The quick and dirty fix for this is to add a wildcard hosts entry for the root user. To do this at the command line type:</p>
<blockquote><p> <code>mysql --user=root mysql</code></p></blockquote>
<p>or if there is a root password try:</p>
<blockquote><p> <code>mysql --user=root --password=some_pass mysql</code></p></blockquote>
<p>Then at the mysql prompt type:</p>
<blockquote><p>mysql&gt; <code>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'</code><br />
    -&gt;     <code>IDENTIFIED BY 'some_pass' WITH GRANT OPTION;</code> </p></blockquote>
<p>That gets me remote root access on just about every installation I&#8217;ve tried so far. There are probably easier ways to do it on Windows but as most of the test rigs I&#8217;ve setup have had some flavour or Linu/BSD on them the command line was all I had!</p>
<p>If any MySQL Gurus want to comment they&#8217;re welcome &#8211; As I said these are quick solutions to get me remote access to a lot of MySQL servers I was rapidly setting up and testing with no thought to security!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.moorlandit.net/index.php/2008/09/mysql-remote-connection-problems-41/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL System Tray Monitor and Windows Vista</title>
		<link>http://www.moorlandit.net/index.php/2008/09/mysql-system-tray-monitor-and-windows-vista-35?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=mysql-system-tray-monitor-and-windows-vista</link>
		<comments>http://www.moorlandit.net/index.php/2008/09/mysql-system-tray-monitor-and-windows-vista-35#comments</comments>
		<pubDate>Tue, 02 Sep 2008 09:25:46 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.moorlandit.net/?p=35</guid>
		<description><![CDATA[I&#8217;ve installed MySQL server on Windows Vista and installed the MySQL GUI tools. I found a problem with the MySQL System Tray Monitor though &#8211; it seemed unable to stop, start or restart the MySQL service and would not allow me to save any changes I made to the MySQL instance configuration. Whenever I tried to [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve installed MySQL server on Windows Vista and installed the MySQL GUI tools. I found a problem with the MySQL System Tray Monitor though &#8211; it seemed unable to stop, start or restart the MySQL service and would not allow me to save any changes I made to the MySQL instance configuration. Whenever I tried to stop the service through the system tray monitor I got the error &#8216;Could not stop service&#8217;.</p>
<p>The resolution I found was to run MySQL System Tray Monitor as Administrator &#8211; this way it has full control over the MySQL services and configuration. Problem solved!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.moorlandit.net/index.php/2008/09/mysql-system-tray-monitor-and-windows-vista-35/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
