Changeset 9dcba70 for content/databases
- Timestamp:
- 09/07/2003 02:14:01 PM (21 years ago)
- Branches:
- 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_0, v5_0-pre1, v5_1, v5_1-pre1, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
- Children:
- 03973ca6
- Parents:
- ef0e45e4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
content/databases/mysql/mysql-config.xml
ref0e45e4 r9dcba70 1 1 <sect2> 2 <title>Configuring mysql</title>2 <title>Configuring MySQL</title> 3 3 4 4 <sect3> … … 13 13 14 14 <para>There are several default configurations file available in 15 <filename >/usr/share/mysql</filename> which you can use.</para>15 <filename class="directory">/usr/share/mysql</filename> which you can use.</para> 16 16 17 <screen><userinput>cp /usr/share/mysql/my-medium.cnf /etc/my.cnf</userinput></screen> 17 <screen><userinput><command>cp /usr/share/mysql/my-medium.cnf /etc/my.cnf</command> 18 </userinput></screen> 18 19 19 20 <para>We can now install a database and change the ownership to the 20 21 unpriviledged user and group.</para> 21 22 22 <screen><userinput> mysql_install_db23 chown -R mysql:mysql /var/lib/mysql</ userinput></screen>23 <screen><userinput><command>mysql_install_db 24 chown -R mysql:mysql /var/lib/mysql</command></userinput></screen> 24 25 25 26 <para>Further configuration requires that the mysql server be running:</para> 26 27 27 <screen><userinput>safe_mysqld 2>&1 >/dev/null &</userinput></screen> 28 <screen><userinput><command>mysqld_safe --user=mysql 2>&1 >/dev/null &</command> 29 </userinput></screen> 28 30 29 31 <para>A default installation, does not setup a password for the administrator. 30 So here we will login and set one. 32 So here we will login and set one. We strongly suggest changing 31 33 'new-password' to your own.</para> 32 34 33 <screen><userinput> mysql -uroot mysql</userinput>35 <screen><userinput><command>mysql -uroot mysql 34 36 Welcome to the MySQL monitor. Commands end with ; or \g. 35 37 Your MySQL connection id is 2 to server version: 3.23.51-log … … 37 39 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. 38 40 39 mysql> <userinput>UPDATE user SET password=password('new-password') WHERE user='root';</userinput>41 mysql> UPDATE user SET password=password('new-password') WHERE user='root'; 40 42 Query OK, 2 rows affected (0.00 sec) 41 43 Rows matched: 2 Changed: 2 Warnings: 0 42 44 43 mysql> <userinput>FLUSH PRIVILEGES;</userinput>45 mysql> FLUSH PRIVILEGES; 44 46 Query OK, 0 rows affected (0.00 sec) 45 47 46 mysql> <userinput>EXIT;</userinput>48 mysql> EXIT; 47 49 bye 48 </ screen>50 </command></userinput></screen> 49 51 50 52 <para>Now that we are done with the configuration of the server, we can 51 53 shut it down.</para> 52 54 53 <screen><userinput> kill `pidof -x safe_mysqld mysqld`</userinput></screen>55 <screen><userinput><command>kill `pidof -x mysqld_safe mysqld`</command></userinput></screen> 54 56 55 57 56 58 <sect4> 57 <title> mysqlinit.d script</title>59 <title>MySQL init.d script</title> 58 60 59 <para>To automate the running of mysql, use the following command to create61 <para>To automate the running of MySQL, use the following command to create 60 62 the init.d script:</para> 61 63 62 <screen><userinput> cat > /etc/rc.d/init.d/mysql << "EOF"</userinput>64 <screen><userinput><command>cat > /etc/rc.d/init.d/mysql << "EOF" 63 65 #!/bin/bash 64 66 # Begin $rc_base/init.d/ … … 73 75 start) 74 76 echo "Starting MySQL daemon..." 75 /usr/bin/ safe_mysqld2>&1 >/dev/null &77 /usr/bin/mysqld_safe --user=mysql 2>&1 >/dev/null & 76 78 evaluate_retval 77 79 ;; … … 99 101 100 102 # End $rc_base/init.d/ 101 <userinput>EOF102 chmod 755 /etc/rc.d/init.d/mysql</ userinput></screen>103 EOF 104 chmod 755 /etc/rc.d/init.d/mysql</command></userinput></screen> 103 105 104 106 <para>Create the symbolic links to this file in the relevant 105 <filename >rc.d</filename> directory107 <filename class="directory">rc.d</filename> directory 106 108 with the following commands:</para> 107 109 108 <screen><userinput> cd /etc/rc.d/init.d &&110 <screen><userinput><command>cd /etc/rc.d/init.d && 109 111 ln -sf ../init.d/mysql ../rc0.d/K26mysql && 110 112 ln -sf ../init.d/mysql ../rc1.d/K26mysql && … … 113 115 ln -sf ../init.d/mysql ../rc4.d/S34mysql && 114 116 ln -sf ../init.d/mysql ../rc5.d/S34mysql && 115 ln -sf ../init.d/mysql ../rc6.d/K26mysql</ userinput></screen>117 ln -sf ../init.d/mysql ../rc6.d/K26mysql</command></userinput></screen> 116 118 117 119 </sect4> … … 120 122 121 123 </sect2> 122
Note:
See TracChangeset
for help on using the changeset viewer.