Can't start mysql on Ubuntu 18.04.1 LTS. ERROR 2002 (HY000): Can't connect to local MySQL server through...












0















If anyone could lend me some assistance, I'll be very grateful. I'm a novice at back-end, just a humble designer/front end person.



Ok - from the beginning...: I have a desktop Ubuntu 18.04.1 LTS Ubuntu and have been building a local WordPress for a few months. I kept noting I was running out of space on my box, realized it was Flatpak [curse you Flatpak!!!] was adding gigs of space daily for no good reason. So I bit the bullet and removed it.



Of course it killed my WP site. After many torturous hours, I finally reinstalled Apache2 and MySql. I recall changing a password or two along the way, so I think that could be part of the problem...Anyhow, I did get back into my site and immediately backed it up using a plugin [updraftplus] to a remote server. [so at worst I will migrate to a live server but would prefer to make this work again.]



But today, I booted back up and checked my local site and it says 'Error establishing a database connection' on both WP site/login pages. So I checked apache2 - working. Mysql is not.

When I run 'service mysql status' I get this:



mysql.service - MySQL Community Server

Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)

Active: failed (Result: exit-code) since Sat 2019-02-02 12:19:06 EST; 48min ago

Process: 3317 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid (code=exited, status=1/FAILURE)

Process: 3308 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)

Feb 02 12:19:06 kjj-desktop systemd[1]: mysql.service: Service hold-off time over, scheduling restart.

Feb 02 12:19:06 kjj-desktop systemd[1]: mysql.service: Scheduled restart job, restart counter is at 5.

Feb 02 12:19:06 kjj-desktop systemd[1]: Stopped MySQL Community Server.

Feb 02 12:19:06 kjj-desktop systemd[1]: mysql.service: Start request repeated too quickly.

Feb 02 12:19:06 kjj-desktop systemd[1]: mysql.service: Failed with result 'exit-code'.

Feb 02 12:19:06 kjj-desktop systemd[1]: Failed to start MySQL Community Server.


I can't find any log folder/files [Damn you Stacer! It killed the apache2 log and I suspect this too!]
Also, when I check the status of Mysql via this cmd 'mysqladmin -u root -p status', I get this:



mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'

Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!


and this is from the syslog:



Feb  2 20:27:37 kjj-desktop systemd[1]: Starting MySQL Community Server...
Feb 2 20:27:37 kjj-desktop kernel: [10290.580203] audit: type=1400 audit(1549157257.767:141): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/node/" pid=15427 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
Feb 2 20:27:37 kjj-desktop kernel: [10290.608820] audit: type=1400 audit(1549157257.795:142): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/node/" pid=15429 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=124 ouid=0
Feb 2 20:27:37 kjj-desktop mysqld[15429]: 2019-02-03T01:27:37.975231Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
Feb 2 20:27:37 kjj-desktop mysqld[15429]: 2019-02-03T01:27:37.976433Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.25-0ubuntu0.18.04.2) starting as process 15431 ...
Feb 2 20:27:37 kjj-desktop mysqld[15429]: 2019-02-03T01:27:37.978696Z 0 [ERROR] Could not open file '/var/log/mysql/error.log' for error logging: No such file or directory
Feb 2 20:27:37 kjj-desktop mysqld[15429]: 2019-02-03T01:27:37.978727Z 0 [ERROR] Aborting
Feb 2 20:27:37 kjj-desktop mysqld[15429]: 2019-02-03T01:27:37.978771Z 0 [Note] Binlog end
Feb 2 20:27:37 kjj-desktop mysqld[15429]: Initialization of mysqld failed: 0
Feb 2 20:27:37 kjj-desktop mysqld[15429]: 2019-02-03T01:27:37.978842Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
Feb 2 20:27:37 kjj-desktop systemd[1]: mysql.service: Control process exited, code=exited status=1
Feb 2 20:27:37 kjj-desktop systemd[1]: mysql.service: Failed with result 'exit-code'.
Feb 2 20:27:37 kjj-desktop systemd[1]: Failed to start MySQL Community Server.
Feb 2 20:27:38 kjj-desktop systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
Feb 2 20:27:38 kjj-desktop systemd[1]: mysql.service: Scheduled restart job, restart counter is at 4.
Feb 2 20:27:38 kjj-desktop systemd[1]: Stopped MySQL Community Server.


So I am tempted to again remove/purge mysql but I bet this will happen again.



Any kind people out there that can help me?! Oh I hope so...running out of options and patience. I didn't sign up for this :(



Thanks!










share|improve this question





























    0















    If anyone could lend me some assistance, I'll be very grateful. I'm a novice at back-end, just a humble designer/front end person.



    Ok - from the beginning...: I have a desktop Ubuntu 18.04.1 LTS Ubuntu and have been building a local WordPress for a few months. I kept noting I was running out of space on my box, realized it was Flatpak [curse you Flatpak!!!] was adding gigs of space daily for no good reason. So I bit the bullet and removed it.



    Of course it killed my WP site. After many torturous hours, I finally reinstalled Apache2 and MySql. I recall changing a password or two along the way, so I think that could be part of the problem...Anyhow, I did get back into my site and immediately backed it up using a plugin [updraftplus] to a remote server. [so at worst I will migrate to a live server but would prefer to make this work again.]



    But today, I booted back up and checked my local site and it says 'Error establishing a database connection' on both WP site/login pages. So I checked apache2 - working. Mysql is not.

    When I run 'service mysql status' I get this:



    mysql.service - MySQL Community Server

    Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)

    Active: failed (Result: exit-code) since Sat 2019-02-02 12:19:06 EST; 48min ago

    Process: 3317 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid (code=exited, status=1/FAILURE)

    Process: 3308 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)

    Feb 02 12:19:06 kjj-desktop systemd[1]: mysql.service: Service hold-off time over, scheduling restart.

    Feb 02 12:19:06 kjj-desktop systemd[1]: mysql.service: Scheduled restart job, restart counter is at 5.

    Feb 02 12:19:06 kjj-desktop systemd[1]: Stopped MySQL Community Server.

    Feb 02 12:19:06 kjj-desktop systemd[1]: mysql.service: Start request repeated too quickly.

    Feb 02 12:19:06 kjj-desktop systemd[1]: mysql.service: Failed with result 'exit-code'.

    Feb 02 12:19:06 kjj-desktop systemd[1]: Failed to start MySQL Community Server.


    I can't find any log folder/files [Damn you Stacer! It killed the apache2 log and I suspect this too!]
    Also, when I check the status of Mysql via this cmd 'mysqladmin -u root -p status', I get this:



    mysqladmin: connect to server at 'localhost' failed
    error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'

    Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!


    and this is from the syslog:



    Feb  2 20:27:37 kjj-desktop systemd[1]: Starting MySQL Community Server...
    Feb 2 20:27:37 kjj-desktop kernel: [10290.580203] audit: type=1400 audit(1549157257.767:141): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/node/" pid=15427 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
    Feb 2 20:27:37 kjj-desktop kernel: [10290.608820] audit: type=1400 audit(1549157257.795:142): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/node/" pid=15429 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=124 ouid=0
    Feb 2 20:27:37 kjj-desktop mysqld[15429]: 2019-02-03T01:27:37.975231Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
    Feb 2 20:27:37 kjj-desktop mysqld[15429]: 2019-02-03T01:27:37.976433Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.25-0ubuntu0.18.04.2) starting as process 15431 ...
    Feb 2 20:27:37 kjj-desktop mysqld[15429]: 2019-02-03T01:27:37.978696Z 0 [ERROR] Could not open file '/var/log/mysql/error.log' for error logging: No such file or directory
    Feb 2 20:27:37 kjj-desktop mysqld[15429]: 2019-02-03T01:27:37.978727Z 0 [ERROR] Aborting
    Feb 2 20:27:37 kjj-desktop mysqld[15429]: 2019-02-03T01:27:37.978771Z 0 [Note] Binlog end
    Feb 2 20:27:37 kjj-desktop mysqld[15429]: Initialization of mysqld failed: 0
    Feb 2 20:27:37 kjj-desktop mysqld[15429]: 2019-02-03T01:27:37.978842Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
    Feb 2 20:27:37 kjj-desktop systemd[1]: mysql.service: Control process exited, code=exited status=1
    Feb 2 20:27:37 kjj-desktop systemd[1]: mysql.service: Failed with result 'exit-code'.
    Feb 2 20:27:37 kjj-desktop systemd[1]: Failed to start MySQL Community Server.
    Feb 2 20:27:38 kjj-desktop systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
    Feb 2 20:27:38 kjj-desktop systemd[1]: mysql.service: Scheduled restart job, restart counter is at 4.
    Feb 2 20:27:38 kjj-desktop systemd[1]: Stopped MySQL Community Server.


    So I am tempted to again remove/purge mysql but I bet this will happen again.



    Any kind people out there that can help me?! Oh I hope so...running out of options and patience. I didn't sign up for this :(



    Thanks!










    share|improve this question



























      0












      0








      0








      If anyone could lend me some assistance, I'll be very grateful. I'm a novice at back-end, just a humble designer/front end person.



      Ok - from the beginning...: I have a desktop Ubuntu 18.04.1 LTS Ubuntu and have been building a local WordPress for a few months. I kept noting I was running out of space on my box, realized it was Flatpak [curse you Flatpak!!!] was adding gigs of space daily for no good reason. So I bit the bullet and removed it.



      Of course it killed my WP site. After many torturous hours, I finally reinstalled Apache2 and MySql. I recall changing a password or two along the way, so I think that could be part of the problem...Anyhow, I did get back into my site and immediately backed it up using a plugin [updraftplus] to a remote server. [so at worst I will migrate to a live server but would prefer to make this work again.]



      But today, I booted back up and checked my local site and it says 'Error establishing a database connection' on both WP site/login pages. So I checked apache2 - working. Mysql is not.

      When I run 'service mysql status' I get this:



      mysql.service - MySQL Community Server

      Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)

      Active: failed (Result: exit-code) since Sat 2019-02-02 12:19:06 EST; 48min ago

      Process: 3317 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid (code=exited, status=1/FAILURE)

      Process: 3308 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)

      Feb 02 12:19:06 kjj-desktop systemd[1]: mysql.service: Service hold-off time over, scheduling restart.

      Feb 02 12:19:06 kjj-desktop systemd[1]: mysql.service: Scheduled restart job, restart counter is at 5.

      Feb 02 12:19:06 kjj-desktop systemd[1]: Stopped MySQL Community Server.

      Feb 02 12:19:06 kjj-desktop systemd[1]: mysql.service: Start request repeated too quickly.

      Feb 02 12:19:06 kjj-desktop systemd[1]: mysql.service: Failed with result 'exit-code'.

      Feb 02 12:19:06 kjj-desktop systemd[1]: Failed to start MySQL Community Server.


      I can't find any log folder/files [Damn you Stacer! It killed the apache2 log and I suspect this too!]
      Also, when I check the status of Mysql via this cmd 'mysqladmin -u root -p status', I get this:



      mysqladmin: connect to server at 'localhost' failed
      error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'

      Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!


      and this is from the syslog:



      Feb  2 20:27:37 kjj-desktop systemd[1]: Starting MySQL Community Server...
      Feb 2 20:27:37 kjj-desktop kernel: [10290.580203] audit: type=1400 audit(1549157257.767:141): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/node/" pid=15427 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
      Feb 2 20:27:37 kjj-desktop kernel: [10290.608820] audit: type=1400 audit(1549157257.795:142): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/node/" pid=15429 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=124 ouid=0
      Feb 2 20:27:37 kjj-desktop mysqld[15429]: 2019-02-03T01:27:37.975231Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
      Feb 2 20:27:37 kjj-desktop mysqld[15429]: 2019-02-03T01:27:37.976433Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.25-0ubuntu0.18.04.2) starting as process 15431 ...
      Feb 2 20:27:37 kjj-desktop mysqld[15429]: 2019-02-03T01:27:37.978696Z 0 [ERROR] Could not open file '/var/log/mysql/error.log' for error logging: No such file or directory
      Feb 2 20:27:37 kjj-desktop mysqld[15429]: 2019-02-03T01:27:37.978727Z 0 [ERROR] Aborting
      Feb 2 20:27:37 kjj-desktop mysqld[15429]: 2019-02-03T01:27:37.978771Z 0 [Note] Binlog end
      Feb 2 20:27:37 kjj-desktop mysqld[15429]: Initialization of mysqld failed: 0
      Feb 2 20:27:37 kjj-desktop mysqld[15429]: 2019-02-03T01:27:37.978842Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
      Feb 2 20:27:37 kjj-desktop systemd[1]: mysql.service: Control process exited, code=exited status=1
      Feb 2 20:27:37 kjj-desktop systemd[1]: mysql.service: Failed with result 'exit-code'.
      Feb 2 20:27:37 kjj-desktop systemd[1]: Failed to start MySQL Community Server.
      Feb 2 20:27:38 kjj-desktop systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
      Feb 2 20:27:38 kjj-desktop systemd[1]: mysql.service: Scheduled restart job, restart counter is at 4.
      Feb 2 20:27:38 kjj-desktop systemd[1]: Stopped MySQL Community Server.


      So I am tempted to again remove/purge mysql but I bet this will happen again.



      Any kind people out there that can help me?! Oh I hope so...running out of options and patience. I didn't sign up for this :(



      Thanks!










      share|improve this question
















      If anyone could lend me some assistance, I'll be very grateful. I'm a novice at back-end, just a humble designer/front end person.



      Ok - from the beginning...: I have a desktop Ubuntu 18.04.1 LTS Ubuntu and have been building a local WordPress for a few months. I kept noting I was running out of space on my box, realized it was Flatpak [curse you Flatpak!!!] was adding gigs of space daily for no good reason. So I bit the bullet and removed it.



      Of course it killed my WP site. After many torturous hours, I finally reinstalled Apache2 and MySql. I recall changing a password or two along the way, so I think that could be part of the problem...Anyhow, I did get back into my site and immediately backed it up using a plugin [updraftplus] to a remote server. [so at worst I will migrate to a live server but would prefer to make this work again.]



      But today, I booted back up and checked my local site and it says 'Error establishing a database connection' on both WP site/login pages. So I checked apache2 - working. Mysql is not.

      When I run 'service mysql status' I get this:



      mysql.service - MySQL Community Server

      Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)

      Active: failed (Result: exit-code) since Sat 2019-02-02 12:19:06 EST; 48min ago

      Process: 3317 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid (code=exited, status=1/FAILURE)

      Process: 3308 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)

      Feb 02 12:19:06 kjj-desktop systemd[1]: mysql.service: Service hold-off time over, scheduling restart.

      Feb 02 12:19:06 kjj-desktop systemd[1]: mysql.service: Scheduled restart job, restart counter is at 5.

      Feb 02 12:19:06 kjj-desktop systemd[1]: Stopped MySQL Community Server.

      Feb 02 12:19:06 kjj-desktop systemd[1]: mysql.service: Start request repeated too quickly.

      Feb 02 12:19:06 kjj-desktop systemd[1]: mysql.service: Failed with result 'exit-code'.

      Feb 02 12:19:06 kjj-desktop systemd[1]: Failed to start MySQL Community Server.


      I can't find any log folder/files [Damn you Stacer! It killed the apache2 log and I suspect this too!]
      Also, when I check the status of Mysql via this cmd 'mysqladmin -u root -p status', I get this:



      mysqladmin: connect to server at 'localhost' failed
      error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'

      Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!


      and this is from the syslog:



      Feb  2 20:27:37 kjj-desktop systemd[1]: Starting MySQL Community Server...
      Feb 2 20:27:37 kjj-desktop kernel: [10290.580203] audit: type=1400 audit(1549157257.767:141): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/node/" pid=15427 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
      Feb 2 20:27:37 kjj-desktop kernel: [10290.608820] audit: type=1400 audit(1549157257.795:142): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/node/" pid=15429 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=124 ouid=0
      Feb 2 20:27:37 kjj-desktop mysqld[15429]: 2019-02-03T01:27:37.975231Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
      Feb 2 20:27:37 kjj-desktop mysqld[15429]: 2019-02-03T01:27:37.976433Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.25-0ubuntu0.18.04.2) starting as process 15431 ...
      Feb 2 20:27:37 kjj-desktop mysqld[15429]: 2019-02-03T01:27:37.978696Z 0 [ERROR] Could not open file '/var/log/mysql/error.log' for error logging: No such file or directory
      Feb 2 20:27:37 kjj-desktop mysqld[15429]: 2019-02-03T01:27:37.978727Z 0 [ERROR] Aborting
      Feb 2 20:27:37 kjj-desktop mysqld[15429]: 2019-02-03T01:27:37.978771Z 0 [Note] Binlog end
      Feb 2 20:27:37 kjj-desktop mysqld[15429]: Initialization of mysqld failed: 0
      Feb 2 20:27:37 kjj-desktop mysqld[15429]: 2019-02-03T01:27:37.978842Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
      Feb 2 20:27:37 kjj-desktop systemd[1]: mysql.service: Control process exited, code=exited status=1
      Feb 2 20:27:37 kjj-desktop systemd[1]: mysql.service: Failed with result 'exit-code'.
      Feb 2 20:27:37 kjj-desktop systemd[1]: Failed to start MySQL Community Server.
      Feb 2 20:27:38 kjj-desktop systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
      Feb 2 20:27:38 kjj-desktop systemd[1]: mysql.service: Scheduled restart job, restart counter is at 4.
      Feb 2 20:27:38 kjj-desktop systemd[1]: Stopped MySQL Community Server.


      So I am tempted to again remove/purge mysql but I bet this will happen again.



      Any kind people out there that can help me?! Oh I hope so...running out of options and patience. I didn't sign up for this :(



      Thanks!







      18.04 apache2 mysql wordpress






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Feb 3 at 1:49







      Kyle John Jacobson

















      asked Feb 2 at 20:03









      Kyle John JacobsonKyle John Jacobson

      112




      112






















          2 Answers
          2






          active

          oldest

          votes


















          1














          Thanks Cristian! Actually, I solved it myself. The problem was the app Stacer deleted the error.log file. I had to mkdir, create it and change the permissions.



          I got the info here How to enable MySQL logging? but had to update the file names to make it compatible with 5.7 or whatever current mysql is installed.



          So thanks again. Problem solved. Back to work.
          Cheers!
          Kyle






          share|improve this answer































            0














            This error occurs due to multiple installations of mysql. Run the command:



            ps -A|grep mysql


            Kill the process by using:



            sudo pkill mysql


            and then run command:



            ps -A|grep mysqld


            Also Kill this process by running:



            sudo pkill mysqld


            Now you are fully set just run the following commands:



            service mysql restart
            mysql -u root -p





            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/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%2faskubuntu.com%2fquestions%2f1115080%2fcant-start-mysql-on-ubuntu-18-04-1-lts-error-2002-hy000-cant-connect-to-lo%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              1














              Thanks Cristian! Actually, I solved it myself. The problem was the app Stacer deleted the error.log file. I had to mkdir, create it and change the permissions.



              I got the info here How to enable MySQL logging? but had to update the file names to make it compatible with 5.7 or whatever current mysql is installed.



              So thanks again. Problem solved. Back to work.
              Cheers!
              Kyle






              share|improve this answer




























                1














                Thanks Cristian! Actually, I solved it myself. The problem was the app Stacer deleted the error.log file. I had to mkdir, create it and change the permissions.



                I got the info here How to enable MySQL logging? but had to update the file names to make it compatible with 5.7 or whatever current mysql is installed.



                So thanks again. Problem solved. Back to work.
                Cheers!
                Kyle






                share|improve this answer


























                  1












                  1








                  1







                  Thanks Cristian! Actually, I solved it myself. The problem was the app Stacer deleted the error.log file. I had to mkdir, create it and change the permissions.



                  I got the info here How to enable MySQL logging? but had to update the file names to make it compatible with 5.7 or whatever current mysql is installed.



                  So thanks again. Problem solved. Back to work.
                  Cheers!
                  Kyle






                  share|improve this answer













                  Thanks Cristian! Actually, I solved it myself. The problem was the app Stacer deleted the error.log file. I had to mkdir, create it and change the permissions.



                  I got the info here How to enable MySQL logging? but had to update the file names to make it compatible with 5.7 or whatever current mysql is installed.



                  So thanks again. Problem solved. Back to work.
                  Cheers!
                  Kyle







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Feb 3 at 2:25









                  Kyle John JacobsonKyle John Jacobson

                  112




                  112

























                      0














                      This error occurs due to multiple installations of mysql. Run the command:



                      ps -A|grep mysql


                      Kill the process by using:



                      sudo pkill mysql


                      and then run command:



                      ps -A|grep mysqld


                      Also Kill this process by running:



                      sudo pkill mysqld


                      Now you are fully set just run the following commands:



                      service mysql restart
                      mysql -u root -p





                      share|improve this answer




























                        0














                        This error occurs due to multiple installations of mysql. Run the command:



                        ps -A|grep mysql


                        Kill the process by using:



                        sudo pkill mysql


                        and then run command:



                        ps -A|grep mysqld


                        Also Kill this process by running:



                        sudo pkill mysqld


                        Now you are fully set just run the following commands:



                        service mysql restart
                        mysql -u root -p





                        share|improve this answer


























                          0












                          0








                          0







                          This error occurs due to multiple installations of mysql. Run the command:



                          ps -A|grep mysql


                          Kill the process by using:



                          sudo pkill mysql


                          and then run command:



                          ps -A|grep mysqld


                          Also Kill this process by running:



                          sudo pkill mysqld


                          Now you are fully set just run the following commands:



                          service mysql restart
                          mysql -u root -p





                          share|improve this answer













                          This error occurs due to multiple installations of mysql. Run the command:



                          ps -A|grep mysql


                          Kill the process by using:



                          sudo pkill mysql


                          and then run command:



                          ps -A|grep mysqld


                          Also Kill this process by running:



                          sudo pkill mysqld


                          Now you are fully set just run the following commands:



                          service mysql restart
                          mysql -u root -p






                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Feb 3 at 2:05









                          Cristian VrinceanuCristian Vrinceanu

                          1025




                          1025






























                              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%2f1115080%2fcant-start-mysql-on-ubuntu-18-04-1-lts-error-2002-hy000-cant-connect-to-lo%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

                              flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

                              Mangá

                               ⁒  ․,‪⁊‑⁙ ⁖, ⁇‒※‌, †,⁖‗‌⁝    ‾‸⁘,‖⁔⁣,⁂‾
”‑,‥–,‬ ,⁀‹⁋‴⁑ ‒ ,‴⁋”‼ ⁨,‷⁔„ ‰′,‐‚ ‥‡‎“‷⁃⁨⁅⁣,⁔
⁇‘⁔⁡⁏⁌⁡‿‶‏⁨ ⁣⁕⁖⁨⁩⁥‽⁀  ‴‬⁜‟ ⁃‣‧⁕‮ …‍⁨‴ ⁩,⁚⁖‫ ,‵ ⁀,‮⁝‣‣ ⁑  ⁂– ․, ‾‽ ‏⁁“⁗‸ ‾… ‹‡⁌⁎‸‘ ‡⁏⁌‪ ‵⁛ ‎⁨ ―⁦⁤⁄⁕