Skip to content
Snippets Groups Projects
Commit 35a294bb authored by Goik Martin's avatar Goik Martin
Browse files

Better mysql install hints

parent df122c68
No related branches found
No related tags found
No related merge requests found
...@@ -351,35 +351,37 @@ Do you want to continue? [Y/n/?]</programlisting> ...@@ -351,35 +351,37 @@ Do you want to continue? [Y/n/?]</programlisting>
Server. We create a database <quote>hdm</quote> to be used for our Server. We create a database <quote>hdm</quote> to be used for our
exercises:</para> exercises:</para>
<programlisting language="none">goik@goiki:~$ mysql -u root -p <programlisting language="none">goik@hopc ~&gt; mysql -u root -p
Enter password: Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 42
Server version: 5.5.24-0ubuntu0.12.04.1 (Ubuntu)
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. ... messages omitted for brevity ...
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql&gt; <emphasis role="bold">create database hdm;</emphasis> mysql&gt; <emphasis role="bold">create database hdm;</emphasis>
Query OK, 1 row affected (0.00 sec)</programlisting> Query OK, 1 row affected (0.00 sec)</programlisting>
<para>Following <uri <para>Following <uri
xlink:href="https://dev.mysql.com/doc/refman/5.5/en/adding-users.html">https://dev.mysql.com/doc/refman/5.5/en/adding-users.html</uri> xlink:href="https://dev.mysql.com/doc/refman/5.5/en/adding-users.html">https://dev.mysql.com/doc/refman/5.5/en/adding-users.html</uri>
we add a new user and grant full access to the newly created we add <code>hdmuser</code> as a new user and grant full access to the
database:</para> newly created database <code>hdm to him</code>:</para>
<programlisting language="none">goik@goiki:~$ mysql -u root -p <programlisting language="none"> ...
Enter password: mysql&gt; <emphasis role="bold">CREATE USER 'hdmuser'@'localhost' IDENTIFIED BY 'XYZ';</emphasis>
... mysql&gt; <emphasis role="bold">use hdm;</emphasis>
mysql&gt; CREATE USER 'hdmuser'@'localhost' IDENTIFIED BY 'XYZ'; mysql&gt; <emphasis role="bold">GRANT ALL PRIVILEGES ON *.* TO 'hdmuser'@'localhost' WITH GRANT OPTION;</emphasis>
mysql&gt; use hdm; mysql&gt; <emphasis role="bold">FLUSH PRIVILEGES;</emphasis>
mysql&gt; GRANT ALL PRIVILEGES ON *.* TO 'hdmuser'@'localhost' WITH GRANT OPTION; mysql&gt; exit;
mysql&gt; FLUSH PRIVILEGES;</programlisting> Bye</programlisting>
<para>You may want to test your configuration:</para>
<programlisting language="none">goik@hopc ~&gt; mysql --user=hdmuser --password=XYZ
... messages omitted for brevity ...
mysql&gt; use hdm;show tables;
Database changed
Empty set (0,00 sec)
mysql&gt;</programlisting>
<para>The next step is optional. The <productname <para>The next step is optional. The <productname
xlink:href="http://www.ubuntu.com">Ubuntu</productname> <productname xlink:href="http://www.ubuntu.com">Ubuntu</productname> <productname
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment