Changeset ae9c528 for content/databases/mysql
- Timestamp:
- 03/28/2004 01:46:42 AM (20 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_1, v5_1-pre1, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
- Children:
- fe88f584
- Parents:
- ff023d1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
content/databases/mysql/mysql-config.xml
rff023d1 rae9c528 57 57 <screen><userinput><command>mysqladmin -p shutdown</command></userinput></screen> 58 58 59 <para>To automate the running of <application>My<acronym>SQL</acronym></application>, use the following command to create 60 the init.d script:</para> 61 62 <screen><userinput><command>cat > /etc/rc.d/init.d/mysql << "EOF"</command> 63 #!/bin/sh 64 # Begin $rc_base/init.d/ 65 66 # Based on sysklogd script from LFS-3.1 and earlier. 67 # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org 68 69 . /etc/sysconfig/rc 70 . $rc_functions 71 72 pid_file=/var/lib/mysql/`/bin/hostname`.pid 73 74 case "$1" in 75 start) 76 echo "Starting MySQL daemon..." 77 failure=0 78 if test -f "$pid_file" 79 then 80 if /bin/ps p `cat $pid_file` | grep mysqld >/dev/null 81 then 82 print_status warning running 83 exit 0 84 else 85 rm -f $pid_file 86 if test -f $pid_file 87 then 88 failure=1 89 fi 90 fi 91 fi 92 if [ $failure = 1 ] 93 then 94 print_status failure 95 else 96 /usr/bin/mysqld_safe --user=mysql 2>&1 >/dev/null & 97 evaluate_retval 98 fi 99 ;; 100 101 stop) 102 echo "Stopping MySQL daemon..." 103 if test -s "$pid_file" 104 then 105 kill `cat $pid_file` 106 sleep 1 107 failure=0 108 while [ -s $pid_file -a "$flags" != aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ] 109 do 110 [ -z "$flags" ] 111 flags=a$flags 112 sleep 1 113 done 114 if [ -s $pid_file ] 115 then failure=1 116 fi 117 (exit $failure) 118 evaluate_retval 119 else 120 print_status warning not_running 121 fi 122 ;; 123 124 restart) 125 $0 stop 126 sleep 1 127 $0 start 128 ;; 129 130 status) 131 statusproc /usr/sbin/mysqld 132 ;; 133 134 *) 135 echo "Usage: $0 {start|stop|restart|status}" 136 exit 1 137 ;; 138 esac 139 140 # End $rc_base/init.d/ 141 <command>EOF 142 chmod 755 /etc/rc.d/init.d/mysql</command></userinput></screen> 143 144 <para>Create the symbolic links to this file in the relevant 145 <filename class="directory">rc.d</filename> directory 146 with the following commands:</para> 147 148 <screen><userinput><command>cd /etc/rc.d/init.d && 149 ln -sf ../init.d/mysql ../rc0.d/K26mysql && 150 ln -sf ../init.d/mysql ../rc1.d/K26mysql && 151 ln -sf ../init.d/mysql ../rc2.d/K26mysql && 152 ln -sf ../init.d/mysql ../rc3.d/S34mysql && 153 ln -sf ../init.d/mysql ../rc4.d/S34mysql && 154 ln -sf ../init.d/mysql ../rc5.d/S34mysql && 155 ln -sf ../init.d/mysql ../rc6.d/K26mysql</command></userinput></screen> 59 <para>Install <filename>/etc/rc.d/init.d/mysql</filename> 60 init script included in the <xref linkend="intro-important-bootscripts"/> package.</para> 61 62 <screen><userinput><command>make install-mysql</command></userinput></screen> 156 63 157 64 </sect3>
Note:
See TracChangeset
for help on using the changeset viewer.