<?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>Wed, 30 Jun 2010 02:38:43 +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>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[Programação]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Sem Categoria]]></category>
		<category><![CDATA[Tecnologia]]></category>
		<category><![CDATA[mac]]></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>
]]></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[SQL]]></category>
		<category><![CDATA[Sem Categoria]]></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>
]]></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 -a <span style="color: #808080; font-style: italic;">--opt -u usuario -p nome_do_banco&gt; nome_do_arquivo.sql </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;">mysq -h host -u usuario -ppassword nome_da_base &lt;nome_do_arquivo.sql </div>
</li>
</ol>
</div>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.ureshino.org/backup-e-restaurar-o-banco-de-dados-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
