<?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>Ureshino.org &#187; SQL</title>
	<atom:link href="http://www.ureshino.org/category/sql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ureshino.org</link>
	<description>As escolhas qualificam a liberdade!</description>
	<lastBuildDate>Mon, 06 Feb 2012 11:00:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Acessar MySql via terminal no Mac OS X</title>
		<link>http://www.ureshino.org/acessar-mysql-via-terminal-no-mac-os-x/</link>
		<comments>http://www.ureshino.org/acessar-mysql-via-terminal-no-mac-os-x/#comments</comments>
		<pubDate>Wed, 19 Mar 2008 11:50:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Assuntos variados]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[Programação]]></category>
		<category><![CDATA[Sem Categoria]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Tecnologia]]></category>

		<guid isPermaLink="false">http://www.ureshino.org/acessar-mysql-via-terminal-no-mac-os-x/</guid>
		<description><![CDATA[Ontem precisei acessar o banco de dados do Mysql do programa MAMP, que seria o EasyPHP para Mac OS X, pelo terminal e tive bastante dificuldade para achar. Por isso estou postando aqui. PLAIN TEXT SQL: sudo /Applications/MAMP/Library/bin/mysql -uroot -proot Estou assumindo que não foi alterado nada na instalação do MAMP. E também precisei importar [...]]]></description>
			<content:encoded><![CDATA[<p>Ontem precisei acessar o banco de dados do Mysql do programa MAMP, que seria o EasyPHP para Mac OS X, pelo terminal e tive bastante dificuldade para achar. Por isso estou postando aqui.</p>
<div class="igBar"><a href="javascript:showCodeTxt('sql-3');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">SQL:</span>
<div id="sql-3">
<div class="sql">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">sudo /Applications/MAMP/Library/bin/mysql -uroot -proot </div>
</li>
</ol>
</div>
</div>
</div>
<p>Estou assumindo que não foi alterado nada na instalação do MAMP.</p>
<p>E também precisei importar um banco de dados através de um dump e esse arquivo tinha 500MB, ou seja, pelo phpMyAdmin é impossível, por isso está o código abaixo.</p>
<div class="igBar"><a href="javascript:showCodeTxt('sql-4');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">SQL:</span>
<div id="sql-4">
<div class="sql">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">/Applications/MAMP/Library/bin/mysql -h localhost -u root -proot banco_de_dados &lt;/caminho/do/arquivo/arquivo.sql </div>
</li>
</ol>
</div>
</div>
</div>
<p>Bom, está aí, espero ter ajudado...</p>
<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Acessar+MySql+via+terminal+no+Mac+OS+X+http%3A%2F%2Fis.gd%2F0oyo5F" title="Post to Twitter"><img class="nothumb" src="http://www.ureshino.org/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-big3.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://digg.com/submit?url=http://www.ureshino.org/acessar-mysql-via-terminal-no-mac-os-x/&amp;title=Acessar+MySql+via+terminal+no+Mac+OS+X" title="Post to Digg"><img class="nothumb" src="http://www.ureshino.org/wp-content/plugins/tweet-this/icons/en/digg/tt-digg-big3.png" alt="Post to Digg" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.facebook.com/share.php?u=http://www.ureshino.org/acessar-mysql-via-terminal-no-mac-os-x/&amp;t=Acessar+MySql+via+terminal+no+Mac+OS+X" title="Post to Facebook"><img class="nothumb" src="http://www.ureshino.org/wp-content/plugins/tweet-this/icons/en/facebook/tt-facebook-big3.png" alt="Post to Facebook" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.google.com/buzz/post?url=http://www.ureshino.org/acessar-mysql-via-terminal-no-mac-os-x/&amp;imageurl=" title="Post to Google Buzz"><img class="nothumb" src="http://www.ureshino.org/wp-content/plugins/tweet-this/icons/en/gbuzz/tt-gbuzz-big3.png" alt="Post to Google Buzz" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.myspace.com/Modules/PostTo/Pages/?l=3&amp;u=http://www.ureshino.org/acessar-mysql-via-terminal-no-mac-os-x/&amp;t=Acessar+MySql+via+terminal+no+Mac+OS+X" title="Post to MySpace"><img class="nothumb" src="http://www.ureshino.org/wp-content/plugins/tweet-this/icons/en/myspace/tt-myspace-big3.png" alt="Post to MySpace" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://reddit.com/submit?url=http://www.ureshino.org/acessar-mysql-via-terminal-no-mac-os-x/&amp;title=Acessar+MySql+via+terminal+no+Mac+OS+X" title="Post to Reddit"><img class="nothumb" src="http://www.ureshino.org/wp-content/plugins/tweet-this/icons/en/reddit/tt-reddit-big3.png" alt="Post to Reddit" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://slashdot.org/bookmark.pl?url=http://www.ureshino.org/acessar-mysql-via-terminal-no-mac-os-x/&amp;title=Acessar+MySql+via+terminal+no+Mac+OS+X" title="Post to Slashdot"><img class="nothumb" src="http://www.ureshino.org/wp-content/plugins/tweet-this/icons/en/slashdot/tt-slashdot-big3.png" alt="Post to Slashdot" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://stumbleupon.com/submit?url=http://www.ureshino.org/acessar-mysql-via-terminal-no-mac-os-x/&amp;title=Acessar+MySql+via+terminal+no+Mac+OS+X" title="Post to StumbleUpon"><img class="nothumb" src="http://www.ureshino.org/wp-content/plugins/tweet-this/icons/en/su/tt-su-big3.png" alt="Post to StumbleUpon" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.ureshino.org/acessar-mysql-via-terminal-no-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Registros duplicados em SQL</title>
		<link>http://www.ureshino.org/registros-duplicados-em-sql/</link>
		<comments>http://www.ureshino.org/registros-duplicados-em-sql/#comments</comments>
		<pubDate>Tue, 03 Jul 2007 01:40:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Sem Categoria]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Tecnologia]]></category>

		<guid isPermaLink="false">http://blog.ureshino.com.br/registros-duplicados-em-sql/</guid>
		<description><![CDATA[Estava pesquisando na internet como fazer para achar registros duplicados em SQL... Demorei um pouco para achar... por isso estou postando aqui para ficar mais fácil... PLAIN TEXT SQL: SELECT COUNT&#40;*&#41; quant, campo1 FROM &#60;tabela&#62; GROUP BY campo1 HAVING quant&#62; 1]]></description>
			<content:encoded><![CDATA[<p>Estava pesquisando na internet como fazer para achar registros duplicados em SQL...</p>
<p>Demorei um pouco para achar... por isso estou postando aqui para ficar mais fácil...</p>
<div class="igBar"><a href="javascript:showCodeTxt('sql-6');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">SQL:</span>
<div id="sql-6">
<div class="sql">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333; font-weight: bold;">SELECT</span> COUNT<span style="color:#006600; font-weight:bold;">&#40;</span>*<span style="color:#006600; font-weight:bold;">&#41;</span> quant, campo1</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333; font-weight: bold;">FROM</span> &lt;tabela&gt;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333; font-weight: bold;">GROUP</span> <span style="color: #993333; font-weight: bold;">BY</span> campo1</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333; font-weight: bold;">HAVING</span> quant&gt; <span style="color:#800000;">1</span> </div>
</li>
</ol>
</div>
</div>
</div>
<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Registros+duplicados+em+SQL+http%3A%2F%2Fis.gd%2FwHBAEK" title="Post to Twitter"><img class="nothumb" src="http://www.ureshino.org/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-big3.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://digg.com/submit?url=http://www.ureshino.org/registros-duplicados-em-sql/&amp;title=Registros+duplicados+em+SQL" title="Post to Digg"><img class="nothumb" src="http://www.ureshino.org/wp-content/plugins/tweet-this/icons/en/digg/tt-digg-big3.png" alt="Post to Digg" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.facebook.com/share.php?u=http://www.ureshino.org/registros-duplicados-em-sql/&amp;t=Registros+duplicados+em+SQL" title="Post to Facebook"><img class="nothumb" src="http://www.ureshino.org/wp-content/plugins/tweet-this/icons/en/facebook/tt-facebook-big3.png" alt="Post to Facebook" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.google.com/buzz/post?url=http://www.ureshino.org/registros-duplicados-em-sql/&amp;imageurl=" title="Post to Google Buzz"><img class="nothumb" src="http://www.ureshino.org/wp-content/plugins/tweet-this/icons/en/gbuzz/tt-gbuzz-big3.png" alt="Post to Google Buzz" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.myspace.com/Modules/PostTo/Pages/?l=3&amp;u=http://www.ureshino.org/registros-duplicados-em-sql/&amp;t=Registros+duplicados+em+SQL" title="Post to MySpace"><img class="nothumb" src="http://www.ureshino.org/wp-content/plugins/tweet-this/icons/en/myspace/tt-myspace-big3.png" alt="Post to MySpace" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://reddit.com/submit?url=http://www.ureshino.org/registros-duplicados-em-sql/&amp;title=Registros+duplicados+em+SQL" title="Post to Reddit"><img class="nothumb" src="http://www.ureshino.org/wp-content/plugins/tweet-this/icons/en/reddit/tt-reddit-big3.png" alt="Post to Reddit" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://slashdot.org/bookmark.pl?url=http://www.ureshino.org/registros-duplicados-em-sql/&amp;title=Registros+duplicados+em+SQL" title="Post to Slashdot"><img class="nothumb" src="http://www.ureshino.org/wp-content/plugins/tweet-this/icons/en/slashdot/tt-slashdot-big3.png" alt="Post to Slashdot" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://stumbleupon.com/submit?url=http://www.ureshino.org/registros-duplicados-em-sql/&amp;title=Registros+duplicados+em+SQL" title="Post to StumbleUpon"><img class="nothumb" src="http://www.ureshino.org/wp-content/plugins/tweet-this/icons/en/su/tt-su-big3.png" alt="Post to StumbleUpon" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.ureshino.org/registros-duplicados-em-sql/feed/</wfw:commentRss>
		<slash:comments>684</slash:comments>
		</item>
		<item>
		<title>Backup e restaurar o banco de dados MySQL</title>
		<link>http://www.ureshino.org/backup-e-restaurar-o-banco-de-dados-mysql/</link>
		<comments>http://www.ureshino.org/backup-e-restaurar-o-banco-de-dados-mysql/#comments</comments>
		<pubDate>Fri, 17 Feb 2006 17:14:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.ureshino.com.br/myblog/archives/8</guid>
		<description><![CDATA[Este post talvez não seja tão grande coisa para alguns, mas pra mim vai ser... A algum tempo atrás eu tava procurando códigos para fazer um dump do banco de dados MySQL do nosso servidor da internet e restaurá-lo no nosso servidor local... aí eu fiquei caçando esses comandos e resolvi postá-los aqui para não [...]]]></description>
			<content:encoded><![CDATA[<p>Este post talvez não seja tão grande coisa para alguns, mas pra mim vai ser...</p>
<p>A algum tempo atrás eu tava procurando códigos para fazer um dump do banco de dados MySQL do nosso servidor da internet e restaurá-lo no nosso servidor local...</p>
<p>aí eu fiquei caçando esses comandos e resolvi postá-los aqui para não ter mais problemas em acessar o manual do MySQL e ficar procurando...</p>
<p>estão aí...</p>
<p>o comando para fazer o dump do MySQL é:</p>
<div class="igBar"><a href="javascript:showCodeTxt('sql-9');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">SQL:</span>
<div id="sql-9">
<div class="sql">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">mysqldump -uroot -p <span style="color: #808080; font-style: italic;">--routines basedados | bzip2&gt; sqldump.sql.bz2 </span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
</ol>
</div>
</div>
</div>
<p>o comando para restaurar o banco de dados a partir de um arquivo .sql é:</p>
<div class="igBar"><a href="javascript:showCodeTxt('sql-10');">PLAIN TEXT</a></div>
<div class="syntax_hilite"><span style="color:#000000; font-weight:bold;">SQL:</span>
<div id="sql-10">
<div class="sql">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="color:#000000; font-family: 'Courier New', Courier, monospace; font-weight: normal;">mysql -uroot -p basedados &lt;sqldump.sql </div>
</li>
</ol>
</div>
</div>
</div>
<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=Backup+e+restaurar+o+banco+de+dados+MySQL+http%3A%2F%2Fis.gd%2FKq8PUg" title="Post to Twitter"><img class="nothumb" src="http://www.ureshino.org/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-big3.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://digg.com/submit?url=http://www.ureshino.org/backup-e-restaurar-o-banco-de-dados-mysql/&amp;title=Backup+e+restaurar+o+banco+de+dados+MySQL" title="Post to Digg"><img class="nothumb" src="http://www.ureshino.org/wp-content/plugins/tweet-this/icons/en/digg/tt-digg-big3.png" alt="Post to Digg" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.facebook.com/share.php?u=http://www.ureshino.org/backup-e-restaurar-o-banco-de-dados-mysql/&amp;t=Backup+e+restaurar+o+banco+de+dados+MySQL" title="Post to Facebook"><img class="nothumb" src="http://www.ureshino.org/wp-content/plugins/tweet-this/icons/en/facebook/tt-facebook-big3.png" alt="Post to Facebook" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.google.com/buzz/post?url=http://www.ureshino.org/backup-e-restaurar-o-banco-de-dados-mysql/&amp;imageurl=" title="Post to Google Buzz"><img class="nothumb" src="http://www.ureshino.org/wp-content/plugins/tweet-this/icons/en/gbuzz/tt-gbuzz-big3.png" alt="Post to Google Buzz" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.myspace.com/Modules/PostTo/Pages/?l=3&amp;u=http://www.ureshino.org/backup-e-restaurar-o-banco-de-dados-mysql/&amp;t=Backup+e+restaurar+o+banco+de+dados+MySQL" title="Post to MySpace"><img class="nothumb" src="http://www.ureshino.org/wp-content/plugins/tweet-this/icons/en/myspace/tt-myspace-big3.png" alt="Post to MySpace" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://reddit.com/submit?url=http://www.ureshino.org/backup-e-restaurar-o-banco-de-dados-mysql/&amp;title=Backup+e+restaurar+o+banco+de+dados+MySQL" title="Post to Reddit"><img class="nothumb" src="http://www.ureshino.org/wp-content/plugins/tweet-this/icons/en/reddit/tt-reddit-big3.png" alt="Post to Reddit" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://slashdot.org/bookmark.pl?url=http://www.ureshino.org/backup-e-restaurar-o-banco-de-dados-mysql/&amp;title=Backup+e+restaurar+o+banco+de+dados+MySQL" title="Post to Slashdot"><img class="nothumb" src="http://www.ureshino.org/wp-content/plugins/tweet-this/icons/en/slashdot/tt-slashdot-big3.png" alt="Post to Slashdot" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://stumbleupon.com/submit?url=http://www.ureshino.org/backup-e-restaurar-o-banco-de-dados-mysql/&amp;title=Backup+e+restaurar+o+banco+de+dados+MySQL" title="Post to StumbleUpon"><img class="nothumb" src="http://www.ureshino.org/wp-content/plugins/tweet-this/icons/en/su/tt-su-big3.png" alt="Post to StumbleUpon" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.ureshino.org/backup-e-restaurar-o-banco-de-dados-mysql/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

