source: content/databases/mysql/mysql-config.xml@ 65df9fca

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.0 6.1 6.2 6.2.0 6.2.0-rc1 6.2.0-rc2 6.3 6.3-rc1 6.3-rc2 6.3-rc3 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb v5_1 xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 65df9fca was 65df9fca, checked in by Larry Lawrence <larry@…>, 20 years ago

grammar corrections

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@2252 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 2.5 KB
RevLine 
[c30b739]1<sect2>
[f0334b2]2<title>Configuring <application>My<acronym>SQL</acronym></application></title>
[c30b739]3
4<sect3>
5<title>Config files</title>
6
[e80cc95]7<para><filename>/etc/my.cnf</filename>, <filename>~/.my.cnf</filename></para>
[c30b739]8
9</sect3>
10
11<sect3>
12<title>Configuration Information</title>
13
[65df9fca]14<para>There are several default configuration files available in
15<filename class="directory">/usr/share/mysql</filename> which you can
16use. Create <filename>/etc/my.cnf</filename> using the following
17command:</para>
[c30b739]18
[c55e298]19<screen><userinput><command>cp /usr/share/mysql/my-medium.cnf /etc/my.cnf</command></userinput></screen>
[c30b739]20
[65df9fca]21<para>You can now install a database and change the ownership to the
[a4be499]22unprivileged user and group.</para>
[c30b739]23
[c55e298]24<screen><userinput><command>mysql_install_db &amp;&amp;
[9dcba70]25chown -R mysql:mysql /var/lib/mysql</command></userinput></screen>
[c30b739]26
27<para>Further configuration requires that the mysql server be running:</para>
28
[c55e298]29<screen><userinput><command>mysqld_safe --user=mysql 2&gt;&amp;1 &gt;/dev/null &amp;</command></userinput></screen>
[c30b739]30
[65df9fca]31<para>A default installation does not setup a password for the
32administrator, so use the following command to set one. Replace <replaceable>[new-password]</replaceable>
[5d9d6d9]33with your own.</para>
[c30b739]34
[5d9d6d9]35<!--
[993cff3]36<screen><userinput><command>mysql -uroot mysql</command></userinput>
[c30b739]37Welcome to the MySQL monitor. Commands end with ; or \g.
38Your MySQL connection id is 2 to server version: 3.23.51-log
39
40Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
41
[993cff3]42<prompt>mysql&gt;</prompt> <userinput><command>UPDATE user SET password=password('<replaceable>new-password</replaceable>') WHERE user='root';</command></userinput>
[c30b739]43Query OK, 2 rows affected (0.00 sec)
44Rows matched: 2 Changed: 2 Warnings: 0
45
[993cff3]46<prompt>mysql&gt;</prompt> <userinput><command>FLUSH PRIVILEGES;</command></userinput>
[c30b739]47Query OK, 0 rows affected (0.00 sec)
48
[993cff3]49<prompt>mysql&gt;</prompt> <userinput><command>EXIT;</command></userinput>
[c30b739]50bye
[993cff3]51</screen>
[5d9d6d9]52-->
53
[bc5af77]54<screen><userinput><command>mysqladmin -u root password <replaceable>[new-password]</replaceable></command></userinput></screen>
[c30b739]55
[65df9fca]56<para>Configuration of the server is now finished. Shut the server down
57using the following command:</para>
[c30b739]58
[c213dfe]59<screen><userinput><command>mysqladmin -p shutdown</command></userinput></screen>
[c30b739]60
[65df9fca]61<para>Install the <filename>/etc/rc.d/init.d/mysql</filename>
[ae9c528]62init script included in the <xref linkend="intro-important-bootscripts"/> package.</para>
63
64<screen><userinput><command>make install-mysql</command></userinput></screen>
[c30b739]65
66</sect3>
67
68</sect2>
Note: See TracBrowser for help on using the repository browser.