<?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/"
	>

<channel>
	<title>Ellis Giles</title>
	<atom:link href="http://zaap.com/space/egiles/feed/" rel="self" type="application/rss+xml" />
	<link>http://zaap.com/space/egiles</link>
	<description>I am, therefore I'll think (and blog)!</description>
	<pubDate>Sat, 25 Mar 2017 00:53:44 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>MySQL 5.7+ Imported Database and Log Rotate or Debian Account Error</title>
		<link>http://zaap.com/space/egiles/2017/03/24/mysql-57-imported-database-and-log-rotate-or-debian-account-error/</link>
		<comments>http://zaap.com/space/egiles/2017/03/24/mysql-57-imported-database-and-log-rotate-or-debian-account-error/#comments</comments>
		<pubDate>Sat, 25 Mar 2017 00:51:53 +0000</pubDate>
		<dc:creator>egiles</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://zaap.com/space/egiles/2017/03/24/mysql-57-imported-database-and-log-rotate-or-debian-account-error/</guid>
		<description><![CDATA[So, I imported an old database to completely replace all existing databases and user tables in a new MySQL install.
Basically a dump of all tables (including user tables) from mysqldump will dump your user table too.
mysqldump --all-databases &#62; dump.sql

So, you have a dump including all users too, and if you import them into a new [...]]]></description>
			<content:encoded><![CDATA[<p>So, I imported an old database to completely replace all existing databases and user tables in a new MySQL install.<br />
Basically a dump of all tables (including user tables) from mysqldump will dump your user table too.</p>
<p><code>mysqldump --all-databases &gt; dump.sql<br />
</code></p>
<p>So, you have a dump including all users too, and if you import them into a new mysql install it can override the new required mysql users.</p>
<p>My debian-sys-maint account got removed from a new MySQL 5.7 install and the following error was showing up in my log file:</p>
<p><span style="font-family: mceinline"><br />
<code><span style="font-family: mceinline">/etc/cron.daily/logrotate:<br />
error: error running shared postrotate script for &#8216;/var/log/mysql.log /var/log/mysql/*log &#8216;<br />
run-parts: /etc/cron.daily/logrotate exited with return code 1</span></code></span></p>
<p>So, to recreate the debian-sys-maint users, you can connect to the mysql daemon and create the user directly.<br />
Note that with 5.7, there is no password field, so you must use the newer authentication_string instead.</p>
<p>First, find the password your scripts are trying to use by:<br />
<code><br />
# more /etc/mysql/debian.cnf<br />
# Automatically generated for Debian scripts. DO NOT TOUCH!<br />
[client]<br />
host     = localhost<br />
user     = debian-sys-maint<br />
password = YOURPASSWORD<br />
socket   = /var/run/mysqld/mysqld.sock<br />
[mysql_upgrade]<br />
host     = localhost<br />
user     = debian-sys-maint<br />
password = YOURPASSWORD<br />
socket   = /var/run/mysqld/mysqld.sock<br />
</code></p>
<p>Make a note of the password field.  Next, connect to mysql, using mysql -p, and create the user, make sure to replace the YOURPASSWORD with the password copied from above.</p>
<p><code><br />
INSERT INTO `mysql`.`user` (  `Host`, `User`, `authentication_string`, `Select_priv`, `Insert_priv`, `Update_priv`, `Delete_priv`, `Create_priv`, `Drop_priv`, `Reload_priv`, `Shutdown_priv`, `Process_priv`, `File_priv`, `Grant_priv`, `References_priv`, `Index_priv`, `Alter_priv`, `Show_db_priv`, `Super_priv`, `Create_tmp_table_priv`, `Lock_tables_priv`, `Execute_priv`, `Repl_slave_priv`, `Repl_client_priv`, `Create_view_priv`, `Show_view_priv`, `Create_routine_priv`, `Alter_routine_priv`, `Create_user_priv`, `ssl_type`, `ssl_cipher`, `x509_issuer`, `x509_subject`, `max_questions`, `max_updates`, `max_connections`, `max_user_connections`<br />
) VALUES (<br />
'localhost', 'debian-sys-maint',<br />
password('YOURPASSWORD'),<br />
'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'N', 'N', 'N', 'N', 'N', '', '', '', '', 0, 0, 0, 0);<br />
FLUSH PRIVILEGES;<br />
</code></p>
<p>Hopefully, your log update will run without problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://zaap.com/space/egiles/2017/03/24/mysql-57-imported-database-and-log-rotate-or-debian-account-error/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Section Visitor Not Found</title>
		<link>http://zaap.com/space/egiles/2017/03/02/section-visitor-not-found/</link>
		<comments>http://zaap.com/space/egiles/2017/03/02/section-visitor-not-found/#comments</comments>
		<pubDate>Thu, 02 Mar 2017 20:36:59 +0000</pubDate>
		<dc:creator>egiles</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://zaap.com/space/egiles/2017/03/02/section-visitor-not-found/</guid>
		<description><![CDATA[/usr/share/awstats/tools/update.sh
Error while processing /etc/awstats/awstats.site.com.conf
Create/Update database for config "/etc/awstats/awstats.site.com.conf" by AWStats version 7.4 (build 20150714)
From data in log file "/var/log/apache2/access.log"...
Phase 1 : First bypass old records, searching new record...
Direct access to last remembered record is out of file.
So searching it from beginning of log file...
Phase 2 : Now process new records (Flush history on disk after [...]]]></description>
			<content:encoded><![CDATA[<p><code>/usr/share/awstats/tools/update.sh<br />
Error while processing /etc/awstats/awstats.site.com.conf<br />
Create/Update database for config "/etc/awstats/awstats.site.com.conf" by AWStats version 7.4 (build 20150714)<br />
From data in log file "/var/log/apache2/access.log"...<br />
Phase 1 : First bypass old records, searching new record...<br />
Direct access to last remembered record is out of file.<br />
So searching it from beginning of log file...<br />
Phase 2 : Now process new records (Flush history on disk after 20000 hosts)...<br />
Error: History file "/var/www/usage/site.com/awstats/awstats08201.6site.com.txt" is corrupted (End of section VISITOR not found).<br />
Restore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).<br />
</code></p>
<p>Note, I didn&#8217;t remove this file, but rather deleted the last few lines of corrupted data and added END_VISITOR to the last line.<br />
Additionally, you can repair the file from the raw apache access logs.</p>
]]></content:encoded>
			<wfw:commentRss>http://zaap.com/space/egiles/2017/03/02/section-visitor-not-found/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Test Page</title>
		<link>http://zaap.com/space/egiles/2014/07/16/python-connection-and-cursor-overloading-2/</link>
		<comments>http://zaap.com/space/egiles/2014/07/16/python-connection-and-cursor-overloading-2/#comments</comments>
		<pubDate>Wed, 16 Jul 2014 19:34:08 +0000</pubDate>
		<dc:creator>egiles</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://zaap.com/space/egiles/2014/07/16/python-connection-and-cursor-overloading-2/</guid>
		<description><![CDATA[Test description
]]></description>
			<content:encoded><![CDATA[<p>Test description</p>
]]></content:encoded>
			<wfw:commentRss>http://zaap.com/space/egiles/2014/07/16/python-connection-and-cursor-overloading-2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Python Connection and Cursor Overloading</title>
		<link>http://zaap.com/space/egiles/2014/07/16/python-connection-and-cursor-overloading/</link>
		<comments>http://zaap.com/space/egiles/2014/07/16/python-connection-and-cursor-overloading/#comments</comments>
		<pubDate>Wed, 16 Jul 2014 19:34:08 +0000</pubDate>
		<dc:creator>egiles</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://zaap.com/space/egiles/?p=609</guid>
		<description><![CDATA[Overloading the Python connection and cursor for databases to trace transactions can be useful when needing to obtain SQL code that is executed.  With an execute() or executemany() statement, sometimes it is helpful to grab the SQL code to test in the server directly or to be used by other programs.  So, I [...]]]></description>
			<content:encoded><![CDATA[<p>Overloading the Python connection and cursor for databases to trace transactions can be useful when needing to obtain SQL code that is executed.  With an execute() or executemany() statement, sometimes it is helpful to grab the SQL code to test in the server directly or to be used by other programs.  So, I simply override the connection and cursor classes to provide this functionality.</p>
<p>It can be used by:</p>
<p><code><br />
self.conn = Connection(sqlite3.connect(self.database))<br />
        self.cursor = self.conn.cursor()<br />
</code></p>
<p><code>fout = None</p>
<p>class Cursor():<br />
    """A wrapper for cursors to show executed queries"""</p>
<p>    def __init__(self, curs, conn):<br />
    	self.curs = curs<br />
    	self.conn = conn</p>
<p>    def printquery(self, sql, args):<br />
		s = sql<br />
		for i in range(len(args)):<br />
			#print type(args[i])<br />
			if (type(args[i]) is str) or (type(args[i]) is unicode) or (type(args[i]) is datetime):<br />
				s = s.replace(&#8221;?&#8221;,&#8221;&#8216;{}&#8217;&#8221;, 1)<br />
			else:<br />
				s = s.replace(&#8221;?&#8221;,&#8221;{}&#8221;,1)<br />
		print &gt;&gt; fout, s.format(*args), &#8220;;&#8221;</p>
<p>    def execute(self, sql, args):<br />
		self.conn.notifyexecute()<br />
		self.printquery(sql, args)<br />
		self.curs.execute(sql, args)</p>
<p>    def executemany(self, sql, tuples):<br />
		#print sql, tuples<br />
		self.conn.notifyexecute()<br />
		for i in range(len(tuples)):<br />
			self.printquery(sql, tuples[i])<br />
		self.curs.executemany(sql, tuples)</p>
<p>    def fetchall(self):<br />
    	return self.curs.fetchall()</p>
<p>    def fetchone(self):<br />
    	return self.curs.fetchone()</p>
<p>class Connection():<br />
	&#8220;&#8221;"A wrapper for connections to show executed transactions&#8221;"&#8221;</p>
<p>	def __init__(self, conn):<br />
		self.conn = conn<br />
		self.tx = 0</p>
<p>	def cursor(self):<br />
		return Cursor(self.conn.cursor(), self)</p>
<p>	def commit(self):<br />
		print &gt;&gt; fout, &#8220;COMMIT;&#8221;<br />
		print &gt;&gt; fout, &#8220;&#8221;<br />
		self.tx = 0<br />
		return self.conn.commit()</p>
<p>	def notifyexecute(self):<br />
		if self.tx == 0:<br />
			self.tx = 1<br />
			print &gt;&gt; fout, &#8220;BEGIN;&#8221;</p>
<p></code></p>
]]></content:encoded>
			<wfw:commentRss>http://zaap.com/space/egiles/2014/07/16/python-connection-and-cursor-overloading/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Compile and Build wget on Mac OSX 10.6.8</title>
		<link>http://zaap.com/space/egiles/2013/12/30/compile-and-build-wget-on-mac-osx-1068/</link>
		<comments>http://zaap.com/space/egiles/2013/12/30/compile-and-build-wget-on-mac-osx-1068/#comments</comments>
		<pubDate>Mon, 30 Dec 2013 23:43:01 +0000</pubDate>
		<dc:creator>egiles</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://zaap.com/space/egiles/?p=597</guid>
		<description><![CDATA[You will need to make and install open ssl first.
curl -O http://ftp.gnu.org/gnu/wget/wget-1.14.tar.gz
tar -zxvf wget-1.14.tar.gz
cd wget-1.14/
./configure &#8211;with-ssl=openssl
make
su
make install
]]></description>
			<content:encoded><![CDATA[<p>You will need to make and install open ssl first.</p>
<p>curl -O http://ftp.gnu.org/gnu/wget/wget-1.14.tar.gz<br />
tar -zxvf wget-1.14.tar.gz<br />
cd wget-1.14/<br />
./configure &#8211;with-ssl=openssl<br />
make<br />
su<br />
make install</p>
]]></content:encoded>
			<wfw:commentRss>http://zaap.com/space/egiles/2013/12/30/compile-and-build-wget-on-mac-osx-1068/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Great Hubble Space Telescope Photos</title>
		<link>http://zaap.com/space/egiles/2013/02/13/great-hubble-space-telescope-photos/</link>
		<comments>http://zaap.com/space/egiles/2013/02/13/great-hubble-space-telescope-photos/#comments</comments>
		<pubDate>Wed, 13 Feb 2013 22:54:16 +0000</pubDate>
		<dc:creator>egiles</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://zaap.com/space/egiles/?p=593</guid>
		<description><![CDATA[http://www.theatlantic.com/infocus/2012/11/2012-hubble-space-telescope-advent-calendar/100415/?utm_source=Sailthru&#38;utm_term=Very%20Short%20List%20-%20Daily
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.theatlantic.com/infocus/2012/11/2012-hubble-space-telescope-advent-calendar/100415/?utm_source=Sailthru&amp;utm_term=Very%20Short%20List%20-%20Daily">http://www.theatlantic.com/infocus/2012/11/2012-hubble-space-telescope-advent-calendar/100415/?utm_source=Sailthru&amp;utm_term=Very%20Short%20List%20-%20Daily</a></p>
]]></content:encoded>
			<wfw:commentRss>http://zaap.com/space/egiles/2013/02/13/great-hubble-space-telescope-photos/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Shuttle Endeavour is in Houston</title>
		<link>http://zaap.com/space/egiles/2012/09/19/shuttle-endeavour-is-in-houston/</link>
		<comments>http://zaap.com/space/egiles/2012/09/19/shuttle-endeavour-is-in-houston/#comments</comments>
		<pubDate>Thu, 20 Sep 2012 03:30:55 +0000</pubDate>
		<dc:creator>egiles</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://zaap.com/space/egiles/?p=586</guid>
		<description><![CDATA[Shuttle Endeavour flew over JSC several times this morning!  Everyone got some great pictures and video.
Grand D. brought Alden and Meredith down to Ellington to meet me after they got done with school and we braved the crowds and got to see the shuttle piggyback on the SCA!
The Space Shuttle Endeavour, atop the Shuttle Carrier [...]]]></description>
			<content:encoded><![CDATA[<p class="p1">Shuttle Endeavour flew over JSC several times this morning!  Everyone got some great pictures and video.</p>
<p class="p1">Grand D. brought Alden and Meredith down to Ellington to meet me after they got done with school and we braved the crowds and got to see the shuttle piggyback on the SCA!</p>
<p class="p1">The Space Shuttle Endeavour, atop the Shuttle Carrier Aircraft (SCA), took off from the Kennedy Space Center at 6:22 a.m. CDT today en route to a planned overnight stop at Ellington Field in Houston. The SCA/Endeavour is expected to arrive in the Houston area around 9 a.m. CDT and fly at about 1,500 feet altitude above various areas of the city, including downtown, Reliant Park, the San Jacinto monument. The specific route and timing of Endeavour&#8217;s flight will depend on weather and operational constraints. Landing at Ellington is expected at about 10:45 a.m. Endeavour is planned to depart for California on Thursday, Sept. 20.</p>
<p class="p1"><a href="https://io.jsc.nasa.gov/app/browse.cfm?cid=37262">https://io.jsc.nasa.gov/app/browse.cfm?cid=37262</a></p>
<p class="p1">
<p><div id="attachment_587" class="wp-caption alignright" style="width: 1290px"><img class="size-full wp-image-587" src="http://zaap.com/space/egiles/files/2012/09/shuttle_grey_med.jpg" alt="Shuttle Endeavour Flyover" width="1280" height="1024" /><p class="wp-caption-text">Shuttle Endeavour Flyover</p></div></p>
<p class="p1">
]]></content:encoded>
			<wfw:commentRss>http://zaap.com/space/egiles/2012/09/19/shuttle-endeavour-is-in-houston/feed/</wfw:commentRss>
		</item>
		<item>
		<title>PI&amp;C Award</title>
		<link>http://zaap.com/space/egiles/2012/08/30/pic-award/</link>
		<comments>http://zaap.com/space/egiles/2012/08/30/pic-award/#comments</comments>
		<pubDate>Thu, 30 Aug 2012 17:06:47 +0000</pubDate>
		<dc:creator>egiles</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://zaap.com/space/egiles/?p=590</guid>
		<description><![CDATA[I received an award for assisting in coming up with ideas to work around some problems in software when upgrading the ISS IPF from http to https.
]]></description>
			<content:encoded><![CDATA[<p>I received an award for assisting in coming up with ideas to work around some problems in software when upgrading the ISS IPF from http to https.</p>
<p><div id="attachment_591" class="wp-caption alignright" style="width: 1234px"><img class="size-full wp-image-591" src="http://zaap.com/space/egiles/files/2012/09/20120830_143139.jpg" alt="ISS PI&amp;C Award" width="1224" height="1632" /><p class="wp-caption-text">ISS PI&amp;C Award</p></div></p>
]]></content:encoded>
			<wfw:commentRss>http://zaap.com/space/egiles/2012/08/30/pic-award/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Transit of Venus</title>
		<link>http://zaap.com/space/egiles/2012/08/10/transit-of-venus/</link>
		<comments>http://zaap.com/space/egiles/2012/08/10/transit-of-venus/#comments</comments>
		<pubDate>Fri, 10 Aug 2012 21:26:44 +0000</pubDate>
		<dc:creator>egiles</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://zaap.com/space/egiles/?p=552</guid>
		<description><![CDATA[I went home early to show the kids the transit of Venus.  We found their magnifying glass and some white cardboard and went outside.  We held the glass up to the sun and the paper a few feet away and got a nice projection of the sun onto the paper.  Alden, Meredith, Grand D., and [...]]]></description>
			<content:encoded><![CDATA[<p><div id="attachment_559" class="wp-caption alignnone" style="width: 210px"><img class="size-full wp-image-559 " src="http://zaap.com/space/egiles/files/2012/06/venus-transit-2012-times.jpg" alt="Transit of Venus 2012" width="200" height="200" /><p class="wp-caption-text">Transit of Venus 2012</p></div></p>
<p>I went home early to show the kids the transit of Venus.  We found their magnifying glass and some white cardboard and went outside.  We held the glass up to the sun and the paper a few feet away and got a nice projection of the sun onto the paper.  Alden, Meredith, Grand D., and I could venus in the upper left corner of the bright circle of the sun projected onto the paper.  Of course it&#8217;s on the opposite side from the picture since we were looking at it from a right to left reflection point of view, ie from behind the rays.</p>
<p>It&#8217;s the last transit of Venus for a century!  Glad we got to see it!  This reminds me of when I was in middle school.  We all went outside to see the eclipse.  We all punched a small hole in a piece of paper, folded it in half, and projected the sun onto the other side.  We each watched on our own paper as the sun was partially covered by the moon.  Very cool, and such a good memory.</p>
<p>Here are some more Venus transit links:</p>
<p><a href="http://spaceref.com/venus/">http://spaceref.com/venus/ </a></p>
<p><a href="http://www.spaceref.com/news/viewpr.html?pid=37301">http://www.spaceref.com/news/viewpr.html?pid=37301</a></p>
]]></content:encoded>
			<wfw:commentRss>http://zaap.com/space/egiles/2012/08/10/transit-of-venus/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Morpheus Lander Explodes</title>
		<link>http://zaap.com/space/egiles/2012/08/10/morpheus-lander-explodes/</link>
		<comments>http://zaap.com/space/egiles/2012/08/10/morpheus-lander-explodes/#comments</comments>
		<pubDate>Fri, 10 Aug 2012 21:15:54 +0000</pubDate>
		<dc:creator>egiles</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://zaap.com/space/egiles/?p=575</guid>
		<description><![CDATA[Very sad day for Morpheus&#8230;.
http://www.cfnews13.com/content/news/cfnews13/video.html?clip=http://static.cfnews13.com/newsvideo/cfn/MorpheusExplosion0809.flv
http://news.cnet.com/8301-11386_3-57490372-76/nasas-morpheus-moon-lander-crashes-and-burns/
]]></description>
			<content:encoded><![CDATA[<p>Very sad day for Morpheus&#8230;.</p>
<p><a href="http://www.cfnews13.com/content/news/cfnews13/video.html?clip=http://static.cfnews13.com/newsvideo/cfn/MorpheusExplosion0809.flv">http://www.cfnews13.com/content/news/cfnews13/video.html?clip=http://static.cfnews13.com/newsvideo/cfn/MorpheusExplosion0809.flv</a></p>
<p><a href="http://news.cnet.com/8301-11386_3-57490372-76/nasas-morpheus-moon-lander-crashes-and-burns/">http://news.cnet.com/8301-11386_3-57490372-76/nasas-morpheus-moon-lander-crashes-and-burns/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://zaap.com/space/egiles/2012/08/10/morpheus-lander-explodes/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
