<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4428415202815645943</id><updated>2024-11-01T07:32:16.600-03:00</updated><category term="Linux"/><category term="Programas"/><category term="Tutorial"/><category term="CentOS"/><category term="Internet"/><category term="Python"/><category term="Shell"/><category term="VB.net"/><category term="Download"/><category term="LAMP"/><category term="Script"/><category term="Ubuntu"/><category term="site"/><category term="Mint"/><category term="PyQt4"/><category term="Qt"/><category term="VirtualBox"/><category term="C#.net"/><category term="Chrome"/><category term="Desktop"/><category term="Extensões"/><category term="Gnome"/><category term="MariaDB"/><category term="MySQL"/><category term="gtk"/><category term="ping"/><title type='text'>Herbert&#39;s Blog</title><subtitle type='html'>Um blog sobre um pouco de cada coisa...</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://herberthudson.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4428415202815645943/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://herberthudson.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08733846572980544657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>20</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4428415202815645943.post-5671910858274376316</id><published>2013-04-24T14:02:00.000-03:00</published><updated>2013-04-24T14:02:45.518-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CentOS"/><category scheme="http://www.blogger.com/atom/ns#" term="LAMP"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="MariaDB"/><category scheme="http://www.blogger.com/atom/ns#" term="MySQL"/><category scheme="http://www.blogger.com/atom/ns#" term="Programas"/><category scheme="http://www.blogger.com/atom/ns#" term="Shell"/><title type='text'>Como substituir o MySQL com o MariaDB no CentOS 6</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-gv8z00769b74K_NXLCu2mFHsTCjBvyPQQxO90_WZXdTAp8agQoWusSamXp4-CoZdYzurRRRa6vUeE-Qe2xJyjXNnN-qDlw3Sf4rbfJxZxvBTqlvkV3AxdBYJVYIIZ4NILA-Wg4k2ILQ/s1600/MySQL-para-o-fork-MariaDB.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-gv8z00769b74K_NXLCu2mFHsTCjBvyPQQxO90_WZXdTAp8agQoWusSamXp4-CoZdYzurRRRa6vUeE-Qe2xJyjXNnN-qDlw3Sf4rbfJxZxvBTqlvkV3AxdBYJVYIIZ4NILA-Wg4k2ILQ/s1600/MySQL-para-o-fork-MariaDB.jpg&quot; height=&quot;114&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
MariaDB é um substituto para o MySQL e se esforça para ser a escolha lógica para os profissionais de banco de dados à procura de um servidor SQL robusto, escalável e confiável. Para conseguir isso, a &lt;i&gt;&lt;a href=&quot;http://montyprogram.com/&quot; target=&quot;_blank&quot;&gt;Monty Program&lt;/a&gt;&lt;/i&gt; trabalha para contratar os melhores e mais brilhantes desenvolvedores do setor.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #660000;&quot;&gt;Alerta: Faça o backup dos dados antes de prosseguir, se deseja manter os bancos de dados já criados.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
A primeira coisa a se fazer é remover o MySQL usando o YUM:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;yum remove mysql*&lt;/code&gt;
&lt;br /&gt;
no meu caso, esses pacotes foram removidos
&lt;br /&gt;
&lt;code&gt;mysql 
mysql-devel 
mysql-libs 
mysql-server &lt;/code&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Compatibilidade com pacotes PHP do repositório REMI&lt;/h3&gt;
&lt;div&gt;
Isto é importante se você estiver instalando o PHP-FPM a partir do repositório Remi. Instale o seguinte pacote do repositório Remi test:&lt;/div&gt;
&lt;div&gt;
&lt;code&gt;yum --enablerepo=remi-test --disablerepo=remi install compat-mysql55&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3&gt;
Instalando o MariaDB&lt;/h3&gt;
&lt;div&gt;
Primeiro vamos adicionar o repositório do MariaDB:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;vi /etc/yum.repos.d/MariaDB.repo&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
e vamos inserir os dados:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;
[mariadb]&lt;br /&gt;
name = MariaDB&lt;br /&gt;
baseurl = http://yum.mariadb.org/5.5/centos6-x86&lt;br /&gt;
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB&lt;br /&gt;
gpgcheck=1&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
obs.: certifique de alterar a baseurl de acordo com sua arquitetura.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
vamos então instalar o MariaDB:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;yum install MariaDB-server MariaDB-client&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
irá instalar os seguintes pacotes:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;
MariaDB-client 
MariaDB-server 
MariaDB-common 
MariaDB-compat &lt;/code&gt;
&lt;br /&gt;
instalado o MariaDB vamos então iniciar o serviço:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;service mysql start&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
vamos configurar uma instalação segura:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;mysql_secure_installation&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
agora vamos definir o MariaDB para iniciar no boot:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;
chkconfig mysql on&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
feito isso, o vamos e reiniciar o serviço:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;service mysql restart&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
Pronto! MariaDB instalado e configurado =)&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://herberthudson.blogspot.com/feeds/5671910858274376316/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4428415202815645943/5671910858274376316?isPopup=true' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4428415202815645943/posts/default/5671910858274376316'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4428415202815645943/posts/default/5671910858274376316'/><link rel='alternate' type='text/html' href='http://herberthudson.blogspot.com/2013/04/como-substituir-o-mysql-com-o-mariadb.html' title='Como substituir o MySQL com o MariaDB no CentOS 6'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08733846572980544657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-gv8z00769b74K_NXLCu2mFHsTCjBvyPQQxO90_WZXdTAp8agQoWusSamXp4-CoZdYzurRRRa6vUeE-Qe2xJyjXNnN-qDlw3Sf4rbfJxZxvBTqlvkV3AxdBYJVYIIZ4NILA-Wg4k2ILQ/s72-c/MySQL-para-o-fork-MariaDB.jpg" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>Belo Horizonte - MG, República Federativa do Brasil</georss:featurename><georss:point>-19.9190677 -43.938574700000004</georss:point><georss:box>-20.3967782 -44.5840217 -19.4413572 -43.293127700000007</georss:box></entry><entry><id>tag:blogger.com,1999:blog-4428415202815645943.post-7196697609849507820</id><published>2013-04-09T23:19:00.000-03:00</published><updated>2013-04-09T23:19:46.419-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="Mint"/><category scheme="http://www.blogger.com/atom/ns#" term="Programas"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><category scheme="http://www.blogger.com/atom/ns#" term="Shell"/><title type='text'>Como instalar o easy_install Ubuntu, Mint e derivados</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEho9R-4pCsY-znw14BDykFU-bCTPfjvShRsnBwlQ12fHjegFmgFD0qdKuTZdIaSHhY5-_fbRBBFwhkBCVYTMTGtdJ3VkFx7m3glgxGlDvl8NyzcOHuBlqhI5jj5yy-tfvO_22Fi95wWqhw/s1600/python_insidetech.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEho9R-4pCsY-znw14BDykFU-bCTPfjvShRsnBwlQ12fHjegFmgFD0qdKuTZdIaSHhY5-_fbRBBFwhkBCVYTMTGtdJ3VkFx7m3glgxGlDvl8NyzcOHuBlqhI5jj5yy-tfvO_22Fi95wWqhw/s1600/python_insidetech.jpg&quot; height=&quot;108&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Se você precisar do easy_install para qualquer coisa no Ubuntu e derivados, é muito fácil, basta executar esse comando no terminal:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;# apt-get install python-setuptools python-dev build-essential&lt;/code&gt;
&lt;br /&gt;
&lt;br /&gt;
Feito isso, já poderá utilizá-lo.</content><link rel='replies' type='application/atom+xml' href='http://herberthudson.blogspot.com/feeds/7196697609849507820/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4428415202815645943/7196697609849507820?isPopup=true' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4428415202815645943/posts/default/7196697609849507820'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4428415202815645943/posts/default/7196697609849507820'/><link rel='alternate' type='text/html' href='http://herberthudson.blogspot.com/2013/04/como-instalar-o-easyinstall-ubuntu-mint.html' title='Como instalar o easy_install Ubuntu, Mint e derivados'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08733846572980544657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEho9R-4pCsY-znw14BDykFU-bCTPfjvShRsnBwlQ12fHjegFmgFD0qdKuTZdIaSHhY5-_fbRBBFwhkBCVYTMTGtdJ3VkFx7m3glgxGlDvl8NyzcOHuBlqhI5jj5yy-tfvO_22Fi95wWqhw/s72-c/python_insidetech.jpg" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>Belo Horizonte - MG, República Federativa do Brasil</georss:featurename><georss:point>-19.9190677 -43.938574700000004</georss:point><georss:box>-20.3967782 -44.5840217 -19.4413572 -43.293127700000007</georss:box></entry><entry><id>tag:blogger.com,1999:blog-4428415202815645943.post-460297541061458847</id><published>2013-04-06T15:01:00.001-03:00</published><updated>2013-04-06T15:02:01.232-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CentOS"/><category scheme="http://www.blogger.com/atom/ns#" term="Desktop"/><category scheme="http://www.blogger.com/atom/ns#" term="Gnome"/><category scheme="http://www.blogger.com/atom/ns#" term="Internet"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="Programas"/><category scheme="http://www.blogger.com/atom/ns#" term="Shell"/><category scheme="http://www.blogger.com/atom/ns#" term="Tutorial"/><title type='text'>Instalando o Desktop no CentOS</title><content type='html'>&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwHr3PKQ4PqfLY4Qkc1mA-czwdURtzKrEOzzgbeXFko9Fop-sO-d7NCHIrzPuxXyC24JP9Xz_WQCMNP31RlEYD1JxobyT7-pnVMYa6h9R04AFsg3ErZSAbpM3VbrcARiulm2OS4WJ5aqs/s1600/centos_rede01.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwHr3PKQ4PqfLY4Qkc1mA-czwdURtzKrEOzzgbeXFko9Fop-sO-d7NCHIrzPuxXyC24JP9Xz_WQCMNP31RlEYD1JxobyT7-pnVMYa6h9R04AFsg3ErZSAbpM3VbrcARiulm2OS4WJ5aqs/s1600/centos_rede01.png&quot; height=&quot;480&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Após instalar o CentOS e caso você queira utilizar um desktop para poder fazer alguns testes, faço o seguinte:&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;Execute o comando abaixo para instalar o Gnome:&lt;br /&gt;
&lt;code&gt;# yum groupinstall &quot;Desktop&quot; &quot;Desktop Platform&quot; &quot;X Window System&quot; &quot;Fonts&quot;&lt;/code&gt;&lt;br /&gt;
Agora iremos adicionar um usuário para acessar o Desktop:&lt;br /&gt;
&lt;code&gt;# useradd guest&lt;br /&gt;
# passwd guest
&lt;/code&gt;
&lt;br /&gt;
Feito isso, vamos agora modificar a inicialização para que carregue o Gnome Desktop na inicialização, vamos editar o arquivo /etc/inittab:&lt;br /&gt;
&lt;code&gt;# vi /etc/inittab&lt;/code&gt;&lt;br /&gt;
E alterar a seguinte linha:&lt;br /&gt;
&lt;code&gt;id:3:initdefault:&lt;/code&gt;&lt;br /&gt;
Trocando o número 3 pelo 5.&lt;br /&gt;
&lt;code&gt;id:5:initdefault:&lt;/code&gt;&lt;br /&gt;
E após reiniciar, já irá pedir o usuário e a senha.&lt;br /&gt;
&lt;br /&gt;
Até a próxima.</content><link rel='replies' type='application/atom+xml' href='http://herberthudson.blogspot.com/feeds/460297541061458847/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4428415202815645943/460297541061458847?isPopup=true' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4428415202815645943/posts/default/460297541061458847'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4428415202815645943/posts/default/460297541061458847'/><link rel='alternate' type='text/html' href='http://herberthudson.blogspot.com/2013/04/instalando-o-desktop-no-centos.html' title='Instalando o Desktop no CentOS'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08733846572980544657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwHr3PKQ4PqfLY4Qkc1mA-czwdURtzKrEOzzgbeXFko9Fop-sO-d7NCHIrzPuxXyC24JP9Xz_WQCMNP31RlEYD1JxobyT7-pnVMYa6h9R04AFsg3ErZSAbpM3VbrcARiulm2OS4WJ5aqs/s72-c/centos_rede01.png" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>Belo Horizonte - MG, República Federativa do Brasil</georss:featurename><georss:point>-19.9190677 -43.938574700000004</georss:point><georss:box>-20.3967782 -44.5840217 -19.4413572 -43.293127700000007</georss:box></entry><entry><id>tag:blogger.com,1999:blog-4428415202815645943.post-5511497201614748851</id><published>2013-04-06T13:51:00.001-03:00</published><updated>2013-04-06T13:52:09.840-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CentOS"/><category scheme="http://www.blogger.com/atom/ns#" term="Download"/><category scheme="http://www.blogger.com/atom/ns#" term="Internet"/><category scheme="http://www.blogger.com/atom/ns#" term="LAMP"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="Programas"/><category scheme="http://www.blogger.com/atom/ns#" term="site"/><category scheme="http://www.blogger.com/atom/ns#" term="Tutorial"/><title type='text'>Instalar o phpMyAdmin no CentOS 6</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRhyoGIx2hj-8T8Qs_atZLx0Ww8rimYeBWM1XckgfXEruRRTtuRNSFixFiGSgAYQXXpv1O1nO03JPhoQNOXk5xNf_tSy2x-gZSSbjP8L6SJtwPx1UFR7NysTRsb69BXKxuccx6YUNwtfw/s1600/linux-pinguim-phpmyadmin.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRhyoGIx2hj-8T8Qs_atZLx0Ww8rimYeBWM1XckgfXEruRRTtuRNSFixFiGSgAYQXXpv1O1nO03JPhoQNOXk5xNf_tSy2x-gZSSbjP8L6SJtwPx1UFR7NysTRsb69BXKxuccx6YUNwtfw/s1600/linux-pinguim-phpmyadmin.jpg&quot; height=&quot;257&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Antes de mais nada, temos que instalar um servidor web com Apache, Mysql e PHP no CentOS, para isso acesse &lt;a href=&quot;http://herberthudson.blogspot.com.br/2013/04/centos-6-apache2-mysql-php5.html&quot; target=&quot;_blank&quot;&gt;aqui&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Caso já tenha o servidor web, vamos agora adicionar o repositório RPMForge, para isso acesse &lt;a href=&quot;http://herberthudson.blogspot.com.br/2013/04/adicionando-o-repositorio-rpmforge-ao.html&quot; target=&quot;_blank&quot;&gt;aqui&lt;/a&gt;.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
Feito os pré-requisitos, vamos agora instalar o phpMyAdmin, usando o seguinte comando com o usuário root:&lt;br /&gt;
&lt;code&gt;yum install phpMyAdmin&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
Agora vamos reiniciar o apache para aplicar as mudanças:&lt;br /&gt;
&lt;code&gt;service httpd restart&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
Agora, para acessar o phpMyAdmin é só colocar esse endereço pelo navegador:&lt;br /&gt;
&lt;code&gt;http://127.0.0.1/phpmyadmin&lt;/code&gt;
&lt;br /&gt;
&lt;br /&gt;
Até a próxima =)</content><link rel='replies' type='application/atom+xml' href='http://herberthudson.blogspot.com/feeds/5511497201614748851/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4428415202815645943/5511497201614748851?isPopup=true' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4428415202815645943/posts/default/5511497201614748851'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4428415202815645943/posts/default/5511497201614748851'/><link rel='alternate' type='text/html' href='http://herberthudson.blogspot.com/2013/04/instalar-o-phpmyadmin-no-centos-6.html' title='Instalar o phpMyAdmin no CentOS 6'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08733846572980544657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRhyoGIx2hj-8T8Qs_atZLx0Ww8rimYeBWM1XckgfXEruRRTtuRNSFixFiGSgAYQXXpv1O1nO03JPhoQNOXk5xNf_tSy2x-gZSSbjP8L6SJtwPx1UFR7NysTRsb69BXKxuccx6YUNwtfw/s72-c/linux-pinguim-phpmyadmin.jpg" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>Belo Horizonte - MG, República Federativa do Brasil</georss:featurename><georss:point>-19.9190677 -43.938574700000004</georss:point><georss:box>-20.3967782 -44.5840217 -19.4413572 -43.293127700000007</georss:box></entry><entry><id>tag:blogger.com,1999:blog-4428415202815645943.post-2319020532382615956</id><published>2013-04-06T12:37:00.002-03:00</published><updated>2013-04-06T13:34:11.825-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CentOS"/><category scheme="http://www.blogger.com/atom/ns#" term="Download"/><category scheme="http://www.blogger.com/atom/ns#" term="Internet"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="Programas"/><category scheme="http://www.blogger.com/atom/ns#" term="site"/><category scheme="http://www.blogger.com/atom/ns#" term="Tutorial"/><title type='text'>Adicionando o repositório RPMForge ao CentOS 6</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHvIjawI5zL-uRE29Pae1b3vZBt1fXemI-hs9f38V_zBjVtEO3RMybVSbMDo-1WlKaritisy_9Zm_ocaqxHqRotcBw35ps3oIzSB0oxsatrZc9Jg7Vu9b-MI_h9H2Qy6xA-7xbueiLLc0/s1600/img_cento64_01.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHvIjawI5zL-uRE29Pae1b3vZBt1fXemI-hs9f38V_zBjVtEO3RMybVSbMDo-1WlKaritisy_9Zm_ocaqxHqRotcBw35ps3oIzSB0oxsatrZc9Jg7Vu9b-MI_h9H2Qy6xA-7xbueiLLc0/s640/img_cento64_01.jpg&quot; height=&quot;260&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
RPMForge é um repositório da comunidade de pacotes entre outros. Eles oferecem mais de 5000 pacotes para o CentOS, incluindo wine, vlc, mplayer, e outras ferramentas populares de mídias. Ele não faz parte do Red Hat ou do Centos, mas é designado para trabalhar com essas distribuições.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;vamos então instalar a chave GPG:&lt;br /&gt;
&lt;code&gt;rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt&lt;/code&gt;
&lt;br /&gt;
Agora vamos instalar o pacote.&lt;br /&gt;
i686:&lt;br /&gt;
&lt;code&gt; yum install http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm&lt;/code&gt;&lt;br /&gt;
x86_64:
&lt;code&gt; yum install http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm&lt;/code&gt;
&lt;br /&gt;
Feito isso é só instalar o pacote desejado. Para uma lista completa deles acesse &lt;a href=&quot;http://packages.sw.be/&quot;&gt;http://packages.sw.be/&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Fonte:&amp;nbsp;&lt;a href=&quot;http://wiki.centos.org/AdditionalResources/Repositories/RPMForge&quot;&gt;http://wiki.centos.org/AdditionalResources/Repositories/RPMForge&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Até a próxima.</content><link rel='replies' type='application/atom+xml' href='http://herberthudson.blogspot.com/feeds/2319020532382615956/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4428415202815645943/2319020532382615956?isPopup=true' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4428415202815645943/posts/default/2319020532382615956'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4428415202815645943/posts/default/2319020532382615956'/><link rel='alternate' type='text/html' href='http://herberthudson.blogspot.com/2013/04/adicionando-o-repositorio-rpmforge-ao.html' title='Adicionando o repositório RPMForge ao CentOS 6'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08733846572980544657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHvIjawI5zL-uRE29Pae1b3vZBt1fXemI-hs9f38V_zBjVtEO3RMybVSbMDo-1WlKaritisy_9Zm_ocaqxHqRotcBw35ps3oIzSB0oxsatrZc9Jg7Vu9b-MI_h9H2Qy6xA-7xbueiLLc0/s72-c/img_cento64_01.jpg" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>Belo Horizonte - MG, República Federativa do Brasil</georss:featurename><georss:point>-19.9190677 -43.938574700000004</georss:point><georss:box>-20.3967782 -44.5840217 -19.4413572 -43.293127700000007</georss:box></entry><entry><id>tag:blogger.com,1999:blog-4428415202815645943.post-590120247365463321</id><published>2013-04-05T20:29:00.001-03:00</published><updated>2013-04-06T12:17:29.107-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CentOS"/><category scheme="http://www.blogger.com/atom/ns#" term="Internet"/><category scheme="http://www.blogger.com/atom/ns#" term="LAMP"/><category scheme="http://www.blogger.com/atom/ns#" term="Programas"/><category scheme="http://www.blogger.com/atom/ns#" term="site"/><category scheme="http://www.blogger.com/atom/ns#" term="Tutorial"/><category scheme="http://www.blogger.com/atom/ns#" term="VirtualBox"/><title type='text'>CentOS 6 apache2 + mysql + php5</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWtFAo2CY0lNXP3Zx3xFpaVVNR_KNCrChVMdLLHeUFBxlMc8BSSN5fOajIgU66dVIxgVGFcTianc5x3zk4BhuP0WoSkSFGb3tm04GFqFQG5RMaMukemBQM5IhbhvBVzc5mRuSrcTwuc-Y/s1600/centos-baby-penguin.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWtFAo2CY0lNXP3Zx3xFpaVVNR_KNCrChVMdLLHeUFBxlMc8BSSN5fOajIgU66dVIxgVGFcTianc5x3zk4BhuP0WoSkSFGb3tm04GFqFQG5RMaMukemBQM5IhbhvBVzc5mRuSrcTwuc-Y/s1600/centos-baby-penguin.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Neste tutorial irei mostrar como instalar o Apache2&amp;nbsp;+ MySQL&amp;nbsp;+ PHP5.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-size: x-small;&quot;&gt;Obs.: Todos o comandos abaixo são executados com o usuário root&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Vamos então instalar o apache:&lt;br /&gt;
&lt;code&gt;yum install httpd&lt;/code&gt;&lt;br /&gt;
Após instalar vamos configurar o sistema para carregar o apache toda vez que iniciar&lt;br /&gt;
&lt;code&gt;chkconfig --levels 235 httpd on&lt;/code&gt;&lt;br /&gt;
Agora, vamos iniciar o serviço:&lt;br /&gt;
&lt;code&gt;service httpd start&lt;/code&gt;&lt;br /&gt;
Nesta parte iremos instalar o MySQL:&lt;br /&gt;
&lt;code&gt;yum install mysql mysql-server&lt;/code&gt;&lt;br /&gt;
Configurar o sistema para carregar o mysql no início:&lt;br /&gt;
&lt;code&gt;chkconfig --levels 235 mysqld on&lt;/code&gt;&lt;br /&gt;
&amp;nbsp;Iniciamos então o servidor MySQL:&lt;br /&gt;
&lt;code&gt;service mysqld start&lt;/code&gt;&lt;br /&gt;
E então configuramos a senha para a conta root do MySQL:&lt;br /&gt;
&lt;code&gt;mysql_secure_installation&lt;/code&gt;&lt;br /&gt;
Tudo configurado, agora vamos instalar o php:&lt;br /&gt;
&lt;code&gt;yum install php&lt;/code&gt;&lt;br /&gt;
&amp;nbsp;Agora vamos reiniciar o apache para aplicar as alterações:&lt;br /&gt;
&lt;code&gt;service httpd restart&lt;/code&gt;&lt;br /&gt;
Antes de mais nada, vamos adicionar o repositório&amp;nbsp;&lt;a href=&quot;http://wiki.centos.org/AdditionalResources/Repositories/RPMForge&quot; target=&quot;_blank&quot;&gt;rpmforge&lt;/a&gt; ao CentOS, para instalar novos pacotes:&lt;br /&gt;
&lt;code&gt;rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt&lt;/code&gt;&lt;br /&gt;
i386:&lt;br /&gt;
&lt;code&gt;yum install http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm &lt;/code&gt;&lt;br /&gt;
x86_64:&lt;br /&gt;
&lt;code&gt;yum install http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm &lt;/code&gt;&lt;br /&gt;
Feito isso, vamos instalar alguns suportes para o php:&lt;br /&gt;
&lt;code&gt;yum install php-mysql php-gd php-imap php-ldap php-mbstring php-odbc php-pear php-xml php-xmlrpc php-mcrypt&lt;/code&gt;&lt;br /&gt;
Após instalar, vamos reiniciar o apache para que aplique as mudanças:&lt;br /&gt;
&lt;code&gt;service httpd restart&lt;/code&gt;&lt;br /&gt;
Feito isso, o servido web já estará instalado e pronto para usar. Até a próxima =)&lt;br /&gt;
&lt;br /&gt;
Fonte:&amp;nbsp;&lt;a href=&quot;http://www.howtoforge.com/installing-apache2-with-php5-and-mysql-support-on-centos-6.3-lamp&quot;&gt;http://www.howtoforge.com/installing-apache2-with-php5-and-mysql-support-on-centos-6.3-lamp&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://herberthudson.blogspot.com/feeds/590120247365463321/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4428415202815645943/590120247365463321?isPopup=true' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4428415202815645943/posts/default/590120247365463321'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4428415202815645943/posts/default/590120247365463321'/><link rel='alternate' type='text/html' href='http://herberthudson.blogspot.com/2013/04/centos-6-apache2-mysql-php5.html' title='CentOS 6 apache2 + mysql + php5'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08733846572980544657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWtFAo2CY0lNXP3Zx3xFpaVVNR_KNCrChVMdLLHeUFBxlMc8BSSN5fOajIgU66dVIxgVGFcTianc5x3zk4BhuP0WoSkSFGb3tm04GFqFQG5RMaMukemBQM5IhbhvBVzc5mRuSrcTwuc-Y/s72-c/centos-baby-penguin.jpg" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>Belo Horizonte - MG, República Federativa do Brasil</georss:featurename><georss:point>-19.9190677 -43.938574700000004</georss:point><georss:box>-19.9190677 -43.938574700000004 -19.9190677 -43.938574700000004</georss:box></entry><entry><id>tag:blogger.com,1999:blog-4428415202815645943.post-7559940765007993841</id><published>2013-04-05T19:42:00.000-03:00</published><updated>2013-04-05T23:21:12.127-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CentOS"/><category scheme="http://www.blogger.com/atom/ns#" term="Internet"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="ping"/><category scheme="http://www.blogger.com/atom/ns#" term="Tutorial"/><category scheme="http://www.blogger.com/atom/ns#" term="VirtualBox"/><title type='text'>VirtualBox CentOS conectar na internet </title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjp35TUjZRKTdV2xCENHtN0Czf7nOZAHgMUWyrGKyLuTEMfiAlqA7IixtX5TKPYPCxZ5d5XuY88laxWfEd7zSjQPNLGeyGqruzQWHtwTn3YwHlp_GRIyUnhxj7-5hQxBwRWd7kWjPMZoeQ/s1600/3dCentosLogo_by_atti-simon.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjp35TUjZRKTdV2xCENHtN0Czf7nOZAHgMUWyrGKyLuTEMfiAlqA7IixtX5TKPYPCxZ5d5XuY88laxWfEd7zSjQPNLGeyGqruzQWHtwTn3YwHlp_GRIyUnhxj7-5hQxBwRWd7kWjPMZoeQ/s1600/3dCentosLogo_by_atti-simon.png&quot; height=&quot;320&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Após instalar o CentOS no VirtualBox, não conseguia acessar a internet, pesquisando no Google encontrei a resposta, para contornar esse problema basta executar o seguinte comando:&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;code&gt;dhclient -v eth0&lt;/code&gt;&lt;br /&gt;
e testar a conexão:&lt;br /&gt;
&lt;code&gt;ping 8.8.8.8&lt;/code&gt;&lt;br /&gt;
pronto! se estiver tudo ok é só atualizar o sistema. =)</content><link rel='replies' type='application/atom+xml' href='http://herberthudson.blogspot.com/feeds/7559940765007993841/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4428415202815645943/7559940765007993841?isPopup=true' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4428415202815645943/posts/default/7559940765007993841'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4428415202815645943/posts/default/7559940765007993841'/><link rel='alternate' type='text/html' href='http://herberthudson.blogspot.com/2013/04/virtualbox-centos-conectar-na-internet.html' title='VirtualBox CentOS conectar na internet '/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08733846572980544657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjp35TUjZRKTdV2xCENHtN0Czf7nOZAHgMUWyrGKyLuTEMfiAlqA7IixtX5TKPYPCxZ5d5XuY88laxWfEd7zSjQPNLGeyGqruzQWHtwTn3YwHlp_GRIyUnhxj7-5hQxBwRWd7kWjPMZoeQ/s72-c/3dCentosLogo_by_atti-simon.png" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>Belo Horizonte - MG, República Federativa do Brasil</georss:featurename><georss:point>-19.9190677 -43.938574700000004</georss:point><georss:box>-20.3967782 -44.5840217 -19.4413572 -43.293127700000007</georss:box></entry><entry><id>tag:blogger.com,1999:blog-4428415202815645943.post-7094334205839481029</id><published>2012-12-23T18:49:00.000-02:00</published><updated>2013-04-05T23:20:32.549-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="Script"/><category scheme="http://www.blogger.com/atom/ns#" term="Shell"/><category scheme="http://www.blogger.com/atom/ns#" term="Tutorial"/><category scheme="http://www.blogger.com/atom/ns#" term="Ubuntu"/><title type='text'>Fazer backup das bases de dados do MySQL</title><content type='html'>Neste &lt;i&gt;script &lt;/i&gt;aqui mostro como fazer o backup das bases de dados do MySQL utilizando um &lt;i&gt;shell script.&lt;/i&gt;&amp;nbsp;Aqui vai o código:&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
backup_mysql.sh&lt;br /&gt;
&lt;code&gt;#!/usr/bin/bash&lt;br /&gt;
HORA=$(date +%d-%m-%Y_%H:%M:%S)&lt;br /&gt;
DESTINO=$HOME&lt;br /&gt;
SENHA=12345&lt;br /&gt;
mysqldump -u root --password=$SENHA -x -e -A | gzip &amp;gt; $DESTINO/$HORA-backup_mysql.sql.gz&lt;/code&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-wSjnxe7UI0QgPksn0leXTXKCr6jR0g85xt1c_JpRME_GLwoiCpqvXcJospsmLytX1bNe91eUr8e18EGIVxe-Ceb1sTF5kXnmkTVKPDkbXynXntmEL-BQ2PTCOfLz6bW8scU5nZxKfvM/s1600/bash_sm.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-wSjnxe7UI0QgPksn0leXTXKCr6jR0g85xt1c_JpRME_GLwoiCpqvXcJospsmLytX1bNe91eUr8e18EGIVxe-Ceb1sTF5kXnmkTVKPDkbXynXntmEL-BQ2PTCOfLz6bW8scU5nZxKfvM/s1600/bash_sm.png&quot; height=&quot;277&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
esse script pode ser executado manualmente, quando necessitar do backup ou mesmo adicioná-lo ao crontab no Ubuntu.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://herberthudson.blogspot.com/feeds/7094334205839481029/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4428415202815645943/7094334205839481029?isPopup=true' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4428415202815645943/posts/default/7094334205839481029'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4428415202815645943/posts/default/7094334205839481029'/><link rel='alternate' type='text/html' href='http://herberthudson.blogspot.com/2012/12/fazer-backup-das-bases-de-dados-do-mysql.html' title='Fazer backup das bases de dados do MySQL'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08733846572980544657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-wSjnxe7UI0QgPksn0leXTXKCr6jR0g85xt1c_JpRME_GLwoiCpqvXcJospsmLytX1bNe91eUr8e18EGIVxe-Ceb1sTF5kXnmkTVKPDkbXynXntmEL-BQ2PTCOfLz6bW8scU5nZxKfvM/s72-c/bash_sm.png" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>Belo Horizonte - MG, República Federativa do Brasil</georss:featurename><georss:point>-19.9190677 -43.938574700000004</georss:point><georss:box>-20.3967782 -44.5840217 -19.4413572 -43.293127700000007</georss:box></entry><entry><id>tag:blogger.com,1999:blog-4428415202815645943.post-2717620991359274578</id><published>2012-12-16T10:36:00.001-02:00</published><updated>2013-04-05T23:19:59.707-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="Mint"/><category scheme="http://www.blogger.com/atom/ns#" term="Tutorial"/><title type='text'>Editando o menu do Linux Mint 14 &quot;Nadia&quot;</title><content type='html'>Neste simples post irei mostrar como editar opções do menu do &lt;b&gt;Linux Mint 14 &quot;Natia&quot;&lt;/b&gt;, utilizando o &lt;b&gt;Cinnamon 1.6&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
Primeiro temos que instalar o &lt;i&gt;Alacarte&lt;/i&gt;, ele é o programa que usaremos para editar o menu.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;
&lt;br /&gt;
Clique &lt;a href=&quot;apt:sudo apt-get install alacarte&quot;&gt;aqui&lt;/a&gt; para instalar ou digite isso no terminal:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;$ sudo apt-get install alacarte&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
ou se preferir ainda acesse o &lt;i&gt;Gerenciador de Aplicativos&lt;/i&gt; em &lt;i&gt;Administração&lt;/i&gt; no Menu e pesquise por &lt;i&gt;Alacarte.&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;
aqui a imagem do programa:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3KoQ9j062CHRd_igansgTNgGFkDSdQfsBpOrbfyKN7GqOhemlRr1vMPkbUU4TRMJ7mGfRImrRb__PWkwrM92am-eQ9qKRBkwp28ilTiN7-1Xw_yXWSQnb299LH8rb7qv6ygZJYwjyu6M/s1600/alacarte2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3KoQ9j062CHRd_igansgTNgGFkDSdQfsBpOrbfyKN7GqOhemlRr1vMPkbUU4TRMJ7mGfRImrRb__PWkwrM92am-eQ9qKRBkwp28ilTiN7-1Xw_yXWSQnb299LH8rb7qv6ygZJYwjyu6M/s1600/alacarte2.png&quot; height=&quot;327&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
ele se encontro no menu em &lt;i&gt;Acessórios -&amp;gt; Menu principal&lt;/i&gt;:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiUv3UYDPktx7MR6rtYoy2g9YK1a_VukLBI_T6pM0vPzfjfbTa_cvBPkqcC85MJQmN0nRr43iUR-BcT5wrCMiy0-99pcz7ZpnW7sC0-xvUJ0kMAdKVxk8PFTwizIPA7AHDuKofiYx_NZ8/s1600/alacarte1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiUv3UYDPktx7MR6rtYoy2g9YK1a_VukLBI_T6pM0vPzfjfbTa_cvBPkqcC85MJQmN0nRr43iUR-BcT5wrCMiy0-99pcz7ZpnW7sC0-xvUJ0kMAdKVxk8PFTwizIPA7AHDuKofiYx_NZ8/s1600/alacarte1.png&quot; height=&quot;367&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Espero ter ajudado, até a próxima.&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://herberthudson.blogspot.com/feeds/2717620991359274578/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4428415202815645943/2717620991359274578?isPopup=true' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4428415202815645943/posts/default/2717620991359274578'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4428415202815645943/posts/default/2717620991359274578'/><link rel='alternate' type='text/html' href='http://herberthudson.blogspot.com/2012/12/editando-o-menu-do-linux-mint-14-nadia.html' title='Editando o menu do Linux Mint 14 &quot;Nadia&quot;'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08733846572980544657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3KoQ9j062CHRd_igansgTNgGFkDSdQfsBpOrbfyKN7GqOhemlRr1vMPkbUU4TRMJ7mGfRImrRb__PWkwrM92am-eQ9qKRBkwp28ilTiN7-1Xw_yXWSQnb299LH8rb7qv6ygZJYwjyu6M/s72-c/alacarte2.png" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>Belo Horizonte - MG, Brasil</georss:featurename><georss:point>-19.9190677 -43.9385747</georss:point><georss:box>-20.1579287 -44.2544317 -19.6802067 -43.622717699999995</georss:box></entry><entry><id>tag:blogger.com,1999:blog-4428415202815645943.post-4453933152724370417</id><published>2012-08-04T18:06:00.000-03:00</published><updated>2013-11-11T08:24:25.272-02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="gtk"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><category scheme="http://www.blogger.com/atom/ns#" term="Script"/><category scheme="http://www.blogger.com/atom/ns#" term="Ubuntu"/><title type='text'>Caracteres especiais no Ubuntu versão 1.1.0</title><content type='html'>&lt;div xmlns=&#39;http://www.w3.org/1999/xhtml&#39;&gt;&lt;p&gt;Neste post venho mostrar algumas inclusões e melhorias que fiz no script em Python para adicionar o caracteres especiais no ubuntu (ou qualquer outro Linux). Neste versão 1.1.0 adicionei mais caracteres além 255 que tinham na versão anterior, agora são 718 com emotions/emoji e além disso, adicionei a opção de múltiplos códigos.&lt;br/&gt;&lt;br/&gt;&#39;681&#39; = &#39;(╯_╰)&#39;&lt;br/&gt;&#39;682&#39; = &#39;(╯3╰)&#39;&lt;br/&gt;&#39;683&#39; = &#39;(o_-)&#39;&lt;br/&gt;&#39;684&#39; = &#39;(¬‿¬)&#39;&lt;br/&gt;&#39;685&#39; = &#39;(◣_◢)&#39;&lt;br/&gt;&lt;br/&gt;O link para download você encontra aqui:&lt;br/&gt;&lt;a href=&#39;https://bitbucket.org/herberthudson/clipemotion/src&#39;&gt;https://bitbucket.org/herberthudson/clipemotion/src&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Para utilizar é simples, basta acessar pelo terminal o diretório onde está o arquivo Clipemotion.py e executar:&lt;br/&gt;&lt;br/&gt;python Clipemotion.py [código]&lt;br/&gt;&lt;br/&gt;ou&lt;br/&gt;&lt;br/&gt;python Clipemotion.py [código] [código] ... [ncódigo]&lt;br/&gt;&lt;br/&gt;exemplo:&lt;br/&gt;&lt;br/&gt;python Clipemotion.py 3&lt;br/&gt;python Clipemotion.py 3 711 618&lt;br/&gt;&lt;br/&gt;mais detalhes no outro &lt;a href=&#39;http://herberthudson.blogspot.com.br/2012/05/caracteres-especiais-no-ubuntu.html&#39;&gt;post&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;deixe seu comentário...&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;/p&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://herberthudson.blogspot.com/feeds/4453933152724370417/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4428415202815645943/4453933152724370417?isPopup=true' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4428415202815645943/posts/default/4453933152724370417'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4428415202815645943/posts/default/4453933152724370417'/><link rel='alternate' type='text/html' href='http://herberthudson.blogspot.com/2012/08/caracteres-especiais-no-ubuntu-versao.html' title='Caracteres especiais no Ubuntu versão 1.1.0'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08733846572980544657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>Belo Horizonte - MG, Brasil</georss:featurename><georss:point>-19.9190677 -43.9385747</georss:point><georss:box>-20.1579287 -44.2544317 -19.6802067 -43.622717699999995</georss:box></entry><entry><id>tag:blogger.com,1999:blog-4428415202815645943.post-5473048457931832605</id><published>2012-05-03T23:42:00.001-03:00</published><updated>2013-04-05T23:18:54.711-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="Programas"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><category scheme="http://www.blogger.com/atom/ns#" term="Script"/><category scheme="http://www.blogger.com/atom/ns#" term="Ubuntu"/><title type='text'>Caracteres especiais no Ubuntu</title><content type='html'>&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif; font-size: large;&quot;&gt;Caracteres especiais no Ubuntu&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &#39;Helvetica Neue&#39;, Arial, Helvetica, sans-serif; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
Como no Ubuntu não possui os atalhos para caracteres especiais, no qual existe no Windows(Alt+code), resolvi então criar uma alternativa para poder adicionar esses caracteres usando atalhos no Ubuntu.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
O script se encontra nesse link:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://bitbucket.org/herberthudson/clipemotion/src&quot;&gt;https://bitbucket.org/herberthudson/clipemotion/src&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Quem sabe trabalhar com github, fique a vontade, quem não sabe, só abrir clicar em Clipemotion.py e&amp;nbsp;copiar o código na página e&amp;nbsp;salvar em um arquivo com o nome Clipemotion.py, feito isso vamos a forma de uso:&lt;br /&gt;
&lt;br /&gt;
no terminal é só colocar assim:&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;python /caminho/para/o/arquivo/Clipemotion.py&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
um exemplo:&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;python /home/herbert/Clipemotion.py 13&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
ou se estiver no próprio diretório:&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;python Clipemotion.py 13&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Com isso ele adicionará o caracter &#39;♪&#39; na área de transferência, e é só colar em qualquer campo de texto, é automático...&lt;/div&gt;
&lt;div&gt;
Agora criando o atalho siga o procedimento no ubuntu: Sistema-&amp;gt;Preferências-&amp;gt;atalhos de teclado vá em atalhos personalizados e adicione um atalho, o nome pode ser de sua preferência, no comando coloque a forma de uso&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace; font-size: x-small;&quot;&gt;&lt;b&gt;python /caminho/para/o/arquivo/Clipemotion.py&lt;/b&gt;&lt;/span&gt;  e depois coloque o atalho, exemplo: Ctrl+1 aí toda vez que quiser esse caracter é só fazer a sequência Ctrl+1&lt;br /&gt;
&lt;br /&gt;
Dúvidas? só comentar &lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://herberthudson.blogspot.com/feeds/5473048457931832605/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4428415202815645943/5473048457931832605?isPopup=true' title='3 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4428415202815645943/posts/default/5473048457931832605'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4428415202815645943/posts/default/5473048457931832605'/><link rel='alternate' type='text/html' href='http://herberthudson.blogspot.com/2012/05/caracteres-especiais-no-ubuntu.html' title='Caracteres especiais no Ubuntu'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08733846572980544657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total><georss:featurename>Belo Horizonte - MG, Brasil</georss:featurename><georss:point>-19.9190677 -43.9385747</georss:point><georss:box>-20.1579287 -44.2544317 -19.6802067 -43.622717699999995</georss:box></entry><entry><id>tag:blogger.com,1999:blog-4428415202815645943.post-4444415987950542332</id><published>2011-09-07T22:00:00.002-03:00</published><updated>2011-09-07T22:01:17.495-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PyQt4"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><category scheme="http://www.blogger.com/atom/ns#" term="Qt"/><title type='text'>Simples programa em Pyqt e QtDesigner</title><content type='html'>Nesse exemplo vou utilizar o &lt;i&gt;QtDesigner&lt;/i&gt; para criar uma janela simples, e o &lt;i&gt;pyuic&lt;/i&gt; para transformar o arquivo ui em python.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
essa vai ser a jenela.ui:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghZzg6v6Fdlq0OzH2Hj0jwzfdjXszFgkW1tVSYfS9p0fAWRdUSt6vujBUBGrP1CVpQqAos8T9MQ_2FmvrSRWYitT3VMJPgF-evRsLK3HkKb8ZtZONu3NlQSgu_JE1yJAxlVo1kxjX54dw/s1600/janelaui.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;252&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghZzg6v6Fdlq0OzH2Hj0jwzfdjXszFgkW1tVSYfS9p0fAWRdUSt6vujBUBGrP1CVpQqAos8T9MQ_2FmvrSRWYitT3VMJPgF-evRsLK3HkKb8ZtZONu3NlQSgu_JE1yJAxlVo1kxjX54dw/s320/janelaui.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
agora após usar o pyuic:&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;pyuic4 Janela.ui &amp;gt; Janela.py&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
o código gerado:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;
from PyQt4 import QtCore, QtGui&lt;br /&gt;
&lt;br /&gt;
try:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; _fromUtf8 = QtCore.QString.fromUtf8&lt;br /&gt;
except AttributeError:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; _fromUtf8 = lambda s: s&lt;br /&gt;
&lt;br /&gt;
class Ui_MainWindow(object):&lt;br /&gt;
&amp;nbsp; &amp;nbsp; def setupUi(self, MainWindow):&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MainWindow.setObjectName(_fromUtf8(&quot;MainWindow&quot;))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MainWindow.resize(317, 228)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.centralwidget = QtGui.QWidget(MainWindow)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.centralwidget.setObjectName(_fromUtf8(&quot;centralwidget&quot;))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MainWindow.setCentralWidget(self.centralwidget)&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.retranslateUi(MainWindow)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; QtCore.QMetaObject.connectSlotsByName(MainWindow)&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; def retranslateUi(self, MainWindow):&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MainWindow.setWindowTitle(QtGui.QApplication.translate(&quot;MainWindow&quot;, &quot;Simples Programa&quot;, None, QtGui.QApplication.UnicodeUTF8))&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
agora vamos criar o arquivo principal Programa.py:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;
import sys&lt;br /&gt;
from PyQt4.QtGui import QApplication, QMainWindow&lt;br /&gt;
from Janela import Ui_MainWindow&lt;br /&gt;
&lt;br /&gt;
class JanelaPrincipal(QMainWindow, Ui_MainWindow):&lt;br /&gt;
&amp;nbsp; &amp;nbsp; def __init__(self):&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; QMainWindow.__init__(self)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.setupUi(self)&lt;br /&gt;
&lt;br /&gt;
app = QApplication(sys.argv)&lt;br /&gt;
janela = JanelaPrincipal()&lt;br /&gt;
janela.show()&lt;br /&gt;
&lt;br /&gt;
sys.exit(app.exec_())
&lt;/code&gt;
&lt;br /&gt;
&lt;br /&gt;
agora, comentar o código:&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace;&quot;&gt;import sys&lt;br /&gt;from PyQt4.QtGui import QApplication, QMainWindow&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
aqui importamos as bibliotecas que iremos utilizar&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace;&quot;&gt;from Janela import Ui_MainWindow&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
aqui também iremos importar, mas nesse caso a janela que criamos com o &lt;i&gt;QtDesigner&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace;&quot;&gt;class JanelaPrincipal(QMainWindow, Ui_MainWindow):&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
aqui criamos a classe &lt;i&gt;JanelaPrincipal&lt;/i&gt; e herdamos as classes &lt;i&gt;QMainWindow&lt;/i&gt; e &lt;i&gt;Ui_MainWindow&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace;&quot;&gt;def __init__(self):&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; QMainWindow.__init__(self)&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; self.setupUi(self)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
aqui definimos o construtor e iniciamos o construtor também da classe herdada &lt;i&gt;QMainWindow&lt;/i&gt; e executamos o metódo &lt;i&gt;setupUi()&lt;/i&gt; de construção da janela que foi herdado da &lt;i&gt;Ui_MainWindow&lt;/i&gt; e passamos como&amp;nbsp;parâmetro a própria class pois ela herda da classe &lt;i&gt;QMainWindow&amp;nbsp;&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace;&quot;&gt;app = QApplication(sys.argv)&lt;br /&gt;janela = JanelaPrincipal()&lt;br /&gt;janela.show()&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace;&quot;&gt;sys.exit(app.exec_())&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
aqui criamos a aplicação, a instância da classe &lt;i&gt;JanelaPrincipal&lt;/i&gt; e chamamos o método público &lt;i&gt;show()&lt;/i&gt; para criar a janela, e finalizamos com &lt;i&gt;sys.exit(app.exec_())&lt;/i&gt;&amp;nbsp;para executar a aplicação&lt;br /&gt;
&lt;br /&gt;
está aí, simples não é?&lt;br /&gt;
&lt;br /&gt;
até a próxima...</content><link rel='replies' type='application/atom+xml' href='http://herberthudson.blogspot.com/feeds/4444415987950542332/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4428415202815645943/4444415987950542332?isPopup=true' title='2 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4428415202815645943/posts/default/4444415987950542332'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4428415202815645943/posts/default/4444415987950542332'/><link rel='alternate' type='text/html' href='http://herberthudson.blogspot.com/2011/09/simples-programa-em-pyqt-e-qtdesigner.html' title='Simples programa em Pyqt e QtDesigner'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08733846572980544657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghZzg6v6Fdlq0OzH2Hj0jwzfdjXszFgkW1tVSYfS9p0fAWRdUSt6vujBUBGrP1CVpQqAos8T9MQ_2FmvrSRWYitT3VMJPgF-evRsLK3HkKb8ZtZONu3NlQSgu_JE1yJAxlVo1kxjX54dw/s72-c/janelaui.png" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4428415202815645943.post-7301965066960602202</id><published>2011-09-07T20:24:00.000-03:00</published><updated>2011-09-08T12:37:29.246-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Chrome"/><category scheme="http://www.blogger.com/atom/ns#" term="Download"/><category scheme="http://www.blogger.com/atom/ns#" term="Extensões"/><category scheme="http://www.blogger.com/atom/ns#" term="Programas"/><title type='text'>Adicionando o JDownloader a Extensão Download Assintent no Chrome Linux</title><content type='html'>Neste post irei mostrar como adicionar o &lt;i&gt;JDownloader&lt;/i&gt;&amp;nbsp;a extensão &lt;i&gt;Download Assistent&lt;/i&gt;&amp;nbsp;no &lt;i&gt;Chrome&lt;/i&gt; do Linux. Os Programas podem ser baixados nestes links:&lt;br /&gt;
&lt;br /&gt;
JDownloader =&amp;nbsp;&lt;a href=&quot;http://jdownloader.org/download/index&quot;&gt;http://jdownloader.org/download/index&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Download Assistent =&amp;nbsp;&lt;a href=&quot;https://chrome.google.com/webstore/detail/mfjkgbjaikamkkojmakjclmkianficch?hl=pt-BR&quot;&gt;https://chrome.google.com/webstore/detail/mfjkgbjaikamkkojmakjclmkianficch?hl=pt-BR&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
O &lt;i&gt;JDownloader&lt;/i&gt; possui 3 tipos de arquivo o &lt;i&gt;shell script installer&lt;/i&gt;, o &lt;i&gt;Ubuntu package&lt;/i&gt;, e o &quot;zipado&quot;, nesse exemplo vou utilizar o &quot;zipado&quot; pelo motivo de que no passado tive problemas com o programa instalado no sistema, então resolvi colocar na pasta do usuário e o tenho até hoje, e como nunca precisei instalar e confirmar se tudo está beleza na instalação do sistema, o utilizo assim.&lt;br /&gt;
&lt;br /&gt;
Descompacte em uma pasta, o meu ficou em &quot;/home/herbert/Programas/JDownloader/&quot;, e após instalar o&lt;i&gt;&amp;nbsp;Download Assistent &lt;/i&gt;no &lt;i&gt;Chrome&lt;/i&gt;, vamos a configuração:&lt;br /&gt;
&lt;br /&gt;
abra --&amp;gt;Ferramentas--&amp;gt;Extensões no &lt;i&gt;Chrome&lt;/i&gt;, em opções no &lt;i&gt;Download Assistent &lt;/i&gt;na aba &lt;i&gt;Add More Downloaders &lt;/i&gt;você vai colocar assim:&lt;br /&gt;
&lt;br /&gt;
Icon =&amp;nbsp;http://jdownloader.org/_media/knowledge/wiki/jdownloader.png?w=150&lt;br /&gt;
Name = JDownloader&lt;br /&gt;
Command line =&amp;nbsp;java -jar /home/herbert/Programas/JDownloader/JDownloader.jar -a $URL&lt;br /&gt;
&lt;br /&gt;
E na opção&amp;nbsp;&lt;i&gt;Select Default Downloader &lt;/i&gt;altere para JDownloader, e reinicie o navegador, e se por um motivo não chamar o JDownloader&amp;nbsp;automaticamente,&amp;nbsp;é só clicar com o botão direito no link e em &lt;i&gt;Download Assitent --&amp;gt; Download link with JDownloader &lt;/i&gt;e o programa vai abrir e já adicionar o link, depois é só diversão.&lt;br /&gt;
&lt;br /&gt;
até a próxima...</content><link rel='replies' type='application/atom+xml' href='http://herberthudson.blogspot.com/feeds/7301965066960602202/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4428415202815645943/7301965066960602202?isPopup=true' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4428415202815645943/posts/default/7301965066960602202'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4428415202815645943/posts/default/7301965066960602202'/><link rel='alternate' type='text/html' href='http://herberthudson.blogspot.com/2011/09/adicionando-o-jdownloader-extensao.html' title='Adicionando o JDownloader a Extensão Download Assintent no Chrome Linux'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08733846572980544657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total><georss:featurename>Belo Horizonte - MG, Brasil</georss:featurename><georss:point>-19.9190677 -43.9385747</georss:point><georss:box>-20.0384977 -44.096503199999994 -19.799637699999998 -43.7806462</georss:box></entry><entry><id>tag:blogger.com,1999:blog-4428415202815645943.post-2680822749804463669</id><published>2011-09-04T10:42:00.002-03:00</published><updated>2011-09-04T10:42:17.704-03:00</updated><title type='text'>Instalando o Cx_freeze no linux</title><content type='html'>O Cx_freeze é um programa(melhor script) em python para transformar seu(s) código(s) python em um único arquivo&amp;nbsp;executável, incluindo todas as importações do código, ou seja as bibliotecas. Mas aí vem a pergunta: Qual é a vantagem? Simples! com isso você poderá&amp;nbsp;distribuir seu &quot;programa&quot; sem que o usuário precise instalar o python ou as bibliotecas no seu sistema para executar o programa, ele já é compilado com tudo, assim facilitando a vida de muita gente!&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;Então vamos lá, vou contar o que aconteceu comigo para conseguir instalá-lo no meu linux, primeiro fui lá e baixei o arquivo &lt;a href=&quot;http://cx-freeze.sourceforge.net/&quot;&gt;cx_freeze&lt;/a&gt; e descompactei, e então abri o diretório pelo terminal, e&amp;nbsp;após isso rodei então o comando que pedia no arquivo README.txt:&lt;br /&gt;
&lt;br /&gt;
python setup.py build&lt;br /&gt;
&lt;br /&gt;
e recebi aquele erro que arquivo ou diretório não foi encontrado, tentei o próximo comando, vai que dar certo(como eu sou ingenuo):&lt;br /&gt;
&lt;br /&gt;
python setup.py install&lt;br /&gt;
&lt;br /&gt;
e o mesmo problema. Já estava desanimado, nem pensei eu seguir o erro. Após passar vários dias decidir tentar novamente, já tinha mudado o linux, vou tentar. Aí veio o mesmo erro, mas agora o acompanhei e falava sobre o arquivo no diretório &quot;cx_freeze-4.2.3/source/util.c:6:20...&quot; abri o arquivo e lá na linha 6 como indicava no erro, estava assim &quot;#include &lt;python.h&gt;&quot;, procurei no diretório e nada, pensei &quot;não é possível, tem alguma coisa errada, o python esta instalado, não era pra dar erro, era pra incluir a biblioteca Python.h&quot; que deve estar no linux, e é nessas horas que descobrimos como nosso&amp;nbsp;cérebro e tão magnífico, tive simplesmente um &quot;flash&quot; de uma situação passada que me aconteceu quando estava tentando instalar outro programa que não me lembro, mas a parte importante que resolveria, eu lembrei, que quando instalei o pacote &quot;dev&quot;&amp;nbsp;do programa, que era o código fonte, simplesmente funcionou. Então o&amp;nbsp;raciocínio&amp;nbsp;veio em questão de segundo, instalar o pacote python-dev, abri o Synaptic e o fiz, adivinha!&lt;/python.h&gt;&lt;br /&gt;
&lt;br /&gt;
rodei o comando novamente:&lt;br /&gt;
&lt;br /&gt;
python setup.py build&lt;br /&gt;
&lt;br /&gt;
e ele passou pelo erro em uma beleza só, como se estivesse assistindo o filme &quot;Matrix&quot; pela primeira vez(momento&amp;nbsp;viajem)... e no final ainda pediu para dar mudar a permissão do arquivo build/scripts-2.7/cxfreeze de 644 para 755, não perdi tempo, partir logo para mudar, não estou afim de ver outro erro, alterei a permissão e rodei o segundo comando:&lt;br /&gt;
&lt;br /&gt;
python setup.py install&lt;br /&gt;
&lt;br /&gt;
com a mesma elegância do primeiro, o segundo passou pelo erro, e simplesmente finalizou.&lt;br /&gt;
&lt;br /&gt;
Então para verificar se estava instalado, executei o comando:&lt;br /&gt;
&lt;br /&gt;
cxfreeze&lt;br /&gt;
&lt;br /&gt;
e lá estava o helper dele, deu tudo certo!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
até a próxima...</content><link rel='replies' type='application/atom+xml' href='http://herberthudson.blogspot.com/feeds/2680822749804463669/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4428415202815645943/2680822749804463669?isPopup=true' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4428415202815645943/posts/default/2680822749804463669'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4428415202815645943/posts/default/2680822749804463669'/><link rel='alternate' type='text/html' href='http://herberthudson.blogspot.com/2011/09/instalando-o-cxfreeze-no-linux.html' title='Instalando o Cx_freeze no linux'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08733846572980544657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4428415202815645943.post-2010779294036244227</id><published>2011-08-29T15:33:00.002-03:00</published><updated>2011-09-01T20:13:07.104-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PyQt4"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><category scheme="http://www.blogger.com/atom/ns#" term="Qt"/><title type='text'>Simples programa em PyQt4</title><content type='html'>Neste post irei mostrar um simples programa em python com qt4, retirado do site &lt;a href=&quot;http://zetcode.com/tutorials/pyqt4/firstprograms/&quot;&gt;zetcode.com&lt;/a&gt;. Será uma simples janela que pode ser redimensionada, minimizada, maximizada.&lt;br /&gt;
&lt;br /&gt;
Vamos então ao código:&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;
&lt;code&gt;&lt;br /&gt;
#!/usr/bin/python&lt;br /&gt;
&lt;br /&gt;
# simples-programa.py&lt;br /&gt;
&lt;br /&gt;
import sys&lt;br /&gt;
from PyQt4 import QtGui&lt;br /&gt;
&lt;br /&gt;
app = QtGui.QApplication(sys.argv)&lt;br /&gt;
&lt;br /&gt;
widget = QtGui.QWidget()&lt;br /&gt;
widget.resize(250, 150)&lt;br /&gt;
widget.setWindowTitle(&#39;Simples Janela!&#39;)&lt;br /&gt;
widget.show()&lt;br /&gt;
&lt;br /&gt;
sys.exit(app.exec_())&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
Esse código assim irá mostrar uma pequena janela na tela.&lt;br /&gt;
&lt;br /&gt;
Agora uma revisada básica no código:&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
import sys&lt;br /&gt;
from PyQt4 import QtGui&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
Aqui nós importamos os códigos necessários, como os &#39;widgets&#39;, que estão localizados em QtGui.&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
app = QtGui.QApplication(sys.argv)&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
Para todo código PyQt4 é necessário criar um Objeto Aplicativo(Application object) que está localizado em QtGui, já o parâmetro “sys.argv” é a lista de argumentos passados via linha de comando, caso execute pelo shell.&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
widget = QtGui.Qwidget()&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
O Qwidget é a classe base de todo objeto interface do usuário em PyQt4.&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
widget.resize(250, 150)&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
O método “resize()” é onde definimos a altura e largura do widget.&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
widget.setWindowTitle(&#39;Simples Janela!&#39;)&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
Neste método definimos o titulo para nossa janela, que será exibido na barra de titulo.&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
widget.show()&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
O método “show” exibe a janela na tela.&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
sys.exit(app.exec_())&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
Aqui nesta última linha entra o “loop” principal da aplicação, os eventos são manipulados a partir deste ponto, onde o “loop” principal recebe os eventos da janela do sistema e encaminha então para o aplicativo “widget”.&lt;br /&gt;
&lt;br /&gt;
Para finalizarmos a janela, chamamos o método “exit()”, e então o “widget” principal é destruído. O método “sys.exit()” garante uma saída limpa.&lt;br /&gt;
&lt;br /&gt;
A imagem da janela:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZYE_G9al0K1y4g2przaW2ftVp18-3544Zc7tKR4SiZgk9PlQjiJiL79qbFrmxnMbjUdnRPtqayJDkWw6ofCnMnCWpDEYF_-aGlVGfD34vgef99SXSHzXxxtYafdIYN0aHyyarOW55-M0/s1600/simples-programa-pyqt4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;192&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZYE_G9al0K1y4g2przaW2ftVp18-3544Zc7tKR4SiZgk9PlQjiJiL79qbFrmxnMbjUdnRPtqayJDkWw6ofCnMnCWpDEYF_-aGlVGfD34vgef99SXSHzXxxtYafdIYN0aHyyarOW55-M0/s320/simples-programa-pyqt4.png&quot; width=&quot;260&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
até a próxima...&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://herberthudson.blogspot.com/feeds/2010779294036244227/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4428415202815645943/2010779294036244227?isPopup=true' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4428415202815645943/posts/default/2010779294036244227'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4428415202815645943/posts/default/2010779294036244227'/><link rel='alternate' type='text/html' href='http://herberthudson.blogspot.com/2011/08/simples-programa-em-pyqt4-neste-post.html' title='Simples programa em PyQt4'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08733846572980544657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZYE_G9al0K1y4g2przaW2ftVp18-3544Zc7tKR4SiZgk9PlQjiJiL79qbFrmxnMbjUdnRPtqayJDkWw6ofCnMnCWpDEYF_-aGlVGfD34vgef99SXSHzXxxtYafdIYN0aHyyarOW55-M0/s72-c/simples-programa-pyqt4.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4428415202815645943.post-7081173606054147590</id><published>2010-09-26T11:37:00.002-03:00</published><updated>2010-10-28T18:44:56.486-02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="C#.net"/><title type='text'>Classe C#.net para conexão MySql</title><content type='html'>Após criar a &lt;a href=&quot;http://herberthudson.blogspot.com/2010/09/durante-muito-tempo-procurando-na.html&quot;&gt;Classe VB.net para conexão com Banco de Dados MySql&lt;/a&gt;&amp;nbsp;resolvi criar então uma classe em C#.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
O código:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
using System;&lt;br /&gt;
using System.Collections.Generic;&lt;br /&gt;
using System.Linq;&lt;br /&gt;
using System.Text;&lt;br /&gt;
using MySql.Data.MySqlClient;&lt;br /&gt;
using System.Data;&lt;br /&gt;
&lt;br /&gt;
namespace Conexao_mysql&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;class ConexaoMySql&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;private string _servidorEndereco, _servidorUsuario, _servidorSenha, _servidorBD;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;private MySqlConnection con = new MySqlConnection();&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;private MySqlDataAdapter dap = new MySqlDataAdapter();&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;private MySqlDataReader dataReaderMy;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;private MySqlCommand com;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;private DataTable dat = new DataTable();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public string servidorEndereco&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;get { return _servidorEndereco; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;set { _servidorEndereco = value; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public string servidorUsuario&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;get { return _servidorUsuario; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;set { _servidorUsuario = value; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public string servidorSenha&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;get { return _servidorSenha; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;set { _servidorSenha = value; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public string servidorBD&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;get { return _servidorBD; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;set { _servidorBD = value; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public ConexaoMySql(string servEndereco, string servUsuario, string servSenha, string servBD)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;this.servidorEndereco = servEndereco;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;this.servidorUsuario = servUsuario;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;this.servidorSenha = servSenha;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;this.servidorBD = servBD;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public bool conectar()&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if ((con.State == ConnectionState.Broken) || (con.State == ConnectionState.Closed))&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;try&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;this.con.ConnectionString = &quot;server=&quot; + servidorEndereco + &quot;;user id=&quot; + servidorUsuario + &quot;;password=&quot; + servidorSenha + &quot;; database=&quot; + servidorBD;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;this.con.Open();&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return true;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;catch&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return false;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return true;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public void fechar()&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if ((con.State == ConnectionState.Open) || (con.State == ConnectionState.Executing) || (con.State == ConnectionState.Fetching))&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;con.Close();&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;con.Dispose();&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;con = null;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public MySqlDataReader myDataReader(string sql)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;try&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;this.conectar();&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;this.com = new MySqlCommand(sql,con);&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;this.dataReaderMy = com.ExecuteReader();&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return this.dataReaderMy;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;catch&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return this.dataReaderMy;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public bool myComando(string sql)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;try&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;this.conectar();&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;this.com = new MySqlCommand(sql,con);&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;this.com.ExecuteNonQuery();&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return true;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;catch&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return false;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public DataTable myDataTable(string sql)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;try&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;this.conectar();&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;this.com = new MySqlCommand(sql, con);&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;this.com.CommandType = CommandType.Text;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;this.com.CommandText = sql;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dap.SelectCommand = this.com;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dap.Fill(dat);&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dap.Dispose();&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return dat;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;catch&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return dat;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;br /&gt;
}&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://herberthudson.blogspot.com/feeds/7081173606054147590/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4428415202815645943/7081173606054147590?isPopup=true' title='2 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4428415202815645943/posts/default/7081173606054147590'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4428415202815645943/posts/default/7081173606054147590'/><link rel='alternate' type='text/html' href='http://herberthudson.blogspot.com/2010/09/classe-cnet-para-conexao-mysql.html' title='Classe C#.net para conexão MySql'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08733846572980544657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4428415202815645943.post-1732239800773335319</id><published>2010-09-25T14:23:00.002-03:00</published><updated>2010-10-28T18:45:33.334-02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="VB.net"/><title type='text'>Utilizando classe de Conexao VB.net Mysql. Exemplo 3</title><content type='html'>Neste exemplo irei mostrar como utilizar a Classe VB.net MySql para preencher um datagridview.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
Código:&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Try&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim cn As New ConexaoMySql(&quot;localhost&quot;, &quot;root&quot;, &quot;&quot;, &quot;sistema&quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim sql As String = &quot;SELECT * FROM usuario&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DataGridView1.DataSource = cn.ExecutaDataTable(sql)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MessageBox.Show(&quot;DataGrid preenchido&quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Catch ex As Exception&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MessageBox.Show(ex.Message)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End Try&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
Esse exemplo está levando em conta que você já criou um elemento do datagridview com o nome de DataGridView1&lt;br /&gt;
&lt;br /&gt;
A classe se encontra &lt;a href=&quot;http://herberthudson.blogspot.com/2010/09/durante-muito-tempo-procurando-na.html&quot;&gt;aqui&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Obs.: Todos os exemplos com a Classe VB.net Mysql, devem possuir a referência do MySqlConnector, e pode ser baixada &lt;a href=&quot;http://dev.mysql.com/downloads/connector/net/&quot;&gt;aqui&lt;/a&gt;. Após baixar é só adicionar a referência da biblioteca, e incluir no começo do código:&lt;br /&gt;
&lt;code&gt;Imports MySql.Data.MySqlClient&lt;/code&gt;</content><link rel='replies' type='application/atom+xml' href='http://herberthudson.blogspot.com/feeds/1732239800773335319/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4428415202815645943/1732239800773335319?isPopup=true' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4428415202815645943/posts/default/1732239800773335319'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4428415202815645943/posts/default/1732239800773335319'/><link rel='alternate' type='text/html' href='http://herberthudson.blogspot.com/2010/09/utilizando-classe-de-conexao-vbnet_7104.html' title='Utilizando classe de Conexao VB.net Mysql. Exemplo 3'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08733846572980544657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4428415202815645943.post-1281820319036971138</id><published>2010-09-25T13:13:00.006-03:00</published><updated>2010-10-28T18:46:19.997-02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="VB.net"/><title type='text'>Utilizando classe de Conexao VB.net Mysql. Exemplo 2</title><content type='html'>Agora vou mostrar outro exemplo de como utilizar o&amp;nbsp;&lt;a href=&quot;http://dev.mysql.com/doc/refman/5.1/en/connector-net-ref-mysqlclient.html#connector-net-ref-mysqlclient-mysqldatareader&quot;&gt;DataReader&lt;/a&gt;&amp;nbsp;do &lt;a href=&quot;http://dev.mysql.com/doc/refman/5.1/en/connector-net.html&quot;&gt;MySqlConnector&lt;/a&gt;.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Try&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim cn As New ConexaoMySql(&quot;localhost&quot;, &quot;root&quot;, &quot;&quot;, &quot;sistema&quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim dr As MySqlDataReader&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim sql As String = &quot;SELECT * FROM usuario WHERE login=&#39;herberthudson&#39;&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dr = cn.ExecutaDataRead(sql)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;While dr.Read&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MessageBox.Show(dr(0))&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MessageBox.Show(dr(&quot;login&quot;))&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MessageBox.Show(dr(2))&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MessageBox.Show(dr(3))&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MessageBox.Show(dr(4))&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End While&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cn.DesconectarMySql()&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Catch ex As Exception&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MessageBox.Show(ex.Message)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End Try&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
A classe se encontra &lt;a href=&quot;http://herberthudson.blogspot.com/2010/09/durante-muito-tempo-procurando-na.html&quot;&gt;aqui&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Obs.: Todos os exemplos com a Classe VB.net Mysql, devem possuir a referência do MySqlConnector, e pode ser baixada &lt;a href=&quot;http://dev.mysql.com/downloads/connector/net/&quot;&gt;aqui&lt;/a&gt;. Após baixar é só adicionar a referência da biblioteca, e incluir no começo do código:&lt;br /&gt;
&lt;code&gt;Imports MySql.Data.MySqlClient&lt;/code&gt;</content><link rel='replies' type='application/atom+xml' href='http://herberthudson.blogspot.com/feeds/1281820319036971138/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4428415202815645943/1281820319036971138?isPopup=true' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4428415202815645943/posts/default/1281820319036971138'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4428415202815645943/posts/default/1281820319036971138'/><link rel='alternate' type='text/html' href='http://herberthudson.blogspot.com/2010/09/utilizando-classe-de-conexao-vbnet_25.html' title='Utilizando classe de Conexao VB.net Mysql. Exemplo 2'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08733846572980544657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4428415202815645943.post-1995274788327127332</id><published>2010-09-25T11:42:00.006-03:00</published><updated>2010-10-28T18:46:56.054-02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="VB.net"/><title type='text'>Utilizando classe de Conexao VB.net Mysql. Exemplo 1</title><content type='html'>Hoje irei mostrar um exemplo de como utilizar a Classe que criei, acesse ela aqui&amp;nbsp;&lt;a href=&quot;http://herberthudson.blogspot.com/2010/09/durante-muito-tempo-procurando-na.html&quot;&gt;Classe VB.net MySql&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
O exemplo que irei mostrar será inserindo dados no banco de dados.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
código:&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Try&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim cn As New ConexaoMySql(&quot;localhost&quot;, &quot;root&quot;, &quot;&quot;, &quot;&quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim sql As String = &quot;INSERT INTO `sistema`.`usuario` (`id`, `login`, `senha`, `nome`, `email`) VALUES (&#39;&#39;, &#39;herberthudson&#39;, &#39;12345&#39;, &#39;Herbert Hudson&#39;, &#39;herberthudson@gmail.com&#39;)&quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim comando As New MySqlCommand&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;comando = cn.ExecutaQuery(sql)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;comando.ExecuteNonQuery()&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MessageBox.Show(&quot;dados inseridos&quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Catch ex As Exception&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MessageBox.Show(ex.Message)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End Try&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
A classe se encontra &lt;a href=&quot;http://herberthudson.blogspot.com/2010/09/durante-muito-tempo-procurando-na.html&quot;&gt;aqui&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Obs.: Todos os exemplos com a Classe VB.net Mysql, devem possuir a referência do MySqlConnector, e pode ser baixada&amp;nbsp;&lt;a href=&quot;http://dev.mysql.com/downloads/connector/net/&quot;&gt;aqui&lt;/a&gt;. Após baixar é só adicionar a referência da biblioteca, e incluir no começo do código:&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;code&gt;Imports MySql.Data.MySqlClient &lt;/code&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://herberthudson.blogspot.com/feeds/1995274788327127332/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4428415202815645943/1995274788327127332?isPopup=true' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4428415202815645943/posts/default/1995274788327127332'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4428415202815645943/posts/default/1995274788327127332'/><link rel='alternate' type='text/html' href='http://herberthudson.blogspot.com/2010/09/utilizando-classe-de-conexao-vbnet.html' title='Utilizando classe de Conexao VB.net Mysql. Exemplo 1'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08733846572980544657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4428415202815645943.post-2842565343302679659</id><published>2010-09-22T23:42:00.055-03:00</published><updated>2011-08-29T12:47:40.435-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="VB.net"/><title type='text'>Classe VB.net para conexão com Banco de Dados MySql</title><content type='html'>Durante muito tempo procurando na internet sobre como fazer a conexão com o banco de dados MySql via VB.net, e na maioria das vezes encontrar pequenos exemplos simples, resolvi então criar minha própria classe de Conexão ao MySql.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;code&gt; &lt;span class=&quot;comentcode&quot;&gt;&#39;Importando MySql e DataSet&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;Imports MySql.Data.MySqlClient&lt;br /&gt;
Imports System.Data.DataSet&lt;br /&gt;
&lt;br /&gt;
Public Class ConexaoMySql&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;Private mConexao As New MySqlConnection&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;Private mComando As New MySqlCommand&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;Private mDataAdap As New MySqlDataAdapter&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;Private mDataRead As MySqlDataReader&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;Private usuarioServidor As String&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;Private usuarioBancoDeDados As String&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;Private usuarioLogin As String&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;Private usuarioSenha As String&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;Public Property ServidorUs() As String&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Get&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Return usuarioServidor&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End Get&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Set(ByVal value As String)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;usuarioServidor = value&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End Set&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;End Property&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;Public Property BancoDeDadosUs() As String&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Get&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Return usuarioBancoDeDados&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End Get&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Set(ByVal value As String)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;usuarioBancoDeDados = value&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End Set&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;End Property&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;Public Property LoginUs() As String&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Get&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Return usuarioLogin&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End Get&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Set(ByVal value As String)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;usuarioLogin = value&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End Set&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;End Property&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;Public Property SenhaUs() As String&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Get&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Return usuarioSenha&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End Get&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Set(ByVal value As String)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;usuarioSenha = value&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End Set&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;End Property&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;Sub New(ByVal servidor As String, ByVal usuario As String, ByVal senha As String, ByVal bancoDeDados As String)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ServidorUs = servidor&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;LoginUs = usuario&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SenhaUs = senha&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;BancoDeDadosUs = bancoDeDados&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;End Sub&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;Public Sub ConectarMySql()&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;If Not mConexao.State = ConnectionState.Open Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim strConexao As String = &quot;Data Source=&quot; + ServidorUs + &quot;;user id=&quot; + LoginUs + &quot;;password=&quot; + SenhaUs + &quot;; database=&quot; + BancoDeDadosUs&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mConexao = New MySqlConnection()&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mConexao.ConnectionString = strConexao&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mConexao.Open()&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;End Sub&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;Public Sub DesconectarMySql()&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;If mConexao.State = ConnectionState.Open Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mConexao.Close()&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mConexao.Dispose()&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mConexao = Nothing&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End If&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;End Sub&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;Public Function ExecutaDataTable(ByVal sql As String) As DataTable&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dim mDataTable As New DataTable&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Try&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ConectarMySql()&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mComando.CommandType = CommandType.Text&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mComando.CommandText = sql&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mComando.Connection = mConexao&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mDataAdap.SelectCommand = mComando&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mDataAdap.Fill(mDataTable)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mDataAdap.Dispose()&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Return mDataTable&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Catch ex As Exception&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MessageBox.Show(ex.Message)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End Try&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Return mDataTable&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;End Function&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;Public Function ExecutaDataRead(ByVal sql As String) As MySqlDataReader&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mDataRead = Nothing&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Try&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ConectarMySql()&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mComando.CommandType = CommandType.Text&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mComando.CommandText = sql&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mComando.Connection = mConexao&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mDataRead = mComando.ExecuteReader()&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mComando.Dispose()&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Return mDataRead&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Catch ex As Exception&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MessageBox.Show(ex.Message)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End Try&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Return mDataRead&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;End Function&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;Public Function ExecutaQuery(ByVal sql As String) As MySqlCommand&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Try&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ConectarMySql()&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mComando.CommandType = CommandType.Text&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mComando.CommandText = sql&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mComando.Connection = mConexao&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Return mComando&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Catch ex As Exception&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MessageBox.Show(ex.Message)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End Try&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Return mComando&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;End Function&lt;br /&gt;
End Class&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
Obs.: Todos os exemplos com a Classe VB.net Mysql, devem possuir a referência do MySqlConnector, e pode ser baixada&amp;nbsp;&lt;a href=&quot;http://dev.mysql.com/downloads/connector/net/&quot;&gt;aqui&lt;/a&gt;. Após baixar é só adicionar a referência da biblioteca, e incluir no começo do código:&lt;br /&gt;
&lt;code&gt;Imports MySql.Data.MySqlClient&lt;/code&gt;</content><link rel='replies' type='application/atom+xml' href='http://herberthudson.blogspot.com/feeds/2842565343302679659/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/4428415202815645943/2842565343302679659?isPopup=true' title='1 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4428415202815645943/posts/default/2842565343302679659'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4428415202815645943/posts/default/2842565343302679659'/><link rel='alternate' type='text/html' href='http://herberthudson.blogspot.com/2010/09/durante-muito-tempo-procurando-na.html' title='Classe VB.net para conexão com Banco de Dados MySql'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08733846572980544657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>