<?xml version="1.0"?>
<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/"
	>
   <channel>
      <pubDate>Sat, 11 Oct 2008 06:49:52 GMT</pubDate>
      <lastBuildDate>Sat, 11 Oct 2008 06:49:52 GMT</lastBuildDate>
      <language>en</language>
      <docs>http://www.rssboard.org/rss-specification</docs>
      <title>CrunchBang ~ phpmyadmin</title>
      <link>http://crunchbang.org/tags/phpmyadmin/</link>
      <description>Code, Design &amp; GNU/Linux</description>

<item>
    <title>Create MySQL User Accounts from the Command Line</title>
    <link>http://crunchbang.org/archives/2008/04/17/create-mysql-user-accounts-from-the-command-line/</link>
    <pubDate>Thu, 17 Apr 2008 10:55:15 GMT</pubDate>
    <dc:creator>Philip Newborough</dc:creator>
    <guid>http://crunchbang.org/archives/2008/04/17/create-mysql-user-accounts-from-the-command-line/</guid>
    <description><![CDATA[
    <p>I have my <a href="http://crunchbang.org/archives/2008/01/10/apache-mysql-and-php-on-ubuntu/ " title="Linux, Apache, MySQL and PHP on Ubuntu.">LAMP</a> install process down to fine art, which is a good thing considering the amount of Linux installs I have been performing lately. Anyhow, just recently I have been experiencing some issues with creating <a href="http://en.wikipedia.org/wiki/Mysql " title="Wikipedia - MySQL">MySQL</a> user accounts. Normally, for ease of use, I would simply login to <a href="http://en.wikipedia.org/wiki/Phpmyadmin " title="Wikipedia - phpMyAdmin">phpMyAdmin</a> and create a new user account, but, for some unknown reason, this method has not been working; maybe there is a compatibility issue between the latest versions of MySQL Server and phpMyAdmin available from the <a href="http://www.ubuntu.com/ " title="Ubuntu, Linux for human beings.">Ubuntu</a> repositories?</p>

<p>Anyway, to get around this little problem, I have been creating new MySQL user accounts via the command line. It is a fairly straightforward procedure, but like a lot of administration tasks, it is not something I do on a daily basis. With this in mind, I thought it would be a good idea to record the process for future reference.</p>

<p>Follow the steps below to create a new user MySQL account. Note, these instructions assume that you have already <a href="http://crunchbang.org/archives/2008/01/10/apache-mysql-and-php-on-ubuntu/ " title="Apache, MySQL and PHP on Ubuntu.">set-up Apache, MySQL and PHP</a>.</p>

<p><strong>1.</strong> Open a terminal and login to MySQL as root:</p>

<pre><code>mysql --user="root" --password="your_root_password"
</code></pre>

<p><strong>2.</strong> Create a new user and password with the following command:</p>

<pre><code>CREATE USER 'new_username'@'localhost' IDENTIFIED BY 'password_for_new_username';
</code></pre>

<p><strong>3.</strong> Assign privileges to the new user, enter the command:</p>

<pre><code>GRANT ALL ON *.* TO 'new_username'@'localhost';
</code></pre>

<p><strong>4.</strong> Exit MySQL interface, enter:</p>

<pre><code>exit
</code></pre>

<p><strong>Notes:</strong> The above instructions will create a new user account on &#34;localhost&#34; and grant the user all privileges. While this is safe for my development environment, you would obviously want to grant only the necessary permissions in a production environment.</p>

<p>For more developer information, including the MySQL Reference Manual, visit: <a href="http://dev.mysql.com/ " title="MySQL developer information.">http://dev.mysql.com/</a></p>

    <p style="font-size:smaller;">Tags: <a href="http://crunchbang.org/tags/mysql/" title="Browse all posts tagged with &#8220;mysql&#8221;">mysql</a>, <a href="http://crunchbang.org/tags/phpmyadmin/" title="Browse all posts tagged with &#8220;phpmyadmin&#8221;">phpmyadmin</a>, <a href="http://crunchbang.org/tags/terminal/" title="Browse all posts tagged with &#8220;terminal&#8221;">terminal</a>, <a href="http://crunchbang.org/tags/ubuntu/" title="Browse all posts tagged with &#8220;ubuntu&#8221;">ubuntu</a></p>
    ]]></description>
</item>

 </channel>
</rss>