<?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>mobile and gis dev notes &#187; mysql</title>
	<atom:link href="http:///wordpress/tag/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>/wordpress</link>
	<description>by rupert</description>
	<lastBuildDate>Wed, 08 Feb 2012 22:26:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>homebrew + mysql = installed but access denied for root</title>
		<link>/wordpress/2011/11/homebrew-mysql-access-denied-for-root/</link>
		<comments>/wordpress/2011/11/homebrew-mysql-access-denied-for-root/#comments</comments>
		<pubDate>Mon, 14 Nov 2011 02:21:10 +0000</pubDate>
		<dc:creator>rupert</dc:creator>
				<category><![CDATA[homebrew]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[osx]]></category>

		<guid isPermaLink="false">/wordpress/?p=1090</guid>
		<description><![CDATA[1. Cleanup I have an existing mysql @ /usr/local/mysql, so we remove that. % sudo rm -rf mysql-5.1.43-osx10.6-x86_64 Note: I suggest you backup your mysql data by doing mysqldump prior to removing the old mysql. 2. Install mysql #brew install mysql Set up databases to run AS YOUR USER ACCOUNT with: unset TMPDIR mysql_install_db --verbose [...]]]></description>
			<content:encoded><![CDATA[<p><strong>1. Cleanup</strong><br />
I have an existing mysql @ /usr/local/mysql, so we remove that.</p>

<div class="wp_syntax"><div class="code"><pre class="terminal" style="font-family:monospace;">% sudo rm -rf mysql-5.1.43-osx10.6-x86_64</pre></div></div>

<p>Note: I suggest you backup your mysql data by doing mysqldump prior to removing the old mysql.</p>
<p><strong>2. Install mysql</strong></p>

<div class="wp_syntax"><div class="code"><pre class="terminal" style="font-family:monospace;">#brew install mysql
Set up databases to run AS YOUR USER ACCOUNT with:
    unset TMPDIR
    mysql_install_db --verbose --user=`whoami` --basedir=&quot;$(brew --prefix mysql)&quot; --datadir=/usr/local/var/mysql --tmpdir=/tmp
&nbsp;
To set up base tables in another folder, or use a different user to run
mysqld, view the help for mysqld_install_db:
    mysql_install_db --help
&nbsp;
and view the MySQL documentation:
  * http://dev.mysql.com/doc/refman/5.5/en/mysql-install-db.html
  * http://dev.mysql.com/doc/refman/5.5/en/default-privileges.html
&nbsp;
To run as, for instance, user &quot;mysql&quot;, you may need to `sudo`:
    sudo mysql_install_db ...options...
&nbsp;
Start mysqld manually with:
    mysql.server start
&nbsp;
    Note: if this fails, you probably forgot to run the first two steps up above
&nbsp;
A &quot;/etc/my.cnf&quot; from another install may interfere with a Homebrew-built
server starting up correctly.
&nbsp;
To connect:
    mysql -uroot
&nbsp;
To launch on startup:
* if this is your first install:
    mkdir -p ~/Library/LaunchAgents
    cp /usr/local/Cellar/mysql/5.5.15/com.mysql.mysqld.plist ~/Library/LaunchAgents/
    launchctl load -w ~/Library/LaunchAgents/com.mysql.mysqld.plist
&nbsp;
* if this is an upgrade and you already have the com.mysql.mysqld.plist loaded:
    launchctl unload -w ~/Library/LaunchAgents/com.mysql.mysqld.plist
    cp /usr/local/Cellar/mysql/5.5.15/com.mysql.mysqld.plist ~/Library/LaunchAgents/
    launchctl load -w ~/Library/LaunchAgents/com.mysql.mysqld.plist
&nbsp;
You may also need to edit the plist to use the correct &quot;UserName&quot;.
&nbsp;
Warning: m4 macros were installed to &quot;share/aclocal&quot;.
Homebrew does not append &quot;/usr/local/share/aclocal&quot;
to &quot;/usr/share/aclocal/dirlist&quot;. If an autoconf script you use
requires these m4 macros, you'll need to add this path manually.
==&gt; Summary
/usr/local/Cellar/mysql/5.5.15: 6277 files, 217M, built in 4.9 minutes
brew install mysql  498.39s user 83.40s system 135% cpu 7:08.37 total</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="terminal" style="font-family:monospace;">~/Desktop% unset TMPDIR
~/Desktop% echo $TMPDIR
&nbsp;
~/Desktop% mysql_install_db --verbose --user=`whoami` --basedir=&quot;$(brew --prefix mysql)&quot; --datadir=/usr/local/var/mysql --tmpdir=/tmp
Installing MySQL system tables...
OK
Filling help tables...
OK
&nbsp;
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
&nbsp;
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
&nbsp;
/usr/local/Cellar/mysql/5.5.15/bin/mysqladmin -u root password 'new-password'
/usr/local/Cellar/mysql/5.5.15/bin/mysqladmin -u root -h rupert-imac password 'new-password'
&nbsp;
Alternatively you can run:
/usr/local/Cellar/mysql/5.5.15/bin/mysql_secure_installation
&nbsp;
which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.
&nbsp;
See the manual for more instructions.
&nbsp;
You can start the MySQL daemon with:
cd /usr/local/Cellar/mysql/5.5.15 ; /usr/local/Cellar/mysql/5.5.15/bin/mysqld_safe &amp;
&nbsp;
You can test the MySQL daemon with mysql-test-run.pl
cd /usr/local/Cellar/mysql/5.5.15/mysql-test ; perl mysql-test-run.pl
&nbsp;
Please report any problems with the /usr/local/Cellar/mysql/5.5.15/scripts/mysqlbug script!</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="terminal" style="font-family:monospace;">~/Desktop% which mysql.server
/usr/local/bin/mysql.server
~/Desktop% ls -la `which mysql.server`
lrwxr-xr-x  1 rupert  admin  39 30 Dec 11:20 /usr/local/bin/mysql.server@ -&gt; ../Cellar/mysql/5.5.15/bin/mysql.server
~/Desktop% mysql.server start
Starting MySQL
.. SUCCESS!</pre></div></div>

<p><strong>3. That&#8217;s it? No.</strong> </p>
<p>At the time of writing this, mysql is at 5.5 and was installed successfully by homebrew. However, I cannot login using the root account. Have a read of this <a href="http://stackoverflow.com/questions/4359131/brew-install-mysql-on-mac-os">stackoverflow: brew install mysql on mac os</a>.</p>
<p>To fix this, stop mysql</p>

<div class="wp_syntax"><div class="code"><pre class="terminal" style="font-family:monospace;">launchctl unload -w ~/Library/LaunchAgents/com.mysql.mysqld.plist</pre></div></div>

<p>and start mysql by skipping the grant tables.</p>

<div class="wp_syntax"><div class="code"><pre class="terminal" style="font-family:monospace;">mysqld_safe --skip-grant-tables</pre></div></div>

<p>Depending if you have a record in mysql.user (select * from mysql.user), then you can either create or update the user.</p>
<p>create:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">GRANT</span> <span style="color: #993333; font-weight: bold;">ALL</span> PRIVILEGES <span style="color: #993333; font-weight: bold;">ON</span> <span style="color: #66cc66;">.</span> <span style="color: #993333; font-weight: bold;">TO</span> <span style="color: #ff0000;">'root'</span>@<span style="color: #ff0000;">'localhost'</span> <span style="color: #993333; font-weight: bold;">IDENTIFIED</span> <span style="color: #993333; font-weight: bold;">BY</span> <span style="color: #ff0000;">'whatever'</span> <span style="color: #993333; font-weight: bold;">WITH</span> <span style="color: #993333; font-weight: bold;">GRANT</span> <span style="color: #993333; font-weight: bold;">OPTION</span>;
<span style="color: #993333; font-weight: bold;">FLUSH</span> PRIVILEGES;</pre></div></div>

<p>update:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">UPDATE</span> mysql<span style="color: #66cc66;">.</span>user <span style="color: #993333; font-weight: bold;">SET</span> Password <span style="color: #66cc66;">=</span> PASSWORD<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'NewPassword'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">WHERE</span> User<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'root'</span>;
<span style="color: #993333; font-weight: bold;">FLUSH</span> PRIVILEGES;</pre></div></div>

<p><strong>4. Cleanup paths</strong><br />
This is just removing the pgsql and mysql from the current path</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PATH</span>=<span style="color: #007800;">$PATH</span>:<span style="color: #007800;">$ORACLE_HOME</span>:<span style="color: #007800;">$MYSQL_HOME</span><span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #007800;">$CLANG_HOME</span>:<span style="color: #007800;">$ANDROID_HOME</span><span style="color: #000000; font-weight: bold;">/</span>tools:<span style="color: #007800;">$APACHE2_HOME</span><span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #007800;">$MAGICK_HOME</span><span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #007800;">$SPHINX_HOME</span><span style="color: #000000; font-weight: bold;">/</span>bin:<span style="color: #007800;">$PGSQL_HOME</span><span style="color: #000000; font-weight: bold;">/</span>bin</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>/wordpress/2011/11/homebrew-mysql-access-denied-for-root/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>how to use a schema name in mysql2psql</title>
		<link>/wordpress/2011/08/migrating-from-mysql-to-postgres/</link>
		<comments>/wordpress/2011/08/migrating-from-mysql-to-postgres/#comments</comments>
		<pubDate>Mon, 08 Aug 2011 02:07:23 +0000</pubDate>
		<dc:creator>rupert</dc:creator>
				<category><![CDATA[mysql]]></category>
		<category><![CDATA[postgres]]></category>

		<guid isPermaLink="false">/wordpress/?p=1009</guid>
		<description><![CDATA[Below is a summary of my experiences with migrating from MySQL to Postgres using mysql2psql &#8211; https://github.com/maxlapshin/mysql2postgres %gem install mysql2psql To migrate a &#8220;tsa&#8221; database from mysql to postgres, create a tsa.yml mysql: hostname: localhost port: 3306 socket: /tmp/mysql.sock username: dbadmin password: password database: tsa &#160; destination: # if file is given, output goes to [...]]]></description>
			<content:encoded><![CDATA[<p>Below is a summary of my experiences with migrating from MySQL to Postgres using <strong>mysql2psql &#8211; <a href="https://github.com/maxlapshin/mysql2postgres">https://github.com/maxlapshin/mysql2postgres</a></strong></p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">%</span>gem <span style="color: #c20cb9; font-weight: bold;">install</span> mysql2psql</pre></div></div>

<p>To migrate a &#8220;tsa&#8221; database from mysql to postgres, create a tsa.yml</p>

<div class="wp_syntax"><div class="code"><pre class="yml" style="font-family:monospace;">mysql:
 hostname: localhost
 port: 3306 
 socket: /tmp/mysql.sock
 username: dbadmin 
 password: password
 database: tsa
&nbsp;
destination:
 # if file is given, output goes to file, else postgres
 #file: tsa.dump
 postgres:
  hostname: localhost
  port: 5432 
  database: tsa:hotels #database_name:schema_name
  username: dbadmin
  password: password
&nbsp;
# if tables is given, only the listed tables will be converted.  leave empty to convert all tables.
#tables:
#- table1
#- table2
# if exclude_tables is given, exclude the listed tables from the conversion.
#exclude_tables:
#- table3
#- table4
&nbsp;
# if supress_data is true, only the schema definition will be exported/migrated, and not the data
supress_data: false
&nbsp;
# if supress_ddl is true, only the data will be exported/imported, and not the schema
supress_ddl: false
&nbsp;
# if force_truncate is true, forces a table truncate before table loading
force_truncate: false</pre></div></div>

<p>Run.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">%</span>mysql2psql tsa.yml</pre></div></div>

<p>References:<br />
<a href="http://en.wikibooks.org/wiki/Converting_MySQL_to_PostgreSQL">http://en.wikibooks.org/wiki/Converting_MySQL_to_PostgreSQL</a></p>
]]></content:encoded>
			<wfw:commentRss>/wordpress/2011/08/migrating-from-mysql-to-postgres/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debian MySQL</title>
		<link>/wordpress/2007/10/debian-mysql/</link>
		<comments>/wordpress/2007/10/debian-mysql/#comments</comments>
		<pubDate>Mon, 29 Oct 2007 22:21:27 +0000</pubDate>
		<dc:creator>rupert</dc:creator>
				<category><![CDATA[debian]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">/wordpress/?p=110</guid>
		<description><![CDATA[A default install of mysql on debian would have bind-address set to 127.0.0.1. This is why you can&#8217;t accept remote connections to your mysql. In order to establish remote connections to mysql on debian servers, please comment the bind-address as shown below. 42 language = /usr/share/mysql/english 43 skip-external-locking 44 # 45 # Instead of skip-networking [...]]]></description>
			<content:encoded><![CDATA[<p>A default install of mysql on debian would have bind-address set to 127.0.0.1. This is why you can&#8217;t accept remote connections to your mysql. In order to establish remote connections to mysql on debian servers, please comment the bind-address as shown below.</p>

<div class="wp_syntax"><div class="code"><pre class="conf" style="font-family:monospace;"> 42 language    = /usr/share/mysql/english
 43 skip-external-locking
 44 #
 45 # Instead of skip-networking the default is now to listen only on
 46 # localhost which is more compatible and is not less secure.
 47 #bind-address = 127.0.0.1
 48 #</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>/wordpress/2007/10/debian-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java Thread MySQL Error</title>
		<link>/wordpress/2007/05/java-thread-mysql-error/</link>
		<comments>/wordpress/2007/05/java-thread-mysql-error/#comments</comments>
		<pubDate>Mon, 14 May 2007 04:32:20 +0000</pubDate>
		<dc:creator>rupert</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">/wordpress/?p=51</guid>
		<description><![CDATA[My java thread bails on me after a few hours. I get the ff errors from my log4j. Anyway, I tried upgrading the mysql-java-connector to mysql-connector-java-5.0.5-bin.jar. And added &#8220;autoreconnect=true&#8221; in the url string&#8230; url=jdbc:mysql://127.0.0.1:3306/cncphs?autoreconnect=true. 1086 java.io.EOFException 1087 1088 STACKTRACE: 1089 1090 java.io.EOFException 1091 at com.mysql.jdbc.MysqlIO.readFully&#40;MysqlIO.java:1895&#41; 1092 at com.mysql.jdbc.MysqlIO.reuseAndReadPacket&#40;MysqlIO.java:2342&#41; 1093 at com.mysql.jdbc.MysqlIO.checkErrorPacket&#40;MysqlIO.java:2838&#41; 1094 at com.mysql.jdbc.MysqlIO.sendCommand&#40;MysqlIO.java:1584&#41; 1095 [...]]]></description>
			<content:encoded><![CDATA[<p>My java thread bails on me after a few hours. I get the ff errors from my log4j. Anyway, I tried upgrading the mysql-java-connector to mysql-connector-java-5.0.5-bin.jar. And added &#8220;autoreconnect=true&#8221; in the url string&#8230; <em>url=jdbc:mysql://127.0.0.1:3306/cncphs?autoreconnect=true</em>.</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">   <span style="color: #cc66cc;">1086</span> java.<span style="color: #006633;">io</span>.<span style="color: #003399;">EOFException</span>
   <span style="color: #cc66cc;">1087</span>
   <span style="color: #cc66cc;">1088</span> STACKTRACE<span style="color: #339933;">:</span>
   <span style="color: #cc66cc;">1089</span>
   <span style="color: #cc66cc;">1090</span> java.<span style="color: #006633;">io</span>.<span style="color: #003399;">EOFException</span>
   <span style="color: #cc66cc;">1091</span>     at com.<span style="color: #006633;">mysql</span>.<span style="color: #006633;">jdbc</span>.<span style="color: #006633;">MysqlIO</span>.<span style="color: #006633;">readFully</span><span style="color: #009900;">&#40;</span>MysqlIO.<span style="color: #006633;">java</span><span style="color: #339933;">:</span><span style="color: #cc66cc;">1895</span><span style="color: #009900;">&#41;</span>
   <span style="color: #cc66cc;">1092</span>     at com.<span style="color: #006633;">mysql</span>.<span style="color: #006633;">jdbc</span>.<span style="color: #006633;">MysqlIO</span>.<span style="color: #006633;">reuseAndReadPacket</span><span style="color: #009900;">&#40;</span>MysqlIO.<span style="color: #006633;">java</span><span style="color: #339933;">:</span><span style="color: #cc66cc;">2342</span><span style="color: #009900;">&#41;</span>
   <span style="color: #cc66cc;">1093</span>     at com.<span style="color: #006633;">mysql</span>.<span style="color: #006633;">jdbc</span>.<span style="color: #006633;">MysqlIO</span>.<span style="color: #006633;">checkErrorPacket</span><span style="color: #009900;">&#40;</span>MysqlIO.<span style="color: #006633;">java</span><span style="color: #339933;">:</span><span style="color: #cc66cc;">2838</span><span style="color: #009900;">&#41;</span>
   <span style="color: #cc66cc;">1094</span>     at com.<span style="color: #006633;">mysql</span>.<span style="color: #006633;">jdbc</span>.<span style="color: #006633;">MysqlIO</span>.<span style="color: #006633;">sendCommand</span><span style="color: #009900;">&#40;</span>MysqlIO.<span style="color: #006633;">java</span><span style="color: #339933;">:</span><span style="color: #cc66cc;">1584</span><span style="color: #009900;">&#41;</span>
   <span style="color: #cc66cc;">1095</span>     at com.<span style="color: #006633;">mysql</span>.<span style="color: #006633;">jdbc</span>.<span style="color: #006633;">MysqlIO</span>.<span style="color: #006633;">sqlQueryDirect</span><span style="color: #009900;">&#40;</span>MysqlIO.<span style="color: #006633;">java</span><span style="color: #339933;">:</span><span style="color: #cc66cc;">1675</span><span style="color: #009900;">&#41;</span>
   <span style="color: #cc66cc;">1096</span>     at com.<span style="color: #006633;">mysql</span>.<span style="color: #006633;">jdbc</span>.<span style="color: #003399;">Connection</span>.<span style="color: #006633;">execSQL</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">Connection</span>.<span style="color: #006633;">java</span><span style="color: #339933;">:</span><span style="color: #cc66cc;">2295</span><span style="color: #009900;">&#41;</span>
   <span style="color: #cc66cc;">1097</span>     at com.<span style="color: #006633;">mysql</span>.<span style="color: #006633;">jdbc</span>.<span style="color: #003399;">Connection</span>.<span style="color: #006633;">execSQL</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">Connection</span>.<span style="color: #006633;">java</span><span style="color: #339933;">:</span><span style="color: #cc66cc;">2228</span><span style="color: #009900;">&#41;</span>
   <span style="color: #cc66cc;">1098</span>     at com.<span style="color: #006633;">mysql</span>.<span style="color: #006633;">jdbc</span>.<span style="color: #003399;">Statement</span>.<span style="color: #006633;">executeQuery</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">Statement</span>.<span style="color: #006633;">java</span><span style="color: #339933;">:</span><span style="color: #cc66cc;">1159</span><span style="color: #009900;">&#41;</span>
   <span style="color: #cc66cc;">1099</span>     at DBThread.<span style="color: #006633;">run</span><span style="color: #009900;">&#40;</span>DBThread.<span style="color: #006633;">java</span><span style="color: #339933;">:</span><span style="color: #cc66cc;">45</span><span style="color: #009900;">&#41;</span>
   <span style="color: #cc66cc;">1100</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>/wordpress/2007/05/java-thread-mysql-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mapinfo8 MySQL5 Connection</title>
		<link>/wordpress/2007/02/linking-mysql5-with-mapinfo8/</link>
		<comments>/wordpress/2007/02/linking-mysql5-with-mapinfo8/#comments</comments>
		<pubDate>Tue, 20 Feb 2007 09:03:14 +0000</pubDate>
		<dc:creator>rupert</dc:creator>
				<category><![CDATA[mapinfo]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">/wordpress/?p=37</guid>
		<description><![CDATA[I only tried this using point objects. 1. Download and install MyODBC3.5.1 2. Create database mapinfotest 3. Create the mapinfo_mapcatalog table as follows: CREATE TABLE `mapinfo_mapcatalog` ( `SpatialType` float NOT NULL default '0', `TableName` char(32) NOT NULL default '', `OwnerName` char(32) NOT NULL default '', `SpatialColumn` char(32) NOT NULL default '', `DB_X_LL` float NOT NULL [...]]]></description>
			<content:encoded><![CDATA[<p>I only tried this using point objects.</p>
<p>1. Download and install <a href="http://dev.mysql.com/downloads/connector/odbc/3.51.html">MyODBC3.5.1</a></p>
<p>2. Create database mapinfotest</p>
<p>3. Create the mapinfo_mapcatalog table as follows:<br />
<code><br />
CREATE TABLE `mapinfo_mapcatalog` (<br />
`SpatialType` float NOT NULL default '0',<br />
`TableName` char(32) NOT NULL default '',<br />
`OwnerName` char(32) NOT NULL default '',<br />
`SpatialColumn` char(32) NOT NULL default '',<br />
`DB_X_LL` float NOT NULL default '0',<br />
`DB_Y_LL` float NOT NULL default '0',<br />
`DB_X_UR` float NOT NULL default '0',<br />
`DB_Y_UR` float NOT NULL default '0',<br />
`CoordinateSystem` char(254) NOT NULL,<br />
`Symbol` char(254) NOT NULL default '',<br />
`XColumnName` char(32) NOT NULL default '',<br />
`YColumnName` char(32) NOT NULL default '',<br />
PRIMARY KEY  (`TableName`,`OwnerName`)<br />
) ENGINE=MyISAM DEFAULT CHARSET=latin1;<br />
</code></p>
<p>4. create a sample table with two (2) decimal columns for the latitude and longitude.<br />
<code><br />
CREATE TABLE `poi_orig2` (<br />
`poiid` decimal(10,0) unsigned NOT NULL default '0',<br />
`id` char(10) NOT NULL default '',<br />
`py_name` char(255) character set utf8 default NULL,<br />
`latitude` decimal(20,8) default '0.00000000',<br />
`longitude` decimal(20,8) default '0.00000000',<br />
PRIMARY KEY  (`poiid`,`id`)<br />
)<br />
</code></p>
<p>5. Open Mapinfo 8<br />
6. File -&gt; Open DBMS Connection<br />
<img src="/wordpress/images/mapinfo_odbc.png" /></p>
<p>7. Table &gt; Maintenance &gt; Make DBMS Table Mappable<br />
<img src="/wordpress/images/mapinfo_mappable_window.png" /></p>
<p>Fill up the necessary values for the x,y and the index column.<br />
<img src="/wordpress/images/mapinfo_mappable_window_2.png" /></p>
<p>You need to choose an index column so Mapinfo could update the record/s in MySQL, normally it would be an ID. Once successful you should be able to see the success window&#8230;</p>
<p><img src="/wordpress/images/mapinfo_mappable_window_3.png" /></p>
<p>8. Open the table<br />
<img src="/wordpress/images/mapinfo_mappable_window_4.png" /></p>
<p>Click on the upper right corner to open a dbms connection. After selecting the datasource (mine is system) then it would give you a list of tables to choose from.</p>
<p><img src="/wordpress/images/mapinfo_mappable_window_5.png" /></p>
]]></content:encoded>
			<wfw:commentRss>/wordpress/2007/02/linking-mysql5-with-mapinfo8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing myhightman plugin in MySQL</title>
		<link>/wordpress/2007/01/installing-myhightman-plugin-in-mysql/</link>
		<comments>/wordpress/2007/01/installing-myhightman-plugin-in-mysql/#comments</comments>
		<pubDate>Mon, 15 Jan 2007 09:51:00 +0000</pubDate>
		<dc:creator>rupert</dc:creator>
				<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">/wordpress/?p=18</guid>
		<description><![CDATA[1. You need a fresh linux machine without mysql installed. You could follow the instructions from here 2. Download myhightman.tar.gz which I already compiled. myhightman.tar.gz Extracting&#8230; -rw-r--r-- 1 root root 377 Jan 12 17:00 bash_profile drwxr-xr-x 2 1001 wheel 4096 Sep 14 00:30 ft_hightman -rw-r--r-- 1 1001 wheel 4171 Sep 14 00:25 ft-hightman-M5-0.1.patch -rw-r--r-- 1 [...]]]></description>
			<content:encoded><![CDATA[<p>1. You need a fresh linux machine without mysql installed. You could follow the instructions from<br />
<a href="/wordpress/?p=17">here</a></p>
<p>2. Download myhightman.tar.gz which I already compiled.<br />
<a href="http://222.128.19.19/installers/mysql/5/myhightman.tar.gz">myhightman.tar.gz</a></p>
<p>Extracting&#8230;<br />
<code lang="perl"><br />
-rw-r--r--  1 root root       377 Jan 12 17:00 bash_profile<br />
drwxr-xr-x  2 1001 wheel     4096 Sep 14 00:30 ft_hightman<br />
-rw-r--r--  1 1001 wheel     4171 Sep 14 00:25 ft-hightman-M5-0.1.patch<br />
-rw-r--r--  1 root root     17955 Jan 11 18:52 ft-hightman-M5-0.1.tgz<br />
-rw-r--r--  1 root root      2051 Jan 12 17:00 install.sh<br />
-rw-r--r--  1 root root       574 Jan 11 19:19 my.cnf<br />
drwx--x--x  2 root root      4096 Jan 11 19:37 mysql<br />
-rw-r--r--  1 root root  22265695 Jan 11 18:52 mysql-5.1.11-hi1.tgz<br />
-rw-r--r--  1 1001 wheel     3450 Sep 14 00:31 README.hightman_parser<br />
-rw-r--r--  1 root root         0 Jan 11 18:52 stopwords-gbk.txt<br />
-rw-r--r--  1 root root         3 Jan 11 18:52 stopwords-utf8.txt<br />
-rw-r--r--  1 root root   1466369 Jan 11 18:52 wordlist-gbk.txt<br />
-rw-r--r--  1 root root   1907299 Jan 11 18:52 wordlist-utf8.txt<br />
</code></p>
<p>3. install.sh:</p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
mysql_install_dir<span style="color: #339933;">=</span><span style="color: #ff0000;">&quot;./mysql-5.1.11-hi1&quot;</span>
mysql_base_dir<span style="color: #339933;">=</span><span style="color: #ff0000;">&quot;/usr/local/mysql&quot;</span>
hightman_patch<span style="color: #339933;">=</span><span style="color: #ff0000;">&quot;./ft-hightman-M5-0.1.patch&quot;</span>
stopword<span style="color: #339933;">=</span><span style="color: #ff0000;">&quot;stopwords-utf8.txt&quot;</span>
wordlist<span style="color: #339933;">=</span><span style="color: #ff0000;">&quot;wordlist-utf8.txt&quot;</span>
data_dir<span style="color: #339933;">=</span><span style="color: #ff0000;">&quot;/data/mysqldata&quot;</span>
temp_dir<span style="color: #339933;">=</span><span style="color: #ff0000;">&quot;/data/temp_dir&quot;</span>
&nbsp;
echo <span style="color: #ff0000;">&quot;removing previous installation&quot;</span>
rm <span style="color: #339933;">-</span>rf <span style="color: #0000ff;">$mysql_install_dir</span>
&nbsp;
echo <span style="color: #ff0000;">&quot;unpacking $mysql_install_dir&quot;</span>
tar <span style="color: #339933;">-</span>zxvf <span style="color: #0000ff;">$mysql_install_dir</span><span style="color: #339933;">.</span>tar<span style="color: #339933;">.</span>gz
&nbsp;
echo <span style="color: #ff0000;">&quot;copying ft_hightman to $mysql_install_dir/plugin&quot;</span>
cp <span style="color: #339933;">-</span>Rf ft_hightman <span style="color: #0000ff;">$mysql_install_dir</span><span style="color: #339933;">/</span>plugin<span style="color: #339933;">/</span>
&nbsp;
echo <span style="color: #ff0000;">&quot;copying $hightman_patch to $mysql_install_dir&quot;</span>
cp <span style="color: #0000ff;">$hightman_patch</span> <span style="color: #0000ff;">$mysql_install_dir</span><span style="color: #339933;">/</span>
&nbsp;
echo <span style="color: #ff0000;">&quot;patching please answer y to all...&quot;</span>
cd <span style="color: #0000ff;">$mysql_install_dir</span>
patch <span style="color: #339933;">-</span>p1 <span style="color: #0000ff;">&amp;lt</span><span style="color: #339933;">;</span> <span style="color: #0000ff;">$hightman_patch</span>
&nbsp;
echo <span style="color: #ff0000;">&quot;patching again...&quot;</span>
patch <span style="color: #339933;">-</span>p1 <span style="color: #0000ff;">&amp;lt</span><span style="color: #339933;">;</span> <span style="color: #0000ff;">$hightman_patch</span>
&nbsp;
echo <span style="color: #ff0000;">&quot;processing.......&quot;</span>
&nbsp;
echo <span style="color: #ff0000;">&quot;aclocal.......&quot;</span>
aclocal
&nbsp;
echo <span style="color: #ff0000;">&quot;automake.......&quot;</span>
automake
&nbsp;
echo <span style="color: #ff0000;">&quot;autoconf.......&quot;</span>
autoconf
&nbsp;
echo <span style="color: #ff0000;">&quot;configuring...&quot;</span>
<span style="color: #339933;">./</span>configure <span style="color: #339933;">--</span>prefix<span style="color: #339933;">=</span><span style="color: #0000ff;">$mysql_base_dir</span> <span style="color: #339933;">--</span>with<span style="color: #339933;">-</span>charset<span style="color: #339933;">=</span>utf8 <span style="color: #339933;">--</span>with<span style="color: #339933;">-</span>extra<span style="color: #339933;">-</span>charsets<span style="color: #339933;">=</span>all <span style="color: #339933;">--</span>with<span style="color: #339933;">-</span>plugins<span style="color: #339933;">=</span>fthightman
&nbsp;
echo <span style="color: #ff0000;">&quot;make...&quot;</span>
make
&nbsp;
echo <span style="color: #ff0000;">&quot;make install...&quot;</span>
make install
&nbsp;
echo <span style="color: #ff0000;">&quot;copying wordlist and stoplist to $mysql_base_dir/share/mysql&quot;</span>
cd <span style="color: #339933;">..</span>
cp <span style="color: #339933;">-</span>Rf <span style="color: #0000ff;">$stopword</span> <span style="color: #0000ff;">$mysql_base_dir</span><span style="color: #339933;">/</span>share<span style="color: #339933;">/</span>mysql<span style="color: #339933;">/</span>
cp <span style="color: #339933;">-</span>Rf <span style="color: #0000ff;">$wordlist</span> <span style="color: #0000ff;">$mysql_base_dir</span><span style="color: #339933;">/</span>share<span style="color: #339933;">/</span>mysql<span style="color: #339933;">/</span>
&nbsp;
echo <span style="color: #ff0000;">&quot;making mysql datadir on $data_dir&quot;</span>
rm <span style="color: #339933;">-</span>rf <span style="color: #0000ff;">$data_dir</span>
rm <span style="color: #339933;">-</span>rf <span style="color: #0000ff;">$temp_dir</span>
<span style="color: #000066;">mkdir</span> <span style="color: #339933;">-</span>p <span style="color: #0000ff;">$data_dir</span>
<span style="color: #000066;">mkdir</span> <span style="color: #339933;">-</span>p <span style="color: #0000ff;">$temp_dir</span>
&nbsp;
echo <span style="color: #ff0000;">&quot;copying my.cnf default file to /etc&quot;</span>
cp <span style="color: #339933;">-</span>Rf <span style="color: #b1b100;">my</span><span style="color: #339933;">.</span>cnf <span style="color: #339933;">/</span>etc<span style="color: #339933;">/</span><span style="color: #b1b100;">my</span><span style="color: #339933;">.</span>cnf
&nbsp;
echo <span style="color: #ff0000;">&quot;copying custom mysql database to $data_dir&quot;</span>
cp <span style="color: #339933;">-</span>Rf mysql <span style="color: #0000ff;">$data_dir</span>
&nbsp;
echo <span style="color: #ff0000;">&quot;changing ownership...&quot;</span>
useradd mysql
useradd <span style="color: #339933;">-</span>g mysql mysql
<span style="color: #000066;">chown</span> <span style="color: #339933;">-</span>Rf mysql<span style="color: #339933;">:</span>mysql <span style="color: #0000ff;">$data_dir</span>
<span style="color: #000066;">chown</span> <span style="color: #339933;">-</span>Rf mysql<span style="color: #339933;">:</span>mysql <span style="color: #0000ff;">$temp_dir</span>
&nbsp;
echo <span style="color: #ff0000;">&quot;linking myhightman.so...&quot;</span>
ln <span style="color: #339933;">-</span><span style="color: #000066;">s</span> <span style="color: #339933;">/</span>usr<span style="color: #339933;">/</span><span style="color: #000066;">local</span><span style="color: #339933;">/</span>mysql<span style="color: #339933;">/</span>lib<span style="color: #339933;">/</span>mysql<span style="color: #339933;">/</span>myhightman<span style="color: #339933;">.</span>so <span style="color: #339933;">/</span>usr<span style="color: #339933;">/</span>lib<span style="color: #339933;">/</span>myhightman<span style="color: #339933;">.</span>so
&nbsp;
echo <span style="color: #ff0000;">&quot;creating startup scripts...&quot;</span>
cp <span style="color: #339933;">-</span>rf <span style="color: #0000ff;">$mysql_base_dir</span><span style="color: #339933;">/</span>share<span style="color: #339933;">/</span>mysql<span style="color: #339933;">/</span>mysql<span style="color: #339933;">.</span>server <span style="color: #339933;">/</span>etc<span style="color: #339933;">/</span>init<span style="color: #339933;">.</span>d<span style="color: #339933;">/</span>mysql
<span style="color: #000066;">chmod</span> <span style="color: #339933;">+</span>x <span style="color: #339933;">/</span>etc<span style="color: #339933;">/</span>init<span style="color: #339933;">.</span>d<span style="color: #339933;">/</span>mysql
<span style="color: #339933;">/</span>sbin<span style="color: #339933;">/</span>chkconfig <span style="color: #339933;">--</span>add mysql
<span style="color: #339933;">/</span>sbin<span style="color: #339933;">/</span>chkconfig <span style="color: #339933;">--</span>level <span style="color: #cc66cc;">345</span> mysql on
<span style="color: #339933;">/</span>etc<span style="color: #339933;">/</span>init<span style="color: #339933;">.</span>d<span style="color: #339933;">/</span>mysql start
&nbsp;
echo <span style="color: #ff0000;">&quot;YOU HAVE SUCCESSFULLY INSTALLED mysql5 with HIGHTMAN. please add this to your path...&quot;</span>
echo <span style="color: #ff0000;">&quot;export PATH=$PATH:$mysql_base_dir/bin&quot;</span></pre></div></div>

<p>4. CREATE FUNCTION segment RETURNS STRING SONAME &#8216;myhightman.so&#8217;;</p>
<p>5. SET NAMES &#8216;utf8&#8242;;</p>
]]></content:encoded>
			<wfw:commentRss>/wordpress/2007/01/installing-myhightman-plugin-in-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

