Problems with MySQL after moving data directory previously workedMove mysql data dir to TrueCrypt volumeCan't start MySQL server if the .sock file is changed in /etc/mysql/my.cnfHow to to use one instance of mysql database in a dual boot setupHaving problems with MySqlMySQL not working after upgrade from 14.04 to 16.04MySQL ignores any my.cnf configurationsmysql8 won't startMySQL hogging memoryWhy does Akonadi not start after upgrade from Ubuntu 19.04 to 19.10?

Does a buffer overflow vulnerability always mean a code execution vulnerability?

How should "murciélago" be pronounced?

Students requesting to switch partners mid term

Which device is violating the 802.11n Wi-Fi standard?

Are these pigtails inside the panel and outside a junction box allowed?

Is there any possible way to automatically update the locators when developer changes the locators

Extract subsequence corresponding to n:th pattern from a file

Why is this negated with nicht and not kein?

Is it possible to trap yourself in the Nether?

Set and extract individual bytes of a number (lowByte() and highByte())

What is this book about Satan having to run the world

Pay everything now or gradually?

Remove lines with repeated first field/column from a large file: answers from previous posts don't work

how to write a condition for all elements of a list

C++ namespace collision in copy constructor

My passport's Machine Readable Zone is damaged. How do I deal with it?

Is economics a science?

Is it possible to write Quake's fast InvSqrt() function in Rust?

Dropping "to be" and other verbs in Latin?

Magento 2 - Get product image url in API

Why are old computers so vulnerable to temperature changes and moisture?

Finding a solution to a linear program with a small number of zeros

Intuitive explanation for the smile in FX

If the second hand goes backwards, starting from 12:00, how long does it take to meet with the minute hand?



Problems with MySQL after moving data directory previously worked


Move mysql data dir to TrueCrypt volumeCan't start MySQL server if the .sock file is changed in /etc/mysql/my.cnfHow to to use one instance of mysql database in a dual boot setupHaving problems with MySqlMySQL not working after upgrade from 14.04 to 16.04MySQL ignores any my.cnf configurationsmysql8 won't startMySQL hogging memoryWhy does Akonadi not start after upgrade from Ubuntu 19.04 to 19.10?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









0


















I'm using Ubuntu 18.04 LTS 64-bit and I'm really been struggling with this - can anyone tell me where I'm going wrong?



I've had my MySQL files on a separate big disk for ages but the said big disk died suddenly. So I put a new disk in new and gleaming 3TB of it. For complicated reasons to do with a company whose name reminds you of a big South American river I actually ended up with 2 3TB disks.



I had to reinstall the server as all the copies of my data directory had got clobbered. I did have backups of my databases, don't worry.



However after reinstalling the server and changing the apparmor file and the data files directory as described in various places as I had before, mysql won't start.



If I try "sudo /usr/sbin/mysqld" it says:



2019-09-20T09:35:09.083922Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.27) starting as process 16284 ... 2019-09-20T09:35:09.085612Z 0 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!



If I try setting it back everything is fine. But the /var/lib/mysql filesystem isn't big enough.



I've tried keeping the mysql config the same and doing a symlink from /var/lib/mysql to /bigdisk/mysql that still fails. All the permissions seem right



Please help because I've just had 2 big disks put in and I can't use them!



I noticed that I now seem to be dealing with MySQL "community server" does that mean anything?



Thanks










share|improve this question






















  • 1





    Which LTS release of Ubuntu are you talking about?

    – guiverc
    Sep 20 at 12:00











  • Sorry 18.04 don't know how that got wiped

    – John Collins
    Sep 20 at 12:23











  • You shouldn't run MySQL as root; it should run as its own user (mysql) which you accomplish by starting it with sudo systemctl start mysql. The symlink solution is in your case probably the best; what message do you get if you try it that way? Finally: the "community server" is indeed what you need.

    – Jos
    Sep 20 at 13:28











  • I tried that and it still failed on startup. No particular explanation but "dmesg" has as final line :[29884.356109] audit: type=1400 audit(1568993017.872:998): apparmor="DENIED" operation="capable" profile="/usr/sbin/mysqld" pid=23472 comm="mysqld" capability=2 capname="dac_read_search" [29884.379316] audit: type=1400 audit(1568993017.896:999): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/node/" pid=23474 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=121 ouid=0

    – John Collins
    Sep 20 at 15:28


















0


















I'm using Ubuntu 18.04 LTS 64-bit and I'm really been struggling with this - can anyone tell me where I'm going wrong?



I've had my MySQL files on a separate big disk for ages but the said big disk died suddenly. So I put a new disk in new and gleaming 3TB of it. For complicated reasons to do with a company whose name reminds you of a big South American river I actually ended up with 2 3TB disks.



I had to reinstall the server as all the copies of my data directory had got clobbered. I did have backups of my databases, don't worry.



However after reinstalling the server and changing the apparmor file and the data files directory as described in various places as I had before, mysql won't start.



If I try "sudo /usr/sbin/mysqld" it says:



2019-09-20T09:35:09.083922Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.27) starting as process 16284 ... 2019-09-20T09:35:09.085612Z 0 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!



If I try setting it back everything is fine. But the /var/lib/mysql filesystem isn't big enough.



I've tried keeping the mysql config the same and doing a symlink from /var/lib/mysql to /bigdisk/mysql that still fails. All the permissions seem right



Please help because I've just had 2 big disks put in and I can't use them!



I noticed that I now seem to be dealing with MySQL "community server" does that mean anything?



Thanks










share|improve this question






















  • 1





    Which LTS release of Ubuntu are you talking about?

    – guiverc
    Sep 20 at 12:00











  • Sorry 18.04 don't know how that got wiped

    – John Collins
    Sep 20 at 12:23











  • You shouldn't run MySQL as root; it should run as its own user (mysql) which you accomplish by starting it with sudo systemctl start mysql. The symlink solution is in your case probably the best; what message do you get if you try it that way? Finally: the "community server" is indeed what you need.

    – Jos
    Sep 20 at 13:28











  • I tried that and it still failed on startup. No particular explanation but "dmesg" has as final line :[29884.356109] audit: type=1400 audit(1568993017.872:998): apparmor="DENIED" operation="capable" profile="/usr/sbin/mysqld" pid=23472 comm="mysqld" capability=2 capname="dac_read_search" [29884.379316] audit: type=1400 audit(1568993017.896:999): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/node/" pid=23474 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=121 ouid=0

    – John Collins
    Sep 20 at 15:28














0













0









0








I'm using Ubuntu 18.04 LTS 64-bit and I'm really been struggling with this - can anyone tell me where I'm going wrong?



I've had my MySQL files on a separate big disk for ages but the said big disk died suddenly. So I put a new disk in new and gleaming 3TB of it. For complicated reasons to do with a company whose name reminds you of a big South American river I actually ended up with 2 3TB disks.



I had to reinstall the server as all the copies of my data directory had got clobbered. I did have backups of my databases, don't worry.



However after reinstalling the server and changing the apparmor file and the data files directory as described in various places as I had before, mysql won't start.



If I try "sudo /usr/sbin/mysqld" it says:



2019-09-20T09:35:09.083922Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.27) starting as process 16284 ... 2019-09-20T09:35:09.085612Z 0 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!



If I try setting it back everything is fine. But the /var/lib/mysql filesystem isn't big enough.



I've tried keeping the mysql config the same and doing a symlink from /var/lib/mysql to /bigdisk/mysql that still fails. All the permissions seem right



Please help because I've just had 2 big disks put in and I can't use them!



I noticed that I now seem to be dealing with MySQL "community server" does that mean anything?



Thanks










share|improve this question
















I'm using Ubuntu 18.04 LTS 64-bit and I'm really been struggling with this - can anyone tell me where I'm going wrong?



I've had my MySQL files on a separate big disk for ages but the said big disk died suddenly. So I put a new disk in new and gleaming 3TB of it. For complicated reasons to do with a company whose name reminds you of a big South American river I actually ended up with 2 3TB disks.



I had to reinstall the server as all the copies of my data directory had got clobbered. I did have backups of my databases, don't worry.



However after reinstalling the server and changing the apparmor file and the data files directory as described in various places as I had before, mysql won't start.



If I try "sudo /usr/sbin/mysqld" it says:



2019-09-20T09:35:09.083922Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.27) starting as process 16284 ... 2019-09-20T09:35:09.085612Z 0 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!



If I try setting it back everything is fine. But the /var/lib/mysql filesystem isn't big enough.



I've tried keeping the mysql config the same and doing a symlink from /var/lib/mysql to /bigdisk/mysql that still fails. All the permissions seem right



Please help because I've just had 2 big disks put in and I can't use them!



I noticed that I now seem to be dealing with MySQL "community server" does that mean anything?



Thanks







mysql






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Sep 20 at 12:24







John Collins

















asked Sep 20 at 11:49









John CollinsJohn Collins

11 bronze badge




11 bronze badge










  • 1





    Which LTS release of Ubuntu are you talking about?

    – guiverc
    Sep 20 at 12:00











  • Sorry 18.04 don't know how that got wiped

    – John Collins
    Sep 20 at 12:23











  • You shouldn't run MySQL as root; it should run as its own user (mysql) which you accomplish by starting it with sudo systemctl start mysql. The symlink solution is in your case probably the best; what message do you get if you try it that way? Finally: the "community server" is indeed what you need.

    – Jos
    Sep 20 at 13:28











  • I tried that and it still failed on startup. No particular explanation but "dmesg" has as final line :[29884.356109] audit: type=1400 audit(1568993017.872:998): apparmor="DENIED" operation="capable" profile="/usr/sbin/mysqld" pid=23472 comm="mysqld" capability=2 capname="dac_read_search" [29884.379316] audit: type=1400 audit(1568993017.896:999): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/node/" pid=23474 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=121 ouid=0

    – John Collins
    Sep 20 at 15:28













  • 1





    Which LTS release of Ubuntu are you talking about?

    – guiverc
    Sep 20 at 12:00











  • Sorry 18.04 don't know how that got wiped

    – John Collins
    Sep 20 at 12:23











  • You shouldn't run MySQL as root; it should run as its own user (mysql) which you accomplish by starting it with sudo systemctl start mysql. The symlink solution is in your case probably the best; what message do you get if you try it that way? Finally: the "community server" is indeed what you need.

    – Jos
    Sep 20 at 13:28











  • I tried that and it still failed on startup. No particular explanation but "dmesg" has as final line :[29884.356109] audit: type=1400 audit(1568993017.872:998): apparmor="DENIED" operation="capable" profile="/usr/sbin/mysqld" pid=23472 comm="mysqld" capability=2 capname="dac_read_search" [29884.379316] audit: type=1400 audit(1568993017.896:999): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/node/" pid=23474 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=121 ouid=0

    – John Collins
    Sep 20 at 15:28








1




1





Which LTS release of Ubuntu are you talking about?

– guiverc
Sep 20 at 12:00





Which LTS release of Ubuntu are you talking about?

– guiverc
Sep 20 at 12:00













Sorry 18.04 don't know how that got wiped

– John Collins
Sep 20 at 12:23





Sorry 18.04 don't know how that got wiped

– John Collins
Sep 20 at 12:23













You shouldn't run MySQL as root; it should run as its own user (mysql) which you accomplish by starting it with sudo systemctl start mysql. The symlink solution is in your case probably the best; what message do you get if you try it that way? Finally: the "community server" is indeed what you need.

– Jos
Sep 20 at 13:28





You shouldn't run MySQL as root; it should run as its own user (mysql) which you accomplish by starting it with sudo systemctl start mysql. The symlink solution is in your case probably the best; what message do you get if you try it that way? Finally: the "community server" is indeed what you need.

– Jos
Sep 20 at 13:28













I tried that and it still failed on startup. No particular explanation but "dmesg" has as final line :[29884.356109] audit: type=1400 audit(1568993017.872:998): apparmor="DENIED" operation="capable" profile="/usr/sbin/mysqld" pid=23472 comm="mysqld" capability=2 capname="dac_read_search" [29884.379316] audit: type=1400 audit(1568993017.896:999): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/node/" pid=23474 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=121 ouid=0

– John Collins
Sep 20 at 15:28






I tried that and it still failed on startup. No particular explanation but "dmesg" has as final line :[29884.356109] audit: type=1400 audit(1568993017.872:998): apparmor="DENIED" operation="capable" profile="/usr/sbin/mysqld" pid=23472 comm="mysqld" capability=2 capname="dac_read_search" [29884.379316] audit: type=1400 audit(1568993017.896:999): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/node/" pid=23474 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=121 ouid=0

– John Collins
Sep 20 at 15:28











1 Answer
1






active

oldest

votes


















0



















Apologies after all that wrestling the solution was very simple.



When I formatted the disks (from the "disks" gui it helpfull created the root directory owned by me (so I could see things in it as well as root but no one else) and with permissions 700.



Makde that 755 owned by root and all was sweetness and light.



Typically I discovered that doing something else (trying to get Virtualbox to work).



So sorry for annoying everyone.






share|improve this answer


























    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "89"
    ;
    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/4.0/"u003ecc by-sa 4.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%2faskubuntu.com%2fquestions%2f1175469%2fproblems-with-mysql-after-moving-data-directory-previously-worked%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



















    Apologies after all that wrestling the solution was very simple.



    When I formatted the disks (from the "disks" gui it helpfull created the root directory owned by me (so I could see things in it as well as root but no one else) and with permissions 700.



    Makde that 755 owned by root and all was sweetness and light.



    Typically I discovered that doing something else (trying to get Virtualbox to work).



    So sorry for annoying everyone.






    share|improve this answer





























      0



















      Apologies after all that wrestling the solution was very simple.



      When I formatted the disks (from the "disks" gui it helpfull created the root directory owned by me (so I could see things in it as well as root but no one else) and with permissions 700.



      Makde that 755 owned by root and all was sweetness and light.



      Typically I discovered that doing something else (trying to get Virtualbox to work).



      So sorry for annoying everyone.






      share|improve this answer



























        0















        0











        0









        Apologies after all that wrestling the solution was very simple.



        When I formatted the disks (from the "disks" gui it helpfull created the root directory owned by me (so I could see things in it as well as root but no one else) and with permissions 700.



        Makde that 755 owned by root and all was sweetness and light.



        Typically I discovered that doing something else (trying to get Virtualbox to work).



        So sorry for annoying everyone.






        share|improve this answer














        Apologies after all that wrestling the solution was very simple.



        When I formatted the disks (from the "disks" gui it helpfull created the root directory owned by me (so I could see things in it as well as root but no one else) and with permissions 700.



        Makde that 755 owned by root and all was sweetness and light.



        Typically I discovered that doing something else (trying to get Virtualbox to work).



        So sorry for annoying everyone.







        share|improve this answer













        share|improve this answer




        share|improve this answer










        answered Sep 20 at 21:35









        John CollinsJohn Collins

        11 bronze badge




        11 bronze badge































            draft saved

            draft discarded















































            Thanks for contributing an answer to Ask Ubuntu!


            • 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%2faskubuntu.com%2fquestions%2f1175469%2fproblems-with-mysql-after-moving-data-directory-previously-worked%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

            Distance measures on a map of a game The 2019 Stack Overflow Developer Survey Results Are Inmin distance in a graphShortest distance path on contour plotHow to plot a tilted map?Finding points outside of a diskDelaunay link distanceAnnulus from GeoDisks: drawing a ring on a mapNegative Correlation DistanceFind distance along a path (GPS coordinates)Finding position at given distance in a GeoPathMathematics behind distance estimation using camera

            How to get a smooth, uniform ParametricPlot of a 2D Region?How to plot a complicated Region?How to exclude a region from ParametricPlotHow discretize a region placing vertices on a specific non-uniform gridHow to transform a Plot or a ParametricPlot into a RegionHow can I get a smooth plot of a bounded region?Smooth ParametricPlot3D with RegionFunction?Smooth border of a region ParametricPlotSmooth region boundarySmooth region plot from list of pointsGet minimum y of a certain x in a region

            Genealogie vun de Merowenger Vum Merowech bis zum Chilperich I. | Navigatiounsmenü