<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet title="XSL formatting" type="text/xsl" href="http://prendreuncafe.com/blog/feed/rss2/xslt" ?><rss version="2.0"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:wfw="http://wellformedweb.org/CommentAPI/"
  xmlns:content="http://purl.org/rss/1.0/modules/content/"
  xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
  <title>Prendre un Café - Tag - mysql</title>
  <link>http://prendreuncafe.com/blog/</link>
  <atom:link href="http://prendreuncafe.com/blog/feed/tag/mysql/rss2" rel="self" type="application/rss+xml"/>
  <description></description>
  <language>fr</language>
  <pubDate>Fri, 02 Mar 2012 11:41:49 +0100</pubDate>
  <copyright>Contenus sous licence Creative Commons BY-SA</copyright>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Dotclear</generator>
  
    
  <item>
    <title>Installing php 5.3, apache2 and MySQL 5 on OS X using Macports</title>
    <link>http://prendreuncafe.com/blog/post/2009/07/17/Installing-php-5.3%2C-apache2-and-MySQL-5-using-Macports</link>
    <guid isPermaLink="false">urn:md5:19c5389e0b0ecafc469ac42b8c521dc0</guid>
    <pubDate>Fri, 17 Jul 2009 14:40:00 +0200</pubDate>
    <dc:creator>NiKo</dc:creator>
        <category>Libritudes</category>
        <category>apache</category><category>apple</category><category>howto</category><category>mac</category><category>macports</category><category>mysql</category><category>osx</category><category>php</category><category>server</category><category>setup</category><category>tutoriel</category>    
    <description>    &lt;p&gt;I wanted to test latest php 5.3 on my OSX box. So here&amp;#8217;s a quick reminder on how to proceed to a full setup of apache2, mysql5 and php 5.3 using &lt;a href=&quot;http://www.macports.org/install.php&quot; hreflang=&quot;en&quot;&gt;Macports&lt;/a&gt;.&lt;/p&gt;


&lt;p&gt;First, get a &lt;a href=&quot;http://www.macports.org/install.php&quot; hreflang=&quot;en&quot;&gt;fresh copy of the Macports installer for OSX&lt;/a&gt;. Install macports, then in a shell prompt, type:&lt;/p&gt;

&lt;pre&gt;
$ sudo port install mysql5 +server
$ sudo port install php5 +apache2 +debug +pear +sqlite +mysql5 
&lt;/pre&gt;


&lt;p&gt;You have now the time to have lunch, dinner, sex or to watch an episode of &lt;a href=&quot;http://www.imdb.com/title/tt0070981/&quot; hreflang=&quot;en&quot;&gt;Derrick&lt;/a&gt;&lt;sup&gt;[&lt;a href=&quot;http://prendreuncafe.com/blog/post/2009/07/17/Installing-php-5.3%2C-apache2-and-MySQL-5-using-Macports#pnote-1120-1&quot; id=&quot;rev-pnote-1120-1&quot;&gt;1&lt;/a&gt;]&lt;/sup&gt;.&lt;/p&gt;


&lt;p&gt;To enable the php module for apache:&lt;/p&gt;

&lt;pre&gt;
$ cd /opt/local/apache2/modules
$ sudo /opt/local/apache2/bin/apxs -a -e -n &amp;quot;php5&amp;quot; libphp5.so
&lt;/pre&gt;


&lt;p&gt;Then, add this line in the &lt;code&gt;/opt/local/apache2/conf/httpd.conf&lt;/code&gt; file:&lt;/p&gt;

&lt;pre&gt;
Include conf/extras-conf/*.conf
&lt;/pre&gt;


&lt;p&gt;Copy one of the standard &lt;code&gt;php.ini&lt;/code&gt; files proposed by the default installation:&lt;/p&gt;

&lt;pre&gt;
$ sudo cp /opt/local/etc/php5/php.ini-development /opt/local/etc/php5/php.ini
&lt;/pre&gt;


&lt;p&gt;To start apache automatically at system startup:&lt;/p&gt;

&lt;pre&gt;
$ sudo launchctl load -w /Library/LaunchDaemons/org.macports.apache2.plist
&lt;/pre&gt;


&lt;p&gt;Or manually:&lt;/p&gt;

&lt;pre&gt;
$ sudo /opt/local/apache2/bin/apachectl start
&lt;/pre&gt;


&lt;p&gt;To initialize, configure and start MySQL automatically:&lt;/p&gt;

&lt;pre&gt;
$ sudo -u mysql mysql_install_db5
$ sudo /opt/local/bin/mysql_secure_installation5
$ sudo /opt/local/etc/LaunchDaemons/org.macports.mysql5/mysql5.wrapper start
$ sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist
&lt;/pre&gt;


&lt;p&gt;Now launch your browser at &lt;code&gt;http://localhost/&lt;/code&gt;: you&amp;#8217;re done. Have some rest.&lt;/p&gt;
&lt;div class=&quot;footnotes&quot;&gt;&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;[&lt;a href=&quot;http://prendreuncafe.com/blog/post/2009/07/17/Installing-php-5.3%2C-apache2-and-MySQL-5-using-Macports#rev-pnote-1120-1&quot; id=&quot;pnote-1120-1&quot;&gt;1&lt;/a&gt;] Don&amp;#8217;t try to do all that stuff at the same time, result cannot be guaranteed&lt;/p&gt;&lt;/div&gt;&lt;hr/&gt;&lt;p style=&quot;margin:.5em 0;padding:.5em;border:1px solid #333;background:#eee;color:#222&quot;&gt;&lt;small&gt;Ce billet intitulé &lt;a href=&quot;http://prendreuncafe.com/blog/post/2009/07/17/Installing-php-5.3%2C-apache2-and-MySQL-5-using-Macports&quot;&gt;Installing php 5.3, apache2 and MySQL 5 on OS X using Macports&lt;/a&gt; a été rédigé par &lt;a href=&quot;http://prendreuncafe.com/cv&quot;&gt;Nicolas Perriault&lt;/a&gt; et publié sur le blog &lt;a href=&quot;http://prendreuncafe.com/blog/&quot;&gt;Prendre un Café&lt;/a&gt; sous licence &lt;a href=&quot;http://creativecommons.org/licenses/by-nc-sa/2.5/&quot;&gt;Creative Commons BY-NC-SA&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;</description>
    
    
    
      </item>
    
  <item>
    <title>Note perso #1</title>
    <link>http://prendreuncafe.com/blog/post/2006/06/23/476-note-perso-1</link>
    <guid isPermaLink="false">urn:md5:83b71ce2ce4e81eef8de55b20072d20e</guid>
    <pubDate>Fri, 23 Jun 2006 22:41:11 +0000</pubDate>
    <dc:creator>NiKo</dc:creator>
        <category>Dev</category>
        <category>dev</category><category>grumph</category><category>mysql</category>    
    <description>    &lt;p&gt;Nommer une table MySQL &lt;code&gt;user&lt;/code&gt;, c'est mal; et ça peut faire perdre une après midi &lt;img src=&quot;/blog/themes/battlestar/smilies/frown.gif&quot; alt=&quot;:(&quot; class=&quot;smiley&quot; /&gt;&lt;/p&gt;&lt;hr/&gt;&lt;p style=&quot;margin:.5em 0;padding:.5em;border:1px solid #333;background:#eee;color:#222&quot;&gt;&lt;small&gt;Ce billet intitulé &lt;a href=&quot;http://prendreuncafe.com/blog/post/2006/06/23/476-note-perso-1&quot;&gt;Note perso #1&lt;/a&gt; a été rédigé par &lt;a href=&quot;http://prendreuncafe.com/cv&quot;&gt;Nicolas Perriault&lt;/a&gt; et publié sur le blog &lt;a href=&quot;http://prendreuncafe.com/blog/&quot;&gt;Prendre un Café&lt;/a&gt; sous licence &lt;a href=&quot;http://creativecommons.org/licenses/by-nc-sa/2.5/&quot;&gt;Creative Commons BY-NC-SA&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;</description>
    
    
    
      </item>
    
  <item>
    <title>Redéfinir de force le mot de passe root de MySQL</title>
    <link>http://prendreuncafe.com/blog/post/2005/08/17/250-redefinir-de-force-le-mot-de-passe-root-de-mysql</link>
    <guid isPermaLink="false">urn:md5:479c624efede21f35f64a9c3fd0e0c85</guid>
    <pubDate>Wed, 17 Aug 2005 19:03:09 +0000</pubDate>
    <dc:creator>NiKo</dc:creator>
        <category>Ubuntu</category>
        <category>linux</category><category>mysql</category><category>sécurité</category><category>tips</category><category>tutoriel</category><category>ubuntu</category>    
    <description>    &lt;p&gt;Il peut arriver d'oublier son mot de passe root MySQL &lt;sup&gt;[&lt;a href=&quot;http://prendreuncafe.com/blog/post/2005/08/17/250-redefinir-de-force-le-mot-de-passe-root-de-mysql#pnote-250-1&quot; id=&quot;rev-pnote-250-1&quot;&gt;1&lt;/a&gt;]&lt;/sup&gt;, &lt;a href=&quot;http://forum.ubuntu-fr.org/viewtopic.php?id=10238&quot; hreflang=&quot;fr&quot;&gt;n'est-ce pas blowup&lt;/a&gt;&amp;nbsp;? &lt;img src=&quot;/blog/themes/battlestar/smilies/tongue.gif&quot; alt=&quot;:p&quot; class=&quot;smiley&quot; /&gt;&lt;/p&gt;


&lt;p&gt;C'est très embêtant car pour redéfinir un nouveau mot de passe root, il faut entrer le mot de passe... root, et réinventer ainsi le mouvement perpétuel...&lt;/p&gt;


&lt;p&gt;Voici une méthode pour lancer MySQL sans requérir d'authentification, et ainsi pouvoir assigner un mot de passe à l'utilisateur root. &lt;strong&gt;Attention, cette méthode ne doit pas être utilisée sur des serveurs de production et/ou sensibles, car à ce moment toutes vos bases sont accessibles à tous les utilisateurs MySQL.&lt;/strong&gt;&lt;/p&gt;


&lt;p&gt;Dans un shell, entrez la séquence de commandes suivante&amp;nbsp;:&lt;/p&gt;


&lt;pre&gt;$ sudo -s
# /etc/init.d/mysql stop
# mysqld -u mysql --skip-grant&lt;/pre&gt;


&lt;p&gt;Attention, maintenant MySQL est lancé sans authentification, c'est à dire qu'il est ouvert à tous les utilisateurs. Vous pouvez également arrêter Apache2 afin de limiter les possibilité d'execution de scripts accédant à des bases non autorisées&amp;nbsp;:&lt;/p&gt;


&lt;pre&gt;# apache2ctl stop&lt;/pre&gt;


&lt;p&gt;&lt;strong&gt;Note :&lt;/strong&gt; Si vous utilisez d'autres services permettant l'accès à MySQL, je vous recommande fortement de les arrêter de même. Vous pourrez les relancer à la fin de l'opération.&lt;/p&gt;


&lt;p&gt;Là, ouvrir un nouveau shell pour définir un nouveau mot de passe root/MySQL (CTRL + Shift + T dans gnome-terminal)&lt;/p&gt;


&lt;pre&gt;# mysqladmin -u root flush-privileges password &quot;nouveau_mot_de_passe&quot;&lt;/pre&gt;


&lt;p&gt;Fermer le premier shell, et tuez le daemon mysql ignorant l'authentification, puis relancez mysql au moyen de la commande&amp;nbsp;:&lt;/p&gt;


&lt;pre&gt;# /etc/init.d/mysql restart&lt;/pre&gt;


&lt;p&gt;Si vous aviez stoppé Apache, voire d'autres services, il est tant de les relancer&amp;nbsp;:&lt;/p&gt;


&lt;pre&gt;# apache2ctl start
# ...&lt;/pre&gt;


&lt;p&gt;Normalement, ça devrait rouler...&lt;/p&gt;
&lt;div class=&quot;footnotes&quot;&gt;&lt;h4&gt;Notes&lt;/h4&gt;
&lt;p&gt;[&lt;a href=&quot;http://prendreuncafe.com/blog/post/2005/08/17/250-redefinir-de-force-le-mot-de-passe-root-de-mysql#rev-pnote-250-1&quot; id=&quot;pnote-250-1&quot;&gt;1&lt;/a&gt;] qui, rappelons-le, n'est pas le même que l'utilisateur root du système&lt;/p&gt;&lt;/div&gt;
&lt;hr/&gt;&lt;p style=&quot;margin:.5em 0;padding:.5em;border:1px solid #333;background:#eee;color:#222&quot;&gt;&lt;small&gt;Ce billet intitulé &lt;a href=&quot;http://prendreuncafe.com/blog/post/2005/08/17/250-redefinir-de-force-le-mot-de-passe-root-de-mysql&quot;&gt;Redéfinir de force le mot de passe root de MySQL&lt;/a&gt; a été rédigé par &lt;a href=&quot;http://prendreuncafe.com/cv&quot;&gt;Nicolas Perriault&lt;/a&gt; et publié sur le blog &lt;a href=&quot;http://prendreuncafe.com/blog/&quot;&gt;Prendre un Café&lt;/a&gt; sous licence &lt;a href=&quot;http://creativecommons.org/licenses/by-nc-sa/2.5/&quot;&gt;Creative Commons BY-NC-SA&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;</description>
    
    
    
      </item>
    
</channel>
</rss>

