diff options
author | unknown <petr@mysql.com> | 2005-02-06 23:43:34 +0300 |
---|---|---|
committer | unknown <petr@mysql.com> | 2005-02-06 23:43:34 +0300 |
commit | 79ba407d64ad4387b7b279f80a7bf95e68414df5 (patch) | |
tree | 7f163c754e3328c41c690f65ca07030b0f82f21a | |
parent | 95e650e50a7ab59597a1c55ec48d7f807b2352a2 (diff) | |
download | mariadb-git-79ba407d64ad4387b7b279f80a7bf95e68414df5.tar.gz |
setup fixes
support-files/Makefile.am:
New default file added
support-files/mysql.server.sh:
now mysqlmanager is started using mysql account
support-files/mysql.spec.sh:
my.cnf copied to the /etc/ to let mysqlmanager start [mysqld] instance at startup
-rw-r--r-- | support-files/Makefile.am | 1 | ||||
-rw-r--r-- | support-files/my.cnf | 2 | ||||
-rw-r--r-- | support-files/mysql.server.sh | 5 | ||||
-rw-r--r-- | support-files/mysql.spec.sh | 10 |
4 files changed, 10 insertions, 8 deletions
diff --git a/support-files/Makefile.am b/support-files/Makefile.am index 7ae1071f9ec..c2131027db8 100644 --- a/support-files/Makefile.am +++ b/support-files/Makefile.am @@ -19,6 +19,7 @@ EXTRA_DIST = mysql.spec.sh \ my-small.cnf.sh \ + my.cnf \ my-medium.cnf.sh \ my-large.cnf.sh \ my-huge.cnf.sh \ diff --git a/support-files/my.cnf b/support-files/my.cnf new file mode 100644 index 00000000000..062c78be46a --- /dev/null +++ b/support-files/my.cnf @@ -0,0 +1,2 @@ +[mysqld] +port=3307 diff --git a/support-files/mysql.server.sh b/support-files/mysql.server.sh index 08e10c0192b..645b54b610a 100644 --- a/support-files/mysql.server.sh +++ b/support-files/mysql.server.sh @@ -136,6 +136,9 @@ else esac fi +user=@MYSQLD_USER@ +USER_OPTION="--user=$user" + # Safeguard (relative paths, core dumps..) cd $basedir @@ -147,7 +150,7 @@ case "$mode" in then # Give extra arguments to mysqlmanager with the my.cnf file. This script may # be overwritten at next upgrade. - $sbindir/mysqlmanager "--pid-file=$pid_file" --run-as-service >/dev/null 2>&1 & + $sbindir/mysqlmanager "--pid-file=$pid_file" $USER_OPTION --run-as-service >/dev/null 2>&1 & # Make lock for RedHat / SuSE if test -w /var/lock/subsys then diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index 4767508315e..5f3dad86d89 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -362,8 +362,9 @@ install -s -m755 $MBD/sql/mysqld-max $RBR%{_sbindir}/mysqld-max install -m644 $MBD/sql/mysqld-max.sym $RBR%{_libdir}/mysql/mysqld-max.sym install -m644 $MBD/sql/mysqld.sym $RBR%{_libdir}/mysql/mysqld.sym -# Install logrotate and autostart +# Install logrotate, autostart and config file install -m644 $MBD/support-files/mysql-log-rotate $RBR%{_sysconfdir}/logrotate.d/mysql +install -m644 $MBD/support-files/my.cnf $RBR%{_sysconfdir}/my.cnf install -m755 $MBD/support-files/mysql.server $RBR%{_sysconfdir}/init.d/mysql # Create a symlink "rcmysql", pointing to the init.script. SuSE users @@ -374,10 +375,6 @@ ln -s %{_sysconfdir}/init.d/mysql $RPM_BUILD_ROOT%{_sbindir}/rcmysql # (safe_mysqld will be gone in MySQL 4.1) ln -sf ./mysqld_safe $RBR%{_bindir}/safe_mysqld -# Touch the place where the my.cnf config file might be located -# Just to make sure it's in the file list and marked as a config file -touch $RBR%{_sysconfdir}/my.cnf - %pre server # Shut down a previously installed server first if test -x %{_sysconfdir}/init.d/mysql @@ -486,8 +483,6 @@ fi %doc %attr(644, root, man) %{_mandir}/man1/perror.1* %doc %attr(644, root, man) %{_mandir}/man1/replace.1* -%ghost %config(noreplace,missingok) %{_sysconfdir}/my.cnf - %attr(755, root, root) %{_bindir}/my_print_defaults %attr(755, root, root) %{_bindir}/myisamchk %attr(755, root, root) %{_bindir}/myisam_ftdump @@ -520,6 +515,7 @@ fi %attr(644, root, root) %{_libdir}/mysql/mysqld.sym %attr(644, root, root) %config(noreplace,missingok) %{_sysconfdir}/logrotate.d/mysql +%attr(644, root, root) %config(noreplace,missingok) %{_sysconfdir}/my.cnf %attr(755, root, root) %{_sysconfdir}/init.d/mysql %attr(755, root, root) %{_datadir}/mysql/ |