[Maria-discuss] Installing MariaDB Alongside MySQL
Am 05.05.2018 um 11:43 schrieb Muhammad Bashir Al-Noimi:
May 03 04:54:01 domain.com systemd[1]: Starting LSB: start and stop MariaDB... May 03 04:54:01 domain.com mysqld[17145]: Starting MariaDB May 03 04:54:01 domain.com mysqld[17145]: .2018-05-03T01:54:01.525119Z mysqld_safe Logging to '/var/lib/mysql/domain.com.err'. May 03 04:54:01 domain.com mysqld[17145]: 2018-05-03T01:54:01.551305Z mysqld_safe A mysqld process already exists May 03 04:54:02 domain.com systemd[1]: mariadb.service: Control process exited, code=exited status=1 May 03 04:54:02 domain.com systemd[1]: Failed to start LSB: start and stop MariaDB. May 03 04:54:02 domain.com systemd[1]: mariadb.service: Unit entered failed state. May 03 04:54:02 domain.com systemd[1]: mariadb.service: Failed with result 'exit-code'.
How can I fix this issue?
IMPORTANT:
* In the attachments you can find *"/opt/mariadb-data/my.cnf"* AND *"/etc/init.d/mariadb**files"* * Ubuntu Linux 16.04.2 x64 * Downloaded mariadb-10.2.14-linux-x86_64.tar.gz
Sorry I didn't mention the source of MariaDB documentation https://mariadb.com/kb/en/library/installing-mariadb-alongside-mysql/
just strip out mysqld_safe at all - we even don't ship it the last 7 years with out packages - since systemd supports "Restart=always" there is no need for babysitting and you also don't need to fire up anything as root - would at least have saved one critical secuirty issue in the past for "Type=notify" you need to have systemd-devel installed at build-time and it's recommended because After/Before works relieable and start follow-up services when mysqld is really ready for connections __________________ [root@srv-rhsoft:~]$ 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=notify KillMode=process KillSignal=SIGTERM SendSIGKILL=no User=mysql Group=mysql ExecStart=/usr/libexec/mysqld --defaults-file=/etc/my.cnf --pid-file=/dev/null Environment="LANG=en_GB.UTF-8" Restart=always RestartSec=1 TimeoutSec=300 LimitNOFILE=infinity LimitMEMLOCK=infinity OOMScoreAdjust=-1000 TasksMax=2048
Am 05.05.2018 um 12:28 schrieb Muhammad Bashir Al-Noimi:
On 05/05/2018 12:49 PM, Reindl Harald wrote:
Am 05.05.2018 um 11:43 schrieb Muhammad Bashir Al-Noimi:
May 03 04:54:01 domain.com systemd[1]: Starting LSB: start and stop MariaDB... May 03 04:54:01 domain.com mysqld[17145]: Starting MariaDB May 03 04:54:01 domain.com mysqld[17145]: .2018-05-03T01:54:01.525119Z mysqld_safe Logging to '/var/lib/mysql/domain.com.err'. May 03 04:54:01 domain.com mysqld[17145]: 2018-05-03T01:54:01.551305Z mysqld_safe A mysqld process already exists May 03 04:54:02 domain.com systemd[1]: mariadb.service: Control process exited, code=exited status=1 May 03 04:54:02 domain.com systemd[1]: Failed to start LSB: start and stop MariaDB. May 03 04:54:02 domain.com systemd[1]: mariadb.service: Unit entered failed state. May 03 04:54:02 domain.com systemd[1]: mariadb.service: Failed with result 'exit-code'. How can I fix this issue?
IMPORTANT:
* In the attachments you can find *"/opt/mariadb-data/my.cnf"* AND *"/etc/init.d/mariadb**files"* * Ubuntu Linux 16.04.2 x64 * Downloaded mariadb-10.2.14-linux-x86_64.tar.gz
Sorry I didn't mention the source of MariaDB documentation https://mariadb.com/kb/en/library/installing-mariadb-alongside-mysql/ just strip out mysqld_safe at all - we even don't ship it the last 7 years with out packages - since systemd supports "Restart=always" there is no need for babysitting and you also don't need to fire up anything as root - would at least have saved one critical secuirty issue in the past
for "Type=notify" you need to have systemd-devel installed at build-time and it's recommended because After/Before works relieable and start follow-up services when mysqld is really ready for connections __________________
[root@srv-rhsoft:~]$ 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=notify KillMode=process KillSignal=SIGTERM SendSIGKILL=no
User=mysql Group=mysql
ExecStart=/usr/libexec/mysqld --defaults-file=/etc/my.cnf --pid-file=/dev/null Environment="LANG=en_GB.UTF-8" Restart=always RestartSec=1 TimeoutSec=300 LimitNOFILE=infinity LimitMEMLOCK=infinity OOMScoreAdjust=-1000 TasksMax=2048 Thanks Reindl
root@hpc-tech:~# systemctl status mariadb.service ● mariadb.service - LSB: start and stop MariaDB Loaded: loaded (/etc/init.d/mariadb; bad; vendor preset: enabled) Drop-In: /etc/systemd/system/mariadb.service.d └─migrated-from-my.cnf-settings.conf Active: failed (Result: exit-code) since Sat 2018-05-05 13:23:55 +03; 3s ago Docs: man:systemd-sysv-generator(8) Process: 21831 ExecStart=/etc/init.d/mariadb start (code=exited, status=1/FAILURE)
get rid of that damned /etc/init.d/mariadb crap WTF is "ExecStart=/etc/init.d/mariadb start" put your service in /etc/systemd/system/mariadb.service and you are done no idea what you did not understand in the ExecStart from my sample above
Am 06.05.2018 um 22:53 schrieb Muhammad Bashir Al-Noimi:
I use /etc/systemd/system/mariadb.service as mentioned before but I struggle with a new problem and I spent a whole day trying to fix it but I failed :(
I always get this error message through journalctl -xe although my.cnf already exists and has a prober permissions!
May 06 23:26:41 domain.com mysqld[26621]: Could not open required defaults file: /opt/mariadb-data/my.cnf How to to fix this issue?
* /opt/mariadb-data/my.cnf
https://gist.github.com/mbnoimi/b9daceca0e0e21da86b048b9883c5edf
* /etc/systemd/system/mariadb.service
https://gist.github.com/mbnoimi/5920301ff79dcb88aab3ef7fa459733e
* I use this steps for installing MariaDB
log-error=/opt/mariadb-data/mariadb.err * have you ever considered to look at that file? * what are the permissions for /opt * what are the permissions for /opt/mariadb-data Linux is not windows - if a parent folder don't have the correct permissions no access to files below - as you start (correctly) with the restricted user that's important what does "stat /opt", "stat /opt/mariadb-data" and "stat /opt/mariadb-data/my.cnf" say?
Am 06.05.2018 um 23:18 schrieb Reindl Harald:
Am 06.05.2018 um 22:53 schrieb Muhammad Bashir Al-Noimi:
I use /etc/systemd/system/mariadb.service as mentioned before but I struggle with a new problem and I spent a whole day trying to fix it but I failed :(
I always get this error message through journalctl -xe although my.cnf already exists and has a prober permissions!
May 06 23:26:41 domain.com mysqld[26621]: Could not open required defaults file: /opt/mariadb-data/my.cnf How to to fix this issue?
* /opt/mariadb-data/my.cnf
https://gist.github.com/mbnoimi/b9daceca0e0e21da86b048b9883c5edf
* /etc/systemd/system/mariadb.service
https://gist.github.com/mbnoimi/5920301ff79dcb88aab3ef7fa459733e
* I use this steps for installing MariaDB
log-error=/opt/mariadb-data/mariadb.err
* have you ever considered to look at that file? * what are the permissions for /opt * what are the permissions for /opt/mariadb-data
Linux is not windows - if a parent folder don't have the correct permissions no access to files below - as you start (correctly) with the restricted user that's important
what does "stat /opt", "stat /opt/mariadb-data" and "stat /opt/mariadb-data/my.cnf" say?
and BTW https://gist.github.com/mbnoimi/b9daceca0e0e21da86b048b9883c5edf tmpdir = /tmp tmpdir = /opt/mariadb-data/tmp have you ever considered to cleanup your config because when i see such sonsense i doubt!
Hi Reindl, Den 5. maj 2018 kl. 12.42 skrev Reindl Harald <h.reindl@thelounge.net>:
get rid of that damned /etc/init.d/mariadb crap WTF is "ExecStart=/etc/init.d/mariadb start"
put your service in /etc/systemd/system/mariadb.service and you are done
no idea what you did not understand in the ExecStart from my sample above
This is a public mailing list, and as such goes out to a lot of people. Can you please leave out the profanities and arrogance in your future posts? It's unnecessary, it scares off beginners, it reflects badly on the project and quite frankly makes following this list much less enjoyable than it should be. Thanks, Erik
Hi, I have installed a new Ubuntu VM 16.04, installed MySQL 5.7 from Ubuntu repositories and MariaDB using the outline provided in the link https://ubuntuforums.org/showthread.php?t=2391680&p=13765881#post13765881 and got it working. The problem is stemming from the configuration files. By default, both MariaDB and MySQL read the options from /etc/mysql/my.cnf. A side effect of this is that the MariaDB installation under /opt is reading from /etc/mysql that has the options for MySQL, which is causing all your errors. To get around this you need to use the "--defaults-file=/opt/mariadb-data/my.cnf" option with every MariaDB command. In the example below, I started MariaDB using systemctl. # Verify MySQL 5.7 is running root@ubuntu:/etc/systemd/system# mysqladmin -uroot -p version ... Server version 5.7.22-0ubuntu0.16.04.1 Protocol version 10 Connection Localhost via UNIX socket UNIX socket /var/run/mysqld/mysqld.sock Uptime: 12 min 7 sec Threads: 1 Questions: 9 Slow queries: 0 Opens: 107 Flush tables: 1 Open tables: 26 Queries per second avg: 0.012 root@ubuntu:/etc/systemd/system# Start MariaDB: # systemctl start mariadb # /opt/mariadb/bin/mysqladmin --defaults-file=/opt/mariadb-data/my.cnf -uroot -p version ... Server version 10.2.14-MariaDB-log Protocol version 10 Connection Localhost via UNIX socket UNIX socket /opt/mariadb-data/mariadb.sock Uptime: 1 min 18 sec Threads: 8 Questions: 1 Slow queries: 0 Opens: 17 Flush tables: 1 Open tables: 11 Queries per second avg: 0.012 root@ubuntu:/etc/systemd/system# To view which option a command has set use "--print-defaults", for example: root@ubuntu:/etc/mysql# mysqladmin --print-defaults mysqladmin would have been started with the following arguments: root@ubuntu:/etc/mysql# mysqladmin --defaults-file=/opt/mariadb-data/my.cnf --print-defaults mysqladmin would have been started with the following arguments: --port=3308 --socket=/opt/mariadb-data/mariadb.sock root@ubuntu:/etc/mysql# Hope this clarified the matters Kenneth On Sat, May 12, 2018 at 10:26 AM, Muhammad Bashir Al-Noimi < mbnoimi@gmail.com> wrote:
On 05/03/2018 05:16 AM, Muhammad Bashir Al-Noimi wrote:
Hi,
I applied exactly the mentioned instructions in MariaDB documentation but unfortunately I always receive the following error message:
# systemctl status mariadb.service ● mariadb.service - LSB: start and stop MariaDB Loaded: loaded (/etc/init.d/mariadb; bad; vendor preset: enabled) Drop-In: /etc/systemd/system/mariadb.service.d └─migrated-from-my.cnf-settings.conf Active: failed (Result: exit-code) since Thu 2018-05-03 04:54:02 +03; 15min ago Docs: man:systemd-sysv-generator(8) Process: 17145 ExecStart=/etc/init.d/mariadb start (code=exited, status=1/FAILURE)
May 03 04:54:01 domain.com systemd[1]: Starting LSB: start and stop MariaDB... May 03 04:54:01 domain.com mysqld[17145]: Starting MariaDB May 03 04:54:01 domain.com mysqld[17145]: .2018-05-03T01:54:01.525119Z mysqld_safe Logging to '/var/lib/mysql/domain.com.err'. May 03 04:54:01 domain.com mysqld[17145]: 2018-05-03T01:54:01.551305Z mysqld_safe A mysqld process already exists May 03 04:54:02 domain.com systemd[1]: mariadb.service: Control process exited, code=exited status=1 May 03 04:54:02 domain.com systemd[1]: Failed to start LSB: start and stop MariaDB. May 03 04:54:02 domain.com systemd[1]: mariadb.service: Unit entered failed state. May 03 04:54:02 domain.com systemd[1]: mariadb.service: Failed with result 'exit-code'.
How can I fix this issue?
IMPORTANT:
- In the attachments you can find *"/opt/mariadb-data/my.cnf"* AND *"/etc/init.d/mariadb** files"* - Ubuntu Linux 16.04.2 x64 - Downloaded mariadb-10.2.14-linux-x86_64.tar.gz
-- Best Regards, Muhammad Bashir Al-Noimi Skype+Telegram+GMail: mbnoimi
Guys, may I get some help here. I'm unable to bypass this issue since days weeks!
I posted a full format version of this issue in ubuntu forums too: https://ubuntuforums.org/showthread.php?t=2391680&p=13765881#post13765881
-- Best Regards, Muhammad Bashir Al-Noimi Skype+Telegram+GMail: mbnoimi
_______________________________________________ Mailing list: https://launchpad.net/~maria-discuss Post to : maria-discuss@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-discuss More help : https://help.launchpad.net/ListHelp
Good morning Muhammad, I have checked and I am using your mariadb.service file. For some reason, mariadb is failing to start. We need to determine if the issue is coming from systemd or something in MariaDB datadir. To start it without systemd, run: /opt/mariadb/bin/mysqld --defaults-file=/opt/mariadb-data/my.cnf & The below should work: /opt/mariadb/bin/mysqladmin --defaults-file=/opt/mariadb-data/my.cnf -uroot -p version /opt/mariadb/bin/mysqladmin --defaults-file=/opt/mariadb-data/my.cnf -uroot -p shutdown If the above does not work, you need to re-initialise mariadb: kill the mysqld running as mariadb user. cd /opt/mariadb-data cp -p my.cnf /tmp rm -rf * cp -p /tmp/my.cnf . rm -rf * # Attention data loss step cd /opt/mariadb-10.2.14-linux-x86_64/ scripts/mysql_install_db --user=mariadb --defaults-file=/opt/mariadb-data/my.cnf Otherwise its a systemd issue: In that case can you provide the output of the following commands: ps -ef | grep mysql systemctl status mariadb systemctl start mariadb ps -ef | grep mysql systemctl status mariadb Hope this helps Kenneth On Tue, May 15, 2018 at 10:05 AM, Muhammad Bashir Al-Noimi < mbnoimi@gmail.com> wrote:
On 05/12/2018 11:56 PM, Kenneth Penza wrote:
I have installed a new Ubuntu VM 16.04, installed MySQL 5.7 from Ubuntu repositories and MariaDB using the outline provided in the link https://ubuntuforums.org/showthread.php?t=2391680&p=13765881#post13765881 and got it working.
The problem is stemming from the configuration files. By default, both MariaDB and MySQL read the options from /etc/mysql/my.cnf. A side effect of this is that the MariaDB installation under /opt is reading from /etc/mysql that has the options for MySQL, which is causing all your errors. To get around this you need to use the "--defaults-file=/opt/mariadb-data/my.cnf" option with every MariaDB command.
If you take a look into my snippet of /etc/systemd/system/mariadb.service you'll notice that I call --defaults-file with ExecStart property so I suppose it should work fine when I call systemctl start mariadb.service but it doesn't :( https://gist.github.com/mbnoimi/5920301ff79dcb88aab3ef7fa45973 3e#file-mariadb-service-L19 ExecStart=/opt/mariadb/bin/mysqld --defaults-file=/opt/mariadb-data/my.cnf
# systemctl start mariadb # /opt/mariadb/bin/mysqladmin --defaults-file=/opt/mariadb-data/my.cnf -uroot -p version
# /opt/mariadb/bin/mysqladmin --defaults-file=/opt/mariadb-data/my.cnf -uroot -p version Enter password: /opt/mariadb/bin/mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/opt/mariadb-data/mariadb.sock' (2)' Check that mysqld is running and that the socket: '/opt/mariadb-data/mariadb.sock' exists! #
root@ubuntu:/etc/mysql# mysqladmin --defaults-file=/opt/mariadb-data/my.cnf --print-defaults
# mysqladmin --defaults-file=/opt/mariadb-data/my.cnf --print-defaults mysqladmin would have been started with the following arguments: --port=3308 --socket=/opt/mariadb-data/mariadb.sock #
-- Best Regards, Muhammad Bashir Al-Noimi Skype+Telegram+GMail: mbnoimi
Am 15.05.2018 um 11:39 schrieb Muhammad Bashir Al-Noimi:
# /opt/mariadb/bin/mysqladmin --defaults-file=/opt/mariadb-data/my.cnf -uroot -p shutdown Enter password: /opt/mariadb/bin/mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user 'root'@'localhost' (using password: YES)'
Strangely!!!
I passed the correct password of Ubuntu's root user!
irrelevant as you can see by "connect to server at 'localhost' failed" /opt/mariadb/bin/mysqladmin --socket=path-to-socket or make sure "/opt/mariadb-data/my.cnf" has a [mysqladmin] section [mysqladmin] socket = path-to-socket
Am 15.05.2018 um 11:49 schrieb Reindl Harald:
Am 15.05.2018 um 11:39 schrieb Muhammad Bashir Al-Noimi:
# /opt/mariadb/bin/mysqladmin --defaults-file=/opt/mariadb-data/my.cnf -uroot -p shutdown Enter password: /opt/mariadb/bin/mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user 'root'@'localhost' (using password: YES)'
Strangely!!!
I passed the correct password of Ubuntu's root user!
irrelevant as you can see by "connect to server at 'localhost' failed"
/opt/mariadb/bin/mysqladmin --socket=path-to-socket
or make sure "/opt/mariadb-data/my.cnf" has a [mysqladmin] section [mysqladmin] socket = path-to-socket
in fact each tool has it's own config section in the defaults file while port is for TCP (127.0.0.1) and socket for socket-connections (localhost) [mysqld] socket = /var/lib/mysql/mysql-replication.sock port = 3307 [client] socket = /var/lib/mysql/mysql-replication.sock port = 3307 [mysqladmin] socket = /var/lib/mysql/mysql-replication.sock port = 3307
Am 15.05.2018 um 12:06 schrieb Muhammad Bashir Al-Noimi:
On 05/15/2018 12:09 PM, Kenneth Penza wrote:
/opt/mariadb/bin/mysqladmin --defaults-file=/opt/mariadb-data/my.cnf -uroot -p version I tried to call it with mariadb user instead of root so I get this result:
# /opt/mariadb/bin/mysqladmin --defaults-file=/opt/mariadb-data/my.cnf -umariadb -p version
Enter password:
/opt/mariadb/bin/mysqladmin Ver 9.1 Distrib 10.2.14-MariaDB, for Linux on x86_64
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Server version 10.2.14-MariaDB-log
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket /opt/mariadb-data/mariadb.sock
Uptime: 5 min 2 sec
Threads: 8 Questions: 1 Slow queries: 0 Opens: 17 Flush tables: 1 Open tables: 11 Queries per second avg: 0.003
so it works and " error: 'Access denied for user 'root'@'localhost' (using password: YES)'" is what it is are you aware that 'root' on unix-socket (localhost) is not the same than 'root' over TCP (127.0.0.1) beause you have a host column? also make sure you did run 'mysql_upgrade' and if nothing else helps google for "mysql skip grant" but be aware that this allows *any* user with *any* password until removed from the config, but so you can bypass logins and fix things properly
Am 15.05.2018 um 12:22 schrieb Muhammad Bashir Al-Noimi:
On 05/15/2018 01:12 PM, Reindl Harald wrote:
so it works and " error: 'Access denied for user 'root'@'localhost' (using password: YES)'" is what it is
are you aware that 'root' on unix-socket (localhost) is not the same than 'root' over TCP (127.0.0.1) beause you have a host column?
also make sure you did run 'mysql_upgrade' and if nothing else helps google for "mysql skip grant" but be aware that this allows *any* user with *any* password until removed from the config, but so you can bypass logins and fix things properly Worked but still important issue with systemctl. I wonder what's wrong with mariadb.service https://gist.github.com/mbnoimi/5920301ff79dcb88aab3ef7fa459733e
can you please stop posting links left and right? * that's all plaintext * post it deirectly * look in the errorlog * post systemctl outputs (also for systemctl status) *what is that issue* likely your unit is missing the [Install]-section at the bottom which is the reason you can't enable it - sorry but i hate it to guess [Install] WantedBy=multi-user.target _________________________ i simply stripped down the unit to the relevant parts for get rid of mysqld_safe because i don't think that you understand most implications of the full unit i use and don't want a endless thread _________________________ [root@buildserver:~]$ 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=notify KillMode=process KillSignal=SIGTERM SendSIGKILL=no User=mysql Group=mysql ExecStart=/usr/libexec/mysqld --defaults-file=/etc/my.cnf --pid-file=/dev/null Environment="LANG=en_GB.UTF-8" Restart=always RestartSec=1 TimeoutSec=300 LimitNOFILE=infinity LimitMEMLOCK=infinity OOMScoreAdjust=-1000 TasksMax=2048 AmbientCapabilities=CAP_IPC_LOCK CAP_SYS_NICE CapabilityBoundingSet=CAP_IPC_LOCK CAP_SYS_NICE MemoryDenyWriteExecute=yes NoNewPrivileges=yes PrivateDevices=yes PrivateTmp=yes ProtectControlGroups=yes ProtectKernelModules=yes ProtectKernelTunables=yes RestrictAddressFamilies=AF_UNIX AF_LOCAL AF_INET AF_INET6 SystemCallArchitectures=x86-64 SystemCallFilter=~@clock @cpu-emulation @debug @keyring @module @mount @obsolete @raw-io @reboot @swap acct modify_ldt add_key adjtimex clock_adjtime delete_module fanotify_init finit_module get_mempolicy init_module kcmp kexec_load keyctl lookup_dcookie mbind mount open_by_handle_at perf_event_open pivot_root process_vm_readv process_vm_writev ptrace request_key set_mempolicy swapoff swapon umount2 uselib vmsplice ReadOnlyDirectories=/etc ReadOnlyDirectories=/usr ReadOnlyDirectories=/var/lib ReadWriteDirectories=/var/lib/mysql InaccessibleDirectories=-/boot InaccessibleDirectories=-/home InaccessibleDirectories=-/root InaccessibleDirectories=-/media InaccessibleDirectories=-/etc/httpd InaccessibleDirectories=-/etc/postfix InaccessibleDirectories=-/etc/ssh InaccessibleDirectories=-/usr/local/scripts InaccessibleDirectories=-/var/lib/dbus InaccessibleDirectories=-/var/lib/dnf InaccessibleDirectories=-/var/lib/rpm InaccessibleDirectories=-/var/lib/systemd 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
and BTW the "--pid-file=/dev/null" has a damned good reason because you don't need to care about subfolders below /run to get re-created with corerct permissions at reboot while a restriucted user can't create folders and files there and run is tmpfs aka memory since mariadb is a single-process multi-threadded service and systemd can watch it perfectly without handholing no pid-file stuff is needed at all Am 15.05.2018 um 12:34 schrieb Reindl Harald:
Am 15.05.2018 um 12:22 schrieb Muhammad Bashir Al-Noimi:
On 05/15/2018 01:12 PM, Reindl Harald wrote:
so it works and " error: 'Access denied for user 'root'@'localhost' (using password: YES)'" is what it is
are you aware that 'root' on unix-socket (localhost) is not the same than 'root' over TCP (127.0.0.1) beause you have a host column?
also make sure you did run 'mysql_upgrade' and if nothing else helps google for "mysql skip grant" but be aware that this allows *any* user with *any* password until removed from the config, but so you can bypass logins and fix things properly Worked but still important issue with systemctl. I wonder what's wrong with mariadb.service https://gist.github.com/mbnoimi/5920301ff79dcb88aab3ef7fa459733e
can you please stop posting links left and right?
* that's all plaintext * post it deirectly * look in the errorlog * post systemctl outputs (also for systemctl status)
*what is that issue*
likely your unit is missing the [Install]-section at the bottom which is the reason you can't enable it - sorry but i hate it to guess
[Install] WantedBy=multi-user.target _________________________
i simply stripped down the unit to the relevant parts for get rid of mysqld_safe because i don't think that you understand most implications of the full unit i use and don't want a endless thread _________________________
[root@buildserver:~]$ 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=notify KillMode=process KillSignal=SIGTERM SendSIGKILL=no
User=mysql Group=mysql
ExecStart=/usr/libexec/mysqld --defaults-file=/etc/my.cnf --pid-file=/dev/null Environment="LANG=en_GB.UTF-8" Restart=always RestartSec=1 TimeoutSec=300 LimitNOFILE=infinity LimitMEMLOCK=infinity OOMScoreAdjust=-1000 TasksMax=2048
AmbientCapabilities=CAP_IPC_LOCK CAP_SYS_NICE CapabilityBoundingSet=CAP_IPC_LOCK CAP_SYS_NICE MemoryDenyWriteExecute=yes NoNewPrivileges=yes PrivateDevices=yes PrivateTmp=yes ProtectControlGroups=yes ProtectKernelModules=yes ProtectKernelTunables=yes RestrictAddressFamilies=AF_UNIX AF_LOCAL AF_INET AF_INET6 SystemCallArchitectures=x86-64 SystemCallFilter=~@clock @cpu-emulation @debug @keyring @module @mount @obsolete @raw-io @reboot @swap acct modify_ldt add_key adjtimex clock_adjtime delete_module fanotify_init finit_module get_mempolicy init_module kcmp kexec_load keyctl lookup_dcookie mbind mount open_by_handle_at perf_event_open pivot_root process_vm_readv process_vm_writev ptrace request_key set_mempolicy swapoff swapon umount2 uselib vmsplice
ReadOnlyDirectories=/etc ReadOnlyDirectories=/usr ReadOnlyDirectories=/var/lib ReadWriteDirectories=/var/lib/mysql
InaccessibleDirectories=-/boot InaccessibleDirectories=-/home InaccessibleDirectories=-/root InaccessibleDirectories=-/media InaccessibleDirectories=-/etc/httpd InaccessibleDirectories=-/etc/postfix InaccessibleDirectories=-/etc/ssh InaccessibleDirectories=-/usr/local/scripts InaccessibleDirectories=-/var/lib/dbus InaccessibleDirectories=-/var/lib/dnf InaccessibleDirectories=-/var/lib/rpm InaccessibleDirectories=-/var/lib/systemd 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
Am 15.05.2018 um 17:53 schrieb Muhammad Bashir Al-Noimi:
On 05/15/2018 01:34 PM, Reindl Harald wrote:
Am 15.05.2018 um 12:22 schrieb Muhammad Bashir Al-Noimi:
On 05/15/2018 01:12 PM, Reindl Harald wrote:
so it works and " error: 'Access denied for user 'root'@'localhost' (using password: YES)'" is what it is
are you aware that 'root' on unix-socket (localhost) is not the same than 'root' over TCP (127.0.0.1) beause you have a host column?
also make sure you did run 'mysql_upgrade' and if nothing else helps google for "mysql skip grant" but be aware that this allows *any* user with *any* password until removed from the config, but so you can bypass logins and fix things properly Worked but still important issue with systemctl. I wonder what's wrong with mariadb.service https://gist.github.com/mbnoimi/5920301ff79dcb88aab3ef7fa459733e can you please stop posting links left and right?
* that's all plaintext * post it deirectly * look in the errorlog * post systemctl outputs (also for systemctl status)
*what is that issue*
likely your unit is missing the [Install]-section at the bottom which is the reason you can't enable it - sorry but i hate it to guess
[Install] WantedBy=multi-user.target _________________________
i simply stripped down the unit to the relevant parts for get rid of mysqld_safe because i don't think that you understand most implications of the full unit i use and don't want a endless thread What a stupid arrogance person. I couldn't even complete reading your responses ass whole!!!
[Install] is a *default* section of *every* unit - i showed you how to get rid of mysqld_safe and it has nothing to do with arrogance when i don't show you a ton of over many years tested security/namespace settings and hence stop the unit file before it because it just makes it harder to debug until your daemon is running basically ARROGANCE IS "Worked but still important issue with systemctl. I wonder what's wrong with mariadb.service" when you fool don't describe said problem - and no, nobody won't copy your unit 1:1 on his machine
Am 15.05.2018 um 18:06 schrieb Reindl Harald:
Am 15.05.2018 um 17:53 schrieb Muhammad Bashir Al-Noimi:
On 05/15/2018 01:34 PM, Reindl Harald wrote:
* that's all plaintext * post it deirectly * look in the errorlog * post systemctl outputs (also for systemctl status)
*what is that issue*
likely your unit is missing the [Install]-section at the bottom which is the reason you can't enable it - sorry but i hate it to guess
[Install] WantedBy=multi-user.target _________________________
i simply stripped down the unit to the relevant parts for get rid of mysqld_safe because i don't think that you understand most implications of the full unit i use and don't want a endless thread What a stupid arrogance person. I couldn't even complete reading your responses ass whole!!!
[Install] is a *default* section of *every* unit - i showed you how to get rid of mysqld_safe
and it has nothing to do with arrogance when i don't show you a ton of over many years tested security/namespace settings and hence stop the unit file before it because it just makes it harder to debug until your daemon is running basically
ARROGANCE IS "Worked but still important issue with systemctl. I wonder what's wrong with mariadb.service" when you fool don't describe said problem - and no, nobody won't copy your unit 1:1 on his machine
and to make it clear: somebody who repspondes with errors that "ExecStart=/etc/init.d/mariadb start" failed after get a native unit with a proper ExecStart-line pointing to the mysqld-binary is *really* not expected to understand advanced unit-options - this is not arrogance, this is common sense
participants (4)
-
Erik Cederstrand
-
Kenneth Penza
-
Muhammad Bashir Al-Noimi
-
Reindl Harald