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