Am 06.08.2015 um 13:56 schrieb Sergei Golubchik:
Hi, Reindl!
On Aug 06, Reindl Harald wrote:
Aug 6 12:24:24 testserver mysqld: 150806 12:24:24 [Note] /usr/libexec/mysqld (mysqld 10.0.20-MariaDB) starting as process 115096 ...
why is this now stdout instead mysql logs?
I cannot repeat it. Here:
$ ./mysqld >out 2>err & $ grep starting err out err:150806 13:53:24 [Note] /home/serg/maria/sql/mysqld (mysqld 10.0.21-MariaDB-debug) starting as process 22001 ... ^^^
[root@rh:~]$ > /var/log/messages [root@rh:~]$ > /var/log/mysql_error.log __________________________________________________ [root@rh:~]$ systemctl restart mysqld __________________________________________________ [root@rh:~]$ cat /var/log/messages Aug 6 14:08:09 rh systemd: Stopping MariaDB Database... Aug 6 14:08:09 rh rsyslogd: db error (2002): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2 "No such file or directory") Aug 6 14:08:11 rh systemd: Starting MariaDB Database... Aug 6 14:08:11 rh mysqld: 150806 14:08:11 [Note] /usr/libexec/mysqld (mysqld 10.0.20-MariaDB-log) starting as process 24789 ... Aug 6 14:08:13 rh systemd: Started MariaDB Database. __________________________________________________ [root@rh:~]$ cat /var/log/mysql_error.log 150806 14:08:09 [Note] /usr/libexec/mysqld: Normal shutdown 150806 14:08:09 [Note] Event Scheduler: Purging the queue. 0 events 150806 14:08:09 [Note] InnoDB: FTS optimize thread exiting. 150806 14:08:09 [Note] InnoDB: Starting shutdown... 150806 14:08:11 [Note] InnoDB: Shutdown completed; log sequence number 2890295270 150806 14:08:11 [Note] /usr/libexec/mysqld: Shutdown complete 150806 14:08:11 [Note] InnoDB: Using mutexes to ref count buffer pool pages 150806 14:08:11 [Note] InnoDB: The InnoDB memory heap is disabled 150806 14:08:11 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 150806 14:08:11 [Note] InnoDB: Memory barrier is not used 150806 14:08:11 [Note] InnoDB: Compressed tables use zlib 1.2.8 150806 14:08:11 [Note] InnoDB: Using Linux native AIO 150806 14:08:11 [Note] InnoDB: Using CPU crc32 instructions 150806 14:08:11 [Note] InnoDB: Initializing buffer pool, size = 64.0M 150806 14:08:11 [Note] InnoDB: Completed initialization of buffer pool 150806 14:08:11 [Note] InnoDB: Highest supported file format is Barracuda. 150806 14:08:12 [Note] InnoDB: 128 rollback segment(s) are active. 150806 14:08:12 [Note] InnoDB: Waiting for purge to start 150806 14:08:12 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.24-72.2 started; log sequence number 2890295270 150806 14:08:12 [Note] Plugin 'FEDERATED' is disabled. 150806 14:08:12 [Note] Plugin 'FEEDBACK' is disabled. 150806 14:08:12 [Note] Plugin 'partition' is disabled. 150806 14:08:13 [Note] Server socket created on IP: '0.0.0.0'. 150806 14:08:13 [Note] Event Scheduler: Loaded 0 events 150806 14:08:13 [Note] /usr/libexec/mysqld: ready for connections. Version: '10.0.20-MariaDB-log' socket: '/var/lib/mysql/mysql.sock' port: 3306 thelounge __________________________________________________ [root@rh:~]$ cat /usr/lib/systemd/system/mysqld.service [Unit] Description=MariaDB Database Before=postfix.service dovecot.service dbmail-imapd.service dbmail-lmtpd.service dbmail-pop3d.service dbmail-timsieved.service [Service] Type=simple User=mysql Group=mysql ExecStart=/usr/libexec/mysqld --defaults-file=/etc/my.cnf --pid-file=/dev/null ExecStartPost=/usr/libexec/mysqld-wait-ready $MAINPID Environment="LANG=en_GB.UTF-8" Restart=always RestartSec=1 TimeoutSec=300 LimitNOFILE=infinity LimitMEMLOCK=infinity OOMScoreAdjust=-1000 PrivateTmp=yes PrivateDevices=yes NoNewPrivileges=yes CapabilityBoundingSet=~CAP_AUDIT_CONTROL CAP_AUDIT_WRITE CAP_DAC_OVERRIDE CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_SETGID CAP_SETUID CAP_SYS_ADMIN CAP_SYS_BOOT CAP_SYS_MODULE CAP_SYS_PTRACE RestrictAddressFamilies=~AF_APPLETALK AF_ATMPVC AF_AX25 AF_IPX AF_NETLINK AF_PACKET AF_X25 SystemCallArchitectures=x86-64 ReadOnlyDirectories=/etc ReadOnlyDirectories=/usr ReadOnlyDirectories=/var/lib ReadWriteDirectories=/var/lib/mysql InaccessibleDirectories=-/boot InaccessibleDirectories=-/home InaccessibleDirectories=-/root InaccessibleDirectories=-/media InaccessibleDirectories=-/usr/local/scripts InaccessibleDirectories=-/var/lib/dbus InaccessibleDirectories=-/var/lib/dnf InaccessibleDirectories=-/var/lib/rpm InaccessibleDirectories=-/var/lib/systemd InaccessibleDirectories=-/var/lib/yum InaccessibleDirectories=-/var/spool InaccessibleDirectories=-/run/dbus InaccessibleDirectories=-/run/lock InaccessibleDirectories=-/run/mount InaccessibleDirectories=-/run/systemd/generator InaccessibleDirectories=-/run/systemd/system InaccessibleDirectories=-/run/systemd/users InaccessibleDirectories=-/run/udev InaccessibleDirectories=-/run/user [Install] WantedBy=multi-user.target __________________________________________________ [builduser@buildserver:~]$ cat /rpmbuild/SPECS/mariadb.spec Name: mariadb Version: 10.0.20 Release: 1%{?dist} Epoch: 2 Summary: MariaDB client programs and shared libraries Group: Applications/Databases URL: https://mariadb.org License: GPLv2 Source0: %{name}-%{version}.tar.gz Source1: mysqld.service Source2: mysqld-dbmail.service Source3: mysqld-replication.service Source4: mysqld-wait-ready Source5: mysqld-dbmail-wait-ready Source999: filter-requires-mysql.sh BuildRequires: bison BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: gperf BuildRequires: libaio-devel BuildRequires: ncurses-devel BuildRequires: openssl-devel BuildRequires: perl BuildRequires: perl(Data::Dumper) BuildRequires: perl(Socket) BuildRequires: perl(Test::More) BuildRequires: perl(Time::HiRes) BuildRequires: procps-ng BuildRequires: readline-devel BuildRequires: systemd-units BuildRequires: systemtap-sdt-devel BuildRequires: time BuildRequires: zlib-devel Requires: bash Requires: fileutils Requires: grep Requires: %{name}-libs = %{epoch}:%{version}-%{release} Provides: mysql = %{epoch}:%{version}-%{release}, mysql%{?_isa} = %{epoch}:%{version}-%{release} Obsoletes: mysql, community-mysql %global __perl_requires %{SOURCE999} %global __perllib_requires %{SOURCE999} %global debug_package %{nil} %global _default_patch_flags --no-backup-if-mismatch %description MariaDB is a multi-user, multi-threaded SQL database server %package libs Summary: The shared libraries required for MariaDB clients Group: Applications/Databases Provides: mysql-libs = %{epoch}:%{version}-%{release}, mysql-libs%{?_isa} = %{epoch}:%{version}-%{release} Obsoletes: mysql-libs, community-mysql-libs %description libs %package server Summary: The MariaDB server and related files Group: Applications/Databases Requires: %{name} = %{epoch}:%{version}-%{release}, %{name}-libs = %{epoch}:%{version}-%{release} Requires: sh-utils, systemd-units Requires(pre): shadow-utils Requires(post): systemd-units Provides: mysql-server = %{epoch}:%{version}-%{release}, mysql-server%{?_isa} = %{epoch}:%{version}-%{release} Obsoletes: mysql-server, community-mysql-server %description server %package devel Summary: Files for development of MariaDB applications Group: Applications/Databases Requires: %{name} = %{epoch}:%{version}-%{release}, %{name}-libs = %{epoch}:%{version}-%{release} Requires: openssl-devel Provides: mysql-devel = %{epoch}:%{version}-%{release}, mysql-devel%{?_isa} = %{epoch}:%{version}-%{release} Obsoletes: mysql-devel, community-mysql-devel %description devel %package test Summary: The test suite distributed with MariaDB Group: Applications/Databases Requires: %{name} = %{epoch}:%{version}-%{release}, %{name}-server = %{epoch}:%{version}-%{release} Requires: perl-DBD-MySQL, perl-DBI, perl-Env Provides: mysql-test = %{epoch}:%{version}-%{release}, mysql-test%{?_isa} = %{epoch}:%{version}-%{release} Obsoletes: mysql-test, community-mysql-test %description test %package manpages Summary: MariaDB manpages Group: Applications/Databases Provides: mysql-manpages = %{epoch}:%{version}-%{release}, mysql-manpages%{?_isa} = %{epoch}:%{version}-%{release} %description manpages %prep %setup -q -n %{name}-%{version} %build export CFLAGS="%{optflags} -O3 -funroll-loops -funswitch-loops -minline-all-stringops -fno-stack-protector -fstack-protector --param=ssp-buffer-size=8 -fPIC -fomit-frame-pointer -fno-exceptions -fwrapv -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" export CXXFLAGS="$CFLAGS" export FFLAGS="$CFLAGS" export FCFLAGS="$CFLAGS" export LDFLAGS="-Wl,-z,now -Wl,-z,relro,-z,noexecstack -pie %{optflags} -O3 -funroll-loops -funswitch-loops -minline-all-stringops" export SH_LDFLAGS="$LDFLAGS" cmake . -DBUILD_CONFIG=mysql_release \ -DFEATURE_SET="community" \ -DCMAKE_INSTALL_PREFIX="%{_prefix}" \ -DINSTALL_INCLUDEDIR=include/mysql \ -DINSTALL_LAYOUT=RPM \ -DINSTALL_LIBDIR="%{_lib}/mysql" \ -DINSTALL_MANDIR=share/man \ -DINSTALL_MYSQLSHAREDIR=share/mysql \ -DINSTALL_MYSQLTESTDIR=share/mysql-test \ -DINSTALL_PLUGINDIR="%{_lib}/mysql/plugin" \ -DINSTALL_SBINDIR=libexec \ -DINSTALL_SCRIPTDIR=bin \ -DINSTALL_SQLBENCHDIR= \ -DINSTALL_SUPPORTFILESDIR=share/mysql \ -DMYSQL_DATADIR="%{_sharedstatedir}/mysql" \ -DMYSQL_UNIX_ADDR="%{_sharedstatedir}/mysql/mysql.sock" \ -DWITH_XTRADB=1 \ -DWITH_PARTITION=1 \ -DWITHOUT_ARCHIVE=1 \ -DWITHOUT_BLACKHOLE=1 \ -DWITHOUT_CASSANDRA=1 \ -DWITHOUT_MROONGA=1 \ -DWITHOUT_OQGRAPH=1 \ -DWITHOUT_PERFSCHEMA=1 \ -DWITHOUT_SPHINX=1 \ -DWITHOUT_SPIDER=1 \ -DENABLED_PROFILING=OFF \ -DENABLE_DTRACE=OFF \ -DENABLE_DEBUG_SYNC=OFF \ -DWITHOUT_TOKUDB=ON \ -DWITH_VALGRIND=OFF \ -DWITH_SAFEMALLOC=OFF \ -DWITH_EMBEDDED_SERVER=OFF \ -DWITH_FEEDBACK=OFF \ -DWITH_LIBWRAP=OFF \ -DWITH_QUERY_CACHE_INFO=OFF \ -DWITH_READLINE=OFF \ -DUSE_NEW_READLINE_INTERFACE=ON \ -DENABLED_LOCAL_INFILE=ON \ -DNOT_FOR_DISTRIBUTION=ON \ -DWITH_FAST_MUTEXES=ON \ -DWITH_ATOMIC_OPS=smp \ -DWITHOUT_DYNAMIC_PLUGINS=ON \ -DWITH_PIC=ON \ -DWITH_JEMALLOC=system \ -DWITH_SSL=system \ -DWITH_ZLIB=system \ -DCOMPILATION_COMMENT="thelounge" %{__make} %{?_smp_mflags} VERBOSE=1 %install make install DESTDIR=%{buildroot} find %{buildroot} -print | sed "s|^%{buildroot}||" | sort > ROOTFILES sed -e 's/-lprobes_mysql//' -e 's/-lmysqlclient_r/-lmysqlclient/' %{buildroot}%{_bindir}/mysql_config > mysql_config.tmp cp -p -f mysql_config.tmp %{buildroot}%{_bindir}/mysql_config chmod 0755 %{buildroot}%{_bindir}/mysql_config ln -s ../../../../../bin/mysql_config %{buildroot}%{_libdir}/mysql/mysql_config mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d %{buildroot}%{_unitdir} install -m 0755 -d %{buildroot}%{_sharedstatedir}/mysql install -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/mysqld.service install -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/mysqld-dbmail.service install -m 0644 %{SOURCE3} %{buildroot}%{_unitdir}/replication.service install -m 0755 %{SOURCE4} %{buildroot}%{_libexecdir}/mysqld-wait-ready install -m 0755 %{SOURCE5} %{buildroot}%{_libexecdir}/mysqld-dbmail-wait-ready echo "%{_libdir}/mysql" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf rm -f %{buildroot}%{_libdir}/mysql/libmysqlclient_r.so* ln -s libmysqlclient.so %{buildroot}%{_libdir}/mysql/libmysqlclient_r.so strip -s %{buildroot}%{_bindir}/aria_chk \ %{buildroot}%{_bindir}/aria_dump_log \ %{buildroot}%{_bindir}/aria_ftdump \ %{buildroot}%{_bindir}/aria_pack \ %{buildroot}%{_bindir}/aria_read_log \ %{buildroot}%{_bindir}/innochecksum \ %{buildroot}%{_bindir}/myisamchk \ %{buildroot}%{_bindir}/myisam_ftdump \ %{buildroot}%{_bindir}/myisamlog \ %{buildroot}%{_bindir}/myisampack \ %{buildroot}%{_bindir}/my_print_defaults \ %{buildroot}%{_bindir}/mysql \ %{buildroot}%{_bindir}/mysqladmin \ %{buildroot}%{_bindir}/mysqlbinlog \ %{buildroot}%{_bindir}/mysqlcheck \ %{buildroot}%{_bindir}/mysql_client_test \ %{buildroot}%{_bindir}/mysqldump \ %{buildroot}%{_bindir}/mysqlimport \ %{buildroot}%{_bindir}/mysql_plugin \ %{buildroot}%{_bindir}/mysqlshow \ %{buildroot}%{_bindir}/mysqlslap \ %{buildroot}%{_bindir}/mysqltest \ %{buildroot}%{_bindir}/mysql_tzinfo_to_sql \ %{buildroot}%{_bindir}/mysql_upgrade \ %{buildroot}%{_bindir}/mysql_waitpid \ %{buildroot}%{_bindir}/perror \ %{buildroot}%{_bindir}/replace \ %{buildroot}%{_bindir}/resolveip \ %{buildroot}%{_bindir}/resolve_stack_dump \ %{buildroot}%{_libdir}/mysql/libmysqlclient.so* \ %{buildroot}%{_libexecdir}/mysqld rm -rf %{buildroot}%{_bindir}/msql2mysql \ %{buildroot}%{_bindir}/mysqlaccess.conf \ %{buildroot}%{_bindir}/mysqlbug \ %{buildroot}%{_bindir}/mysqld_multi \ %{buildroot}%{_bindir}/mysqld_safe \ %{buildroot}%{_bindir}/mysql_secure_installation \ %{buildroot}%{_bindir}/mysql_setpermission \ %{buildroot}%{_bindir}/mytop \ %{buildroot}%{_bindir}/tokuftdump \ %{buildroot}%{_datadir}/mysql/binary-configure \ %{buildroot}%{_datadir}/mysql/charsets/README \ %{buildroot}%{_datadir}/mysql/config.*.ini \ %{buildroot}%{_datadir}/mysql/magic \ %{buildroot}%{_datadir}/mysql/my-*.cnf \ %{buildroot}%{_datadir}/mysql/mysqld_multi.server \ %{buildroot}%{_datadir}/mysql/mysql-log-rotate \ %{buildroot}%{_datadir}/mysql/mysql.server \ %{buildroot}%{_datadir}/mysql/ndb-config-2-node.ini \ %{buildroot}%{_datadir}/mysql/solaris/postinstall-solaris \ %{buildroot}%{_datadir}/mysql/install_spider.sql \ %{buildroot}%{_docdir}/COPYING \ %{buildroot}%{_docdir}/COPYING.LESSER \ %{buildroot}%{_docdir}/CREDITS \ %{buildroot}%{_docdir}/EXCEPTIONS-CLIENT \ %{buildroot}%{_docdir}/INSTALL-BINARY \ %{buildroot}%{_docdir}/README \ %{buildroot}%{_docdir}/README.md \ %{buildroot}%{_docdir}/README-TOKUDB \ %{buildroot}%{_libdir}/mysql/*.a \ %{buildroot}%{_mandir}/man1/comp_err.1* \ %{buildroot}%{_mandir}/man1/mysql-stress-test.pl.1* \ %{buildroot}%{_mandir}/man1/mysql-test-run.pl.1* \ %{buildroot}%{_prefix}/COPYING \ %{buildroot}%{_prefix}/data/mysql/.empty \ %{buildroot}%{_prefix}/data/test/.empty \ %{buildroot}%{_prefix}/docs/ChangeLog \ %{buildroot}%{_prefix}/INSTALL-BINARY \ %{buildroot}%{_prefix}/README \ %{buildroot}%{_sysconfdir}/init.d/mysql \ %{buildroot}%{_sysconfdir}/logrotate.d/mysql \ %{buildroot}%{_sysconfdir}/my.cnf \ %{buildroot}%{_datarootdir}/mysql/SELinux/ \ %{buildroot}%{_libdir}/mysql/plugin/ \ %{buildroot}%{_sysconfdir}/my.cnf.d/ %pre server %{_sbindir}/groupadd -g 27 -o -r mysql &> /dev/null %{_sbindir}/useradd -M -N -g mysql -o -r -d %{_sharedstatedir}/mysql -s %{_sbindir}/nologin -c "MariaDB Server" -u 27 mysql &> /dev/null exit 0 %post libs %{_sbindir}/ldconfig %post server %{_bindir}/systemctl --system daemon-reload &> /dev/null %{_bindir}/chmod 0755 %{_sharedstatedir}/mysql exit 0 %postun libs if [ $1 = 0 ] ; then %{_sbindir}/ldconfig fi exit 0 %postun server %{_bindir}/systemctl --system daemon-reload &> /dev/null exit 0 %files %{_bindir}/my_print_defaults %{_bindir}/mysql %{_bindir}/mysqlaccess %{_bindir}/mysqladmin %{_bindir}/mysqlbinlog %{_bindir}/mysqlcheck %{_bindir}/mysql_config %{_bindir}/mysqldump %{_bindir}/mysql_find_rows %{_bindir}/mysqlimport %{_bindir}/mysqlshow %{_libdir}/mysql/mysql_config %files libs %dir %{_libdir}/mysql %{_libdir}/mysql/libmysqlclient.so.18* %{_sysconfdir}/ld.so.conf.d/* %dir %{_datadir}/mysql %{_datadir}/mysql/charsets %{_datadir}/mysql/english %lang(cs) %{_datadir}/mysql/czech %lang(da) %{_datadir}/mysql/danish %lang(de) %{_datadir}/mysql/german %lang(el) %{_datadir}/mysql/greek %lang(es) %{_datadir}/mysql/spanish %lang(et) %{_datadir}/mysql/estonian %lang(fr) %{_datadir}/mysql/french %lang(hu) %{_datadir}/mysql/hungarian %lang(it) %{_datadir}/mysql/italian %lang(ja) %{_datadir}/mysql/japanese %lang(ko) %{_datadir}/mysql/korean %lang(nl) %{_datadir}/mysql/dutch %lang(no) %{_datadir}/mysql/norwegian %lang(no) %{_datadir}/mysql/norwegian-ny %lang(pl) %{_datadir}/mysql/polish %lang(pt) %{_datadir}/mysql/portuguese %lang(ro) %{_datadir}/mysql/romanian %lang(ru) %{_datadir}/mysql/russian %lang(sk) %{_datadir}/mysql/slovak %lang(sr) %{_datadir}/mysql/serbian %lang(sv) %{_datadir}/mysql/swedish %lang(uk) %{_datadir}/mysql/ukrainian %files server %attr(0755,mysql,mysql) %dir %{_sharedstatedir}/mysql %{_bindir}/innochecksum %{_bindir}/myisamchk %{_bindir}/mysqldumpslow %{_bindir}/mysql_fix_extensions %{_bindir}/mysql_upgrade %{_bindir}/perror %{_bindir}/resolve_stack_dump %{_datadir}/mysql/errmsg-utf8.txt %{_datadir}/mysql/mysql_performance_tables.sql %{_datadir}/mysql/mysql_system_tables_data.sql %{_datadir}/mysql/mysql_system_tables.sql %{_libexecdir}/mysqld %{_libexecdir}/mysqld-wait-ready %{_libexecdir}/mysqld-dbmail-wait-ready %{_unitdir}/mysqld.service %{_unitdir}/mysqld-dbmail.service %{_unitdir}/replication.service %files devel %{_datarootdir}/aclocal/mysql.m4 %{_includedir}/mysql %{_libdir}/mysql/libmysqlclient_r.so %{_libdir}/mysql/libmysqlclient.so %files test %attr(-,mysql,mysql) %{_datadir}/mysql-test %{_bindir}/aria_chk %{_bindir}/aria_dump_log %{_bindir}/aria_ftdump %{_bindir}/aria_pack %{_bindir}/aria_read_log %{_bindir}/myisam_ftdump %{_bindir}/myisamlog %{_bindir}/myisampack %{_bindir}/mysql_client_test %{_bindir}/mysql_convert_table_format %{_bindir}/mysqlhotcopy %{_bindir}/mysql_plugin %{_bindir}/mysqlslap %{_bindir}/mysqltest %{_bindir}/mysql_waitpid %{_bindir}/mysql_zap %{_bindir}/replace %{_bindir}/resolveip %{_datadir}/mysql/mysql_test_data_timezone.sql %files manpages %{_mandir}/man1/* %{_mandir}/man8/* %{_bindir}/mysql_tzinfo_to_sql %{_bindir}/mysql_install_db %{_datadir}/mysql/fill_help_tables.sql %changelog * Thu Aug 6 2015 Reindl Harald <h.reindl@thelounge.net> - remove all the RuntimeDirectory crap from systemd-units - start with '--pid-file=/dev/null' since systemd is fine without - see https://bugzilla.redhat.com/show_bug.cgi?id=1226509