Why can't set bin log for MariaDB in Debian 9?Failed at step EXEC spawning /usr/libexec/mariadb-prepare-db-dirSuddenly mysql/mariadb won't startTrying to recover MySQL database from a crashed server and I keep getting “mysqldump couldn't execute 'show create table doesn't exist (1146)”Cant add more servers to Galera Cluster --> [ERROR] /usr/sbin/mysqld: unknown option '--.'Galera cluster - cannot start MariaDB (CentOS7)Why won't MariaDB start after upgrade (NO_NEW_PRIVILEGES)MariaDB event scheduler not starting after migrating MySQL to MariaDB. Ignoring config fileexecstop mysql error on stop and restartunable to enable binary logging in mariadb 10Why does my PostgresQL 11 database cluster instantly shutdown after being started via systemctl?

Why was the Ancient One so hesitant to teach Dr. Strange the art of sorcery?

What are the components of a legend (in the sense of a tale, not a figure legend)?

Who was this character from the Tomb of Annihilation adventure before they became a monster?

How can a Lich look like a human without magic?

What does a comma mean inside an 'if' statement?

How do I tell my supervisor that he is choosing poor replacements for me while I am on maternity leave?

Smallest Guaranteed hash collision cycle length

Drawing lines to nearest point

Proof that the inverse image of a single element is a discrete space

How are one-time password generators like Google Authenticator different from having two passwords?

Can the sorting of a list be verified without comparing neighbors?

51% attack - apparently very easy? refering to CZ's "rollback btc chain" - How to make sure such corruptible scenario can never happen so easily?

Reaction of borax with NaOH

Meaning of「〜てみたいと思います」

Anatomically Correct Carnivorous Tree

A curve pass via points at TiKz

Why was Endgame Thanos so different than Infinity War Thanos?

How to slow yourself down (for playing nice with others)

Would an 8% reduction in drag outweigh the weight addition from this custom CFD-tested winglet?

Extrude the faces of a cube symmetrically along XYZ

When a land becomes a creature, is it untapped?

How are Core iX names like Core i5, i7 related to Haswell, Ivy Bridge?

Plastic-on-plastic lubricant that wont leave a residue?

Make all the squares explode



Why can't set bin log for MariaDB in Debian 9?


Failed at step EXEC spawning /usr/libexec/mariadb-prepare-db-dirSuddenly mysql/mariadb won't startTrying to recover MySQL database from a crashed server and I keep getting “mysqldump couldn't execute 'show create table doesn't exist (1146)”Cant add more servers to Galera Cluster --> [ERROR] /usr/sbin/mysqld: unknown option '--.'Galera cluster - cannot start MariaDB (CentOS7)Why won't MariaDB start after upgrade (NO_NEW_PRIVILEGES)MariaDB event scheduler not starting after migrating MySQL to MariaDB. Ignoring config fileexecstop mysql error on stop and restartunable to enable binary logging in mariadb 10Why does my PostgresQL 11 database cluster instantly shutdown after being started via systemctl?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















It is simple to set bin log for mysql in centos,just uncomment the line in /etc/my.cnf.
Before uncomment in my.cnf.



#log_bin = /var/log/mysql/mysql-bin.log


Uncomment it in my.cnf.



log_bin = /var/log/mysql/mysql-bin.log


No /etc/my.cnf in debian9's mariadb.

1.Add log_bin directory in debian9's mysql.cnf.



sudo vim /etc/mysql/conf.d/mysql.cnf
log_bin = /var/log/mysql/mysql-bin.log
sudo touch /var/log/mysql/mysql-bin.log
sudo chown mysql.mysql /var/log/mysql/mysql-bin.log
sudo systemctl restart mysql
sudo systemctl status mysql
● mariadb.service - MariaDB database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset:
Active: active (running) since Thu 2019-05-02 08:16:54 CST; 24s ago


It seems no issue for the setting.



mysql -u root -p
mysql: unknown variable 'log_bin=/var/log/mysql/mysql-bin.log'


2.Add log_bin directory in debian9's 50-server.cnf.



sudo vim /etc/mysql/mariadb.conf.d/50-server.cnf
log_bin = /var/log/mysql/mysql-bin.log


Now to restart mysql.



sudo systemctl restart mysql
Job for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl -xe" for details.


What's happening?



sudo journalctl -xe
--
-- Unit mariadb.service has finished shutting down.
May 02 08:32:26 debian systemd[1]: Starting MariaDB database server...
-- Subject: Unit mariadb.service has begun start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit mariadb.service has begun starting up.
May 02 08:32:27 debian mysqld[3640]: 2019-05-02 8:32:27 140494098832768 [Note]
May 02 08:32:30 debian systemd[1]: mariadb.service: Main process exited, code=ex
May 02 08:32:30 debian systemd[1]: Failed to start MariaDB database server.


How to set bin log for Maradb in debian9?










share|improve this question

















This question had a bounty worth +100
reputation from it_is_a_literature that ended ended at 2019-05-11 06:10:06Z">19 hours ago. Grace period ends in 4 hours


Looking for an answer drawing from credible and/or official sources.
















  • Check if binary logs are enabled or not, to enable or disable do below. SET sql_log_bin = 0; SET sql_log_bin = 1;

    – asktyagi
    May 2 at 5:57











  • The config file contains multiple sections. Make sure you put the log_bin= line in the [mysqld] section.

    – wurtel
    May 2 at 8:01











  • It is under [mysqld] section, i am sure.

    – it_is_a_literature
    May 4 at 6:09











  • I wrote a lengthy answer, explaining that you misplaced the directive in [mysql], then didn't see that you also put it at the right place (50-server.cnf). In my test, everything went fine while in your case it doesn't work. I can only conclude that my answer wasn't useful (so I deleted it), and that there's something else not seen in the question.

    – A.B
    May 4 at 13:13












  • Check MariaDB's own logs for the error that was logged.

    – Michael Hampton
    May 4 at 17:37

















0















It is simple to set bin log for mysql in centos,just uncomment the line in /etc/my.cnf.
Before uncomment in my.cnf.



#log_bin = /var/log/mysql/mysql-bin.log


Uncomment it in my.cnf.



log_bin = /var/log/mysql/mysql-bin.log


No /etc/my.cnf in debian9's mariadb.

1.Add log_bin directory in debian9's mysql.cnf.



sudo vim /etc/mysql/conf.d/mysql.cnf
log_bin = /var/log/mysql/mysql-bin.log
sudo touch /var/log/mysql/mysql-bin.log
sudo chown mysql.mysql /var/log/mysql/mysql-bin.log
sudo systemctl restart mysql
sudo systemctl status mysql
● mariadb.service - MariaDB database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset:
Active: active (running) since Thu 2019-05-02 08:16:54 CST; 24s ago


It seems no issue for the setting.



mysql -u root -p
mysql: unknown variable 'log_bin=/var/log/mysql/mysql-bin.log'


2.Add log_bin directory in debian9's 50-server.cnf.



sudo vim /etc/mysql/mariadb.conf.d/50-server.cnf
log_bin = /var/log/mysql/mysql-bin.log


Now to restart mysql.



sudo systemctl restart mysql
Job for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl -xe" for details.


What's happening?



sudo journalctl -xe
--
-- Unit mariadb.service has finished shutting down.
May 02 08:32:26 debian systemd[1]: Starting MariaDB database server...
-- Subject: Unit mariadb.service has begun start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit mariadb.service has begun starting up.
May 02 08:32:27 debian mysqld[3640]: 2019-05-02 8:32:27 140494098832768 [Note]
May 02 08:32:30 debian systemd[1]: mariadb.service: Main process exited, code=ex
May 02 08:32:30 debian systemd[1]: Failed to start MariaDB database server.


How to set bin log for Maradb in debian9?










share|improve this question

















This question had a bounty worth +100
reputation from it_is_a_literature that ended ended at 2019-05-11 06:10:06Z">19 hours ago. Grace period ends in 4 hours


Looking for an answer drawing from credible and/or official sources.
















  • Check if binary logs are enabled or not, to enable or disable do below. SET sql_log_bin = 0; SET sql_log_bin = 1;

    – asktyagi
    May 2 at 5:57











  • The config file contains multiple sections. Make sure you put the log_bin= line in the [mysqld] section.

    – wurtel
    May 2 at 8:01











  • It is under [mysqld] section, i am sure.

    – it_is_a_literature
    May 4 at 6:09











  • I wrote a lengthy answer, explaining that you misplaced the directive in [mysql], then didn't see that you also put it at the right place (50-server.cnf). In my test, everything went fine while in your case it doesn't work. I can only conclude that my answer wasn't useful (so I deleted it), and that there's something else not seen in the question.

    – A.B
    May 4 at 13:13












  • Check MariaDB's own logs for the error that was logged.

    – Michael Hampton
    May 4 at 17:37













0












0








0


1






It is simple to set bin log for mysql in centos,just uncomment the line in /etc/my.cnf.
Before uncomment in my.cnf.



#log_bin = /var/log/mysql/mysql-bin.log


Uncomment it in my.cnf.



log_bin = /var/log/mysql/mysql-bin.log


No /etc/my.cnf in debian9's mariadb.

1.Add log_bin directory in debian9's mysql.cnf.



sudo vim /etc/mysql/conf.d/mysql.cnf
log_bin = /var/log/mysql/mysql-bin.log
sudo touch /var/log/mysql/mysql-bin.log
sudo chown mysql.mysql /var/log/mysql/mysql-bin.log
sudo systemctl restart mysql
sudo systemctl status mysql
● mariadb.service - MariaDB database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset:
Active: active (running) since Thu 2019-05-02 08:16:54 CST; 24s ago


It seems no issue for the setting.



mysql -u root -p
mysql: unknown variable 'log_bin=/var/log/mysql/mysql-bin.log'


2.Add log_bin directory in debian9's 50-server.cnf.



sudo vim /etc/mysql/mariadb.conf.d/50-server.cnf
log_bin = /var/log/mysql/mysql-bin.log


Now to restart mysql.



sudo systemctl restart mysql
Job for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl -xe" for details.


What's happening?



sudo journalctl -xe
--
-- Unit mariadb.service has finished shutting down.
May 02 08:32:26 debian systemd[1]: Starting MariaDB database server...
-- Subject: Unit mariadb.service has begun start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit mariadb.service has begun starting up.
May 02 08:32:27 debian mysqld[3640]: 2019-05-02 8:32:27 140494098832768 [Note]
May 02 08:32:30 debian systemd[1]: mariadb.service: Main process exited, code=ex
May 02 08:32:30 debian systemd[1]: Failed to start MariaDB database server.


How to set bin log for Maradb in debian9?










share|improve this question
















It is simple to set bin log for mysql in centos,just uncomment the line in /etc/my.cnf.
Before uncomment in my.cnf.



#log_bin = /var/log/mysql/mysql-bin.log


Uncomment it in my.cnf.



log_bin = /var/log/mysql/mysql-bin.log


No /etc/my.cnf in debian9's mariadb.

1.Add log_bin directory in debian9's mysql.cnf.



sudo vim /etc/mysql/conf.d/mysql.cnf
log_bin = /var/log/mysql/mysql-bin.log
sudo touch /var/log/mysql/mysql-bin.log
sudo chown mysql.mysql /var/log/mysql/mysql-bin.log
sudo systemctl restart mysql
sudo systemctl status mysql
● mariadb.service - MariaDB database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset:
Active: active (running) since Thu 2019-05-02 08:16:54 CST; 24s ago


It seems no issue for the setting.



mysql -u root -p
mysql: unknown variable 'log_bin=/var/log/mysql/mysql-bin.log'


2.Add log_bin directory in debian9's 50-server.cnf.



sudo vim /etc/mysql/mariadb.conf.d/50-server.cnf
log_bin = /var/log/mysql/mysql-bin.log


Now to restart mysql.



sudo systemctl restart mysql
Job for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl -xe" for details.


What's happening?



sudo journalctl -xe
--
-- Unit mariadb.service has finished shutting down.
May 02 08:32:26 debian systemd[1]: Starting MariaDB database server...
-- Subject: Unit mariadb.service has begun start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit mariadb.service has begun starting up.
May 02 08:32:27 debian mysqld[3640]: 2019-05-02 8:32:27 140494098832768 [Note]
May 02 08:32:30 debian systemd[1]: mariadb.service: Main process exited, code=ex
May 02 08:32:30 debian systemd[1]: Failed to start MariaDB database server.


How to set bin log for Maradb in debian9?







logging mariadb debian-stretch bin






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 4 at 7:16







it_is_a_literature

















asked May 2 at 0:26









it_is_a_literatureit_is_a_literature

31118




31118






This question had a bounty worth +100
reputation from it_is_a_literature that ended ended at 2019-05-11 06:10:06Z">19 hours ago. Grace period ends in 4 hours


Looking for an answer drawing from credible and/or official sources.








This question had a bounty worth +100
reputation from it_is_a_literature that ended ended at 2019-05-11 06:10:06Z">19 hours ago. Grace period ends in 4 hours


Looking for an answer drawing from credible and/or official sources.














  • Check if binary logs are enabled or not, to enable or disable do below. SET sql_log_bin = 0; SET sql_log_bin = 1;

    – asktyagi
    May 2 at 5:57











  • The config file contains multiple sections. Make sure you put the log_bin= line in the [mysqld] section.

    – wurtel
    May 2 at 8:01











  • It is under [mysqld] section, i am sure.

    – it_is_a_literature
    May 4 at 6:09











  • I wrote a lengthy answer, explaining that you misplaced the directive in [mysql], then didn't see that you also put it at the right place (50-server.cnf). In my test, everything went fine while in your case it doesn't work. I can only conclude that my answer wasn't useful (so I deleted it), and that there's something else not seen in the question.

    – A.B
    May 4 at 13:13












  • Check MariaDB's own logs for the error that was logged.

    – Michael Hampton
    May 4 at 17:37

















  • Check if binary logs are enabled or not, to enable or disable do below. SET sql_log_bin = 0; SET sql_log_bin = 1;

    – asktyagi
    May 2 at 5:57











  • The config file contains multiple sections. Make sure you put the log_bin= line in the [mysqld] section.

    – wurtel
    May 2 at 8:01











  • It is under [mysqld] section, i am sure.

    – it_is_a_literature
    May 4 at 6:09











  • I wrote a lengthy answer, explaining that you misplaced the directive in [mysql], then didn't see that you also put it at the right place (50-server.cnf). In my test, everything went fine while in your case it doesn't work. I can only conclude that my answer wasn't useful (so I deleted it), and that there's something else not seen in the question.

    – A.B
    May 4 at 13:13












  • Check MariaDB's own logs for the error that was logged.

    – Michael Hampton
    May 4 at 17:37
















Check if binary logs are enabled or not, to enable or disable do below. SET sql_log_bin = 0; SET sql_log_bin = 1;

– asktyagi
May 2 at 5:57





Check if binary logs are enabled or not, to enable or disable do below. SET sql_log_bin = 0; SET sql_log_bin = 1;

– asktyagi
May 2 at 5:57













The config file contains multiple sections. Make sure you put the log_bin= line in the [mysqld] section.

– wurtel
May 2 at 8:01





The config file contains multiple sections. Make sure you put the log_bin= line in the [mysqld] section.

– wurtel
May 2 at 8:01













It is under [mysqld] section, i am sure.

– it_is_a_literature
May 4 at 6:09





It is under [mysqld] section, i am sure.

– it_is_a_literature
May 4 at 6:09













I wrote a lengthy answer, explaining that you misplaced the directive in [mysql], then didn't see that you also put it at the right place (50-server.cnf). In my test, everything went fine while in your case it doesn't work. I can only conclude that my answer wasn't useful (so I deleted it), and that there's something else not seen in the question.

– A.B
May 4 at 13:13






I wrote a lengthy answer, explaining that you misplaced the directive in [mysql], then didn't see that you also put it at the right place (50-server.cnf). In my test, everything went fine while in your case it doesn't work. I can only conclude that my answer wasn't useful (so I deleted it), and that there's something else not seen in the question.

– A.B
May 4 at 13:13














Check MariaDB's own logs for the error that was logged.

– Michael Hampton
May 4 at 17:37





Check MariaDB's own logs for the error that was logged.

– Michael Hampton
May 4 at 17:37










1 Answer
1






active

oldest

votes


















0














Test many times on my pc.



sudo apt install mariadb-client mariadb-server can enable bin log,with the same process ,sudo apt install mariadb-server can't enable bin log ,although sudo apt install mariadb-server shall trigger the os install mariadb-client,i don't know why.






share|improve this answer























    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "2"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f965494%2fwhy-cant-set-bin-log-for-mariadb-in-debian-9%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Test many times on my pc.



    sudo apt install mariadb-client mariadb-server can enable bin log,with the same process ,sudo apt install mariadb-server can't enable bin log ,although sudo apt install mariadb-server shall trigger the os install mariadb-client,i don't know why.






    share|improve this answer



























      0














      Test many times on my pc.



      sudo apt install mariadb-client mariadb-server can enable bin log,with the same process ,sudo apt install mariadb-server can't enable bin log ,although sudo apt install mariadb-server shall trigger the os install mariadb-client,i don't know why.






      share|improve this answer

























        0












        0








        0







        Test many times on my pc.



        sudo apt install mariadb-client mariadb-server can enable bin log,with the same process ,sudo apt install mariadb-server can't enable bin log ,although sudo apt install mariadb-server shall trigger the os install mariadb-client,i don't know why.






        share|improve this answer













        Test many times on my pc.



        sudo apt install mariadb-client mariadb-server can enable bin log,with the same process ,sudo apt install mariadb-server can't enable bin log ,although sudo apt install mariadb-server shall trigger the os install mariadb-client,i don't know why.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered May 8 at 10:24









        it_is_a_literatureit_is_a_literature

        31118




        31118



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Server Fault!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f965494%2fwhy-cant-set-bin-log-for-mariadb-in-debian-9%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Wikipedia:Vital articles Мазмуну Biography - Өмүр баян Philosophy and psychology - Философия жана психология Religion - Дин Social sciences - Коомдук илимдер Language and literature - Тил жана адабият Science - Илим Technology - Технология Arts and recreation - Искусство жана эс алуу History and geography - Тарых жана география Навигация менюсу

            Bruxelas-Capital Índice Historia | Composición | Situación lingüística | Clima | Cidades irmandadas | Notas | Véxase tamén | Menú de navegacióneO uso das linguas en Bruxelas e a situación do neerlandés"Rexión de Bruxelas Capital"o orixinalSitio da rexiónPáxina de Bruselas no sitio da Oficina de Promoción Turística de Valonia e BruxelasMapa Interactivo da Rexión de Bruxelas-CapitaleeWorldCat332144929079854441105155190212ID28008674080552-90000 0001 0666 3698n94104302ID540940339365017018237

            What should I write in an apology letter, since I have decided not to join a company after accepting an offer letterShould I keep looking after accepting a job offer?What should I do when I've been verbally told I would get an offer letter, but still haven't gotten one after 4 weeks?Do I accept an offer from a company that I am not likely to join?New job hasn't confirmed starting date and I want to give current employer as much notice as possibleHow should I address my manager in my resignation letter?HR delayed background verification, now jobless as resignedNo email communication after accepting a formal written offer. How should I phrase the call?What should I do if after receiving a verbal offer letter I am informed that my written job offer is put on hold due to some internal issues?Should I inform the current employer that I am about to resign within 1-2 weeks since I have signed the offer letter and waiting for visa?What company will do, if I send their offer letter to another company