<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Astuces d&#039;Absolacom &#187; mysql</title>
	<atom:link href="http://astuces.absolacom.com/category/serveur/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://astuces.absolacom.com</link>
	<description>La voie est libre mais pleine d&#039;achoppements</description>
	<lastBuildDate>Tue, 07 Feb 2012 13:21:17 +0000</lastBuildDate>
	<language>fr</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Mysql: Résoudre l&#8217;erreur &#171;&#160;La connexion au &#171;&#160;controluser&#160;&#187; tel que défini dans votre configuration a échoué.&#160;&#187;</title>
		<link>http://astuces.absolacom.com/ubuntu/mysql-resoudre-lerreur-la-connexion-au-controluser-tel-que-defini-dans-votre-configuration-a-echoue/</link>
		<comments>http://astuces.absolacom.com/ubuntu/mysql-resoudre-lerreur-la-connexion-au-controluser-tel-que-defini-dans-votre-configuration-a-echoue/#comments</comments>
		<pubDate>Sun, 03 Oct 2010 10:50:54 +0000</pubDate>
		<dc:creator>manuberro</dc:creator>
				<category><![CDATA[ça a fonctionné pour moi]]></category>
		<category><![CDATA[logiciel]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[planet-libre]]></category>
		<category><![CDATA[serveur]]></category>
		<category><![CDATA[système]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://astuces.absolacom.com/?p=890</guid>
		<description><![CDATA[Après une réorganisation de serveurs, et migration de mes bases Mysql vers une autre machine, j&#8217;ai pu voir dans la fenêtre de phpmyadmin l&#8217;erreur suivante: &#171;&#160;La connexion au &#171;&#160;controluser&#160;&#187; tel que défini dans votre configuration a échoué.&#171;&#160; Comme je passe de la hardy vers la jaunty (LTS to LTS) pendant le déplacement, je me suis [...]]]></description>
			<content:encoded><![CDATA[<p>Après une réorganisation de serveurs, et migration de mes bases Mysql vers une autre machine, j&#8217;ai pu voir dans la fenêtre de phpmyadmin l&#8217;erreur suivante:</p>
<p>&laquo;&nbsp;<strong>La connexion au &laquo;&nbsp;controluser&nbsp;&raquo; tel que défini dans votre configuration a échoué.</strong>&laquo;&nbsp;<a href="http://astuces.absolacom.com/wp-content/uploads/2010/10/mysql1.png"><img class="alignright size-full wp-image-891" title="mysql" src="http://astuces.absolacom.com/wp-content/uploads/2010/10/mysql1.png" alt="mysql" width="200" height="202" /></a></p>
<p>Comme je passe de la hardy vers la jaunty (LTS to LTS) pendant le déplacement, je me suis dit que quelques différences pouvaient exister et afficher ce message d&#8217;erreur qui ne m&#8217;empêchait pas de me connecter à phpmyadmin.</p>
<p>Puis je me suis souvenu que pendant l&#8217;installation de ce programme, il m&#8217;avait demandé plusieurs fois la configuration de MySql sans arriver à s&#8217;y connecter. Et dans le speed de la migration, j&#8217;ai oublié de vérifier que ça fonctionnait correctement, vu que j&#8217;arrivais à me connecter. Et que les principales opérations étaient effectuées en ligne de commande.</p>
<p>Après une recherche un peu plus poussée dans le code des fichiers de phpmyadmin, je me suis rendu compte qu&#8217;il cherchait à utiliser l&#8217;utilisateur phpmyadmin. Utilisateur visible dans les privilèges de l&#8217;ancien serveur, mais pas sur les privilèges du nouveau.</p>
<p>J&#8217;ai donc créé un nouvel utilisateur nommé &laquo;&nbsp;phpmyadmin&nbsp;&raquo; pour le serveur &laquo;&nbsp;localhost&nbsp;&raquo;<sup><a href="http://astuces.absolacom.com/ubuntu/mysql-resoudre-lerreur-la-connexion-au-controluser-tel-que-defini-dans-votre-configuration-a-echoue/#footnote_0_890" id="identifier_0_890" class="footnote-link footnote-identifier-link" title="tr&egrave;s important: &amp;laquo;&amp;nbsp;localhost&amp;nbsp;&amp;raquo;, pas autre chose">1</a></sup> avec le mot de passe permettant tous les privilèges, à savoir celui de root, et j&#8217;ai donné un droit d&#8217;usage simple, non Grant.</p>
<p>Il parait que lancer <strong>sudo dpkg-reconfigure phpmyadmin</strong> peut résoudre le problème, mais cela n&#8217;a pas fonctionné dans mon cas, au contraire de la création manuelle de l&#8217;utilisateur.</p>
<p>Classé dans la catégorie &laquo;&nbsp;ça a fonctionné pour moi&nbsp;&raquo;.</p>
Notes:<ol class="footnotes"><li id="footnote_0_890" class="footnote">très important: &laquo;&nbsp;localhost&nbsp;&raquo;, pas autre chose</li></ol>]]></content:encoded>
			<wfw:commentRss>http://astuces.absolacom.com/ubuntu/mysql-resoudre-lerreur-la-connexion-au-controluser-tel-que-defini-dans-votre-configuration-a-echoue/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Accéder à un serveur MYSQL sur le réseau</title>
		<link>http://astuces.absolacom.com/systeme/acceder-a-un-serveur-mysql-sur-le-reseau/</link>
		<comments>http://astuces.absolacom.com/systeme/acceder-a-un-serveur-mysql-sur-le-reseau/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 14:24:03 +0000</pubDate>
		<dc:creator>manuberro</dc:creator>
				<category><![CDATA[logiciel]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[planet-libre]]></category>
		<category><![CDATA[système]]></category>
		<category><![CDATA[adressage]]></category>
		<category><![CDATA[reseau]]></category>
		<category><![CDATA[serveur]]></category>

		<guid isPermaLink="false">http://astuces.absolacom.com/?p=646</guid>
		<description><![CDATA[Lorsque vous installez un serveur MYSQL (ou un serveur LAMP avec tasksel), celui ci est paramétré par défaut pour n&#8217;autoriser que les connexions provenant de localhost, pour des raisons de sécurité. &#91;root@halter&#93;:# telnet 10.0.0.134 3306 Trying 10.0.0.134... telnet: Unable to connect to remote host: Connection refused Si on effectue un scan de port sur l&#8217;ordinateur [...]]]></description>
			<content:encoded><![CDATA[<p>Lorsque vous installez un serveur MYSQL (ou un serveur LAMP avec tasksel), celui ci est paramétré par défaut pour n&#8217;autoriser que les connexions provenant de <em>localhost</em>, pour des raisons de sécurité.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>halter<span style="color: #7a0874; font-weight: bold;">&#93;</span>:<span style="color: #666666; font-style: italic;"># telnet 10.0.0.134 3306</span>
Trying 10.0.0.134...
telnet: Unable to connect to remote host: Connection refused</pre></div></div>

<p>Si on effectue un scan de port sur l&#8217;ordinateur hébergeant le serveur Mysql, on voit bien que le port par défaut de Mysql, le 3306, n&#8217;apparait pas. Il est donc impossible de se connecter à se serveur depuis un autre ordinateur du réseau.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>halter<span style="color: #7a0874; font-weight: bold;">&#93;</span>:<span style="color: #666666; font-style: italic;"># nmap 10.0.0.134&lt;/code&gt;</span>
&nbsp;
Starting Nmap <span style="color: #000000;">4.76</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span> http:<span style="color: #000000; font-weight: bold;">//</span>nmap.org <span style="color: #7a0874; font-weight: bold;">&#41;</span> at <span style="color: #000000;">2010</span>-04-04 <span style="color: #000000;">15</span>:<span style="color: #000000;">15</span> CEST
Interesting ports on vdomaine.com <span style="color: #7a0874; font-weight: bold;">&#40;</span>10.0.0.134<span style="color: #7a0874; font-weight: bold;">&#41;</span>:
Not shown: <span style="color: #000000;">996</span> closed ports
PORT     STATE SERVICE
<span style="color: #000000;">22</span><span style="color: #000000; font-weight: bold;">/</span>tcp   open  <span style="color: #c20cb9; font-weight: bold;">ssh</span>
<span style="color: #000000;">80</span><span style="color: #000000; font-weight: bold;">/</span>tcp   open  http
<span style="color: #000000;">443</span><span style="color: #000000; font-weight: bold;">/</span>tcp  open  https
<span style="color: #000000;">2000</span><span style="color: #000000; font-weight: bold;">/</span>tcp open  callbook
MAC Address: 00:1E:2A:B4:CA:xx <span style="color: #7a0874; font-weight: bold;">&#40;</span>Netgear<span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<p>Pour indiquer au serveur qu&#8217;il doit autoriser les connexions provenant d&#8217;autres ordinateurs du réseau, il faut modifier le fichier de configuration de Mysql, le fichier <em>/etc/mysql/my.cnf</em> et modifier 2 lignes:</p>
<p>La première, dé-commentée par défaut, indique au serveur d&#8217;ignorer les requêtes extérieures. Il faut donc la commenter (ou la supprimer)</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#skip-external-locking</span></pre></div></div>

<p>La seconde indique au serveur sur quelle adresse il faut écouter les requètes. Par défaut, il s&#8217;agit de 127.0.0.1. Si vous voulez autoriser le réseau local, n&#8217;indiquez pas une adresse réseau mais bien l&#8217;adresse du serveur sur le réseau. D&#8217;où l&#8217;intérêt d&#8217;avoir des réglages IP fixes ou des baux permanents attribués par le DHCP. Dans le cas contraire, je vous promet des heures de recherche infructueuses avant de revenir dessus.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Instead of skip-networking the default is now to listen only on</span>
<span style="color: #666666; font-style: italic;"># localhost which is more compatible and is not less secure.</span>
bind-address            = 10.0.0.134</pre></div></div>

<p>Une fois le serveur Mysql relancé, un nouveau scan montre l&#8217;ouverture effective pour Mysql:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>root<span style="color: #000000; font-weight: bold;">@</span>halter<span style="color: #7a0874; font-weight: bold;">&#93;</span>:<span style="color: #666666; font-style: italic;"># nmap 10.0.0.134&lt;/code&gt;</span>
&nbsp;
Starting Nmap <span style="color: #000000;">4.76</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span> http:<span style="color: #000000; font-weight: bold;">//</span>nmap.org <span style="color: #7a0874; font-weight: bold;">&#41;</span> at <span style="color: #000000;">2010</span>-04-04 <span style="color: #000000;">15</span>:<span style="color: #000000;">16</span> CEST
Interesting ports on vdomaine.com <span style="color: #7a0874; font-weight: bold;">&#40;</span>10.0.0.134<span style="color: #7a0874; font-weight: bold;">&#41;</span>:
Not shown: <span style="color: #000000;">995</span> closed ports
PORT     STATE SERVICE
<span style="color: #000000;">22</span><span style="color: #000000; font-weight: bold;">/</span>tcp   open  <span style="color: #c20cb9; font-weight: bold;">ssh</span>
<span style="color: #000000;">80</span><span style="color: #000000; font-weight: bold;">/</span>tcp   open  http
<span style="color: #000000;">443</span><span style="color: #000000; font-weight: bold;">/</span>tcp  open  https
<span style="color: #000000;">2000</span><span style="color: #000000; font-weight: bold;">/</span>tcp open  callbook
<span style="color: #000000;">3306</span><span style="color: #000000; font-weight: bold;">/</span>tcp open  mysql
MAC Address: 00:1E:2A:B4:CA:xx <span style="color: #7a0874; font-weight: bold;">&#40;</span>Netgear<span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<p>A partir de ce moment, une connexion au serveur a déjà beaucoup plus de chances de réussir:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">manu<span style="color: #000000; font-weight: bold;">@</span>halter:~$ mysql <span style="color: #660033;">-p</span> <span style="color: #660033;">-h</span> 10.0.0.134 <span style="color: #660033;">-u</span> othtest <span style="color: #660033;">-P</span> <span style="color: #000000;">3306</span>
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection <span style="color: #c20cb9; font-weight: bold;">id</span> is <span style="color: #000000;">42</span>
Server version: 5.1.41-3ubuntu11 <span style="color: #7a0874; font-weight: bold;">&#40;</span>Ubuntu<span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
Type <span style="color: #ff0000;">'help;'</span> or <span style="color: #ff0000;">'\h'</span> <span style="color: #000000; font-weight: bold;">for</span> help. Type <span style="color: #ff0000;">'\c'</span> to <span style="color: #c20cb9; font-weight: bold;">clear</span> the buffer.
&nbsp;
mysql<span style="color: #000000; font-weight: bold;">&amp;</span>gt;</pre></div></div>

<p>Ce n&#8217;est pas une astuce extraordinaire, mais maintenant que j&#8217;en ai fait un article, je suis sûr de m&#8217;en souvenir et de ne plus perdre une matinée à trouver le problème lorsque je rechangerais mon adressage&#8230; Alors, j&#8217;imagine que ça sera utile pour d&#8217;autres que moi.</p>
]]></content:encoded>
			<wfw:commentRss>http://astuces.absolacom.com/systeme/acceder-a-un-serveur-mysql-sur-le-reseau/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Installer un serveur LAMP avec Ubuntu</title>
		<link>http://astuces.absolacom.com/ubuntu/installer-un-serveur-lamp-avec-ubuntu/</link>
		<comments>http://astuces.absolacom.com/ubuntu/installer-un-serveur-lamp-avec-ubuntu/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 08:33:40 +0000</pubDate>
		<dc:creator>manuberro</dc:creator>
				<category><![CDATA[developpement]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[logiciel]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[planet-libre]]></category>
		<category><![CDATA[serveur]]></category>
		<category><![CDATA[système]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[mail]]></category>

		<guid isPermaLink="false">http://astuces.absolacom.com/?p=357</guid>
		<description><![CDATA[Un serveur LAMP signifie Linux Apache Mysql Php. Il est possible d&#8217;installer et configurer chacun des services manuellement, mais il existe une autre façon plus simple et moins connue de faire tout ceci en une seule fois. Dans un terminal, entrez ceci: sudo tasksel install lamp-server Et c&#8217;est tout! Ou alors: sudo tasksel Et sélectionnez [...]]]></description>
			<content:encoded><![CDATA[<p>Un serveur LAMP signifie <strong>L</strong>inux <strong>A</strong>pache <strong>M</strong>ysql <strong>P</strong>hp. Il est possible d&#8217;installer et configurer chacun des services manuellement, mais il existe une autre façon plus simple et moins connue de faire tout ceci en une seule fois.</p>
<p>Dans un terminal, entrez ceci:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> tasksel <span style="color: #c20cb9; font-weight: bold;">install</span> lamp-server</pre></div></div>

<p>Et c&#8217;est tout!</p>
<p>Ou alors:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> tasksel</pre></div></div>

<p><a href="http://astuces.absolacom.com/wp-content/uploads/2009/12/tasksel.png"><img class="aligncenter size-thumbnail wp-image-358" title="tasksel" src="http://astuces.absolacom.com/wp-content/uploads/2009/12/tasksel-150x150.png" alt="tasksel" width="150" height="150" /></a></p>
<p>Et sélectionnez LAMP server, ou tout autre service que vous désirez installer.</p>
]]></content:encoded>
			<wfw:commentRss>http://astuces.absolacom.com/ubuntu/installer-un-serveur-lamp-avec-ubuntu/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

