Ошибка process already exists

Learn how to fix the “A mysqld process already exists” Error. Our MySQL Support team is here to help you with your questions and concerns.

“A mysqld process already exists” Error – Resolved

If you have been running into the following error message, you have come to the right place.

a mysqld process already exists

This error often occurs when we try to start the MySQL server, but there is already an instance of the MySQL server running on the system.

“A mysqld process already exists” Error - Resolved

In other words, the error lets us know that another MySQL process is already running and occupying the required resources.

We can address this issue with these steps:

  1. First, we have to use system-specific commands to verify if there are any running MySQL processes. For example, we can use this command on Linux:

    ps aux | grep mysqld

  2. Next, we can locate a running MySQL process and stop it before starting a new one.
    The command to stop the MySQL process depends on our operating system and how we have installed MySQL.

    For instance,

    • On Linux with systemd:

      sudo systemctl stop mysql
      Or
      sudo systemctl stop mysqld

    • On macOS with Homebrew:

      brew services stop mysql

  3. After we stop the MySQL process, we can verify if it has actually stopped by rechecking the running processes as seen in step 1.
  4. Now that we are sure no other MySQL processes are running, we can try starting the MySQL server again.
    • On Linux with systemd:

      sudo systemctl start mysql
      Or
      sudo systemctl start mysqld

    • On macOS with Homebrew:

      brew services start mysql

  5. Next, we have to check the status of MySQL to ensure it is running correctly.
    • On Linux with systemd:

      sudo systemctl status mysql
      Or
      sudo systemctl status mysqld

    • On macOS with Homebrew:

      brew services list

[Need assistance with a different issue? Our team is available 24/7.]

Conclusion

To conclude, our Support Techs demonstrated how to resolve the “A mysqld process already exists” Error

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

I’m using mariaDB.
Basically everytime I start it, it tells me a mysqld process already exists.
Why do I have to run sudo apachectl start for mysql to work?
Shouldn’t I only need mysql.server start?

mysql.server restart
Shutting down MySQL
.. SUCCESS!
Starting MySQL
.171102 15:59:35 mysqld_safe Logging to '/usr/local/var/mysql/****.err'.
171102 15:59:35 mysqld_safe A mysqld process already exists
SUCCESS!

And a related problem is that when I edit etc/my.cnf it doesn’t do anything.
I just know I’m doing something wrong, but I can’t see what.

edit:
After doing mysql.server stop, then ps aux, this is what I get:
`

drewson           9625   0.0  0.0  2466636   2756 s001  S+    3:55pm  0:00.59 mysql -u root -p --max_allowed_packet=1073741824 -D hive
drewson          10235   0.0  0.0  2442020   1936 s000  S+    4:36pm   0:00.00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn mysql
drewson          10186   0.0  1.3  2969520 108876   ??  S     4:35pm   0:00.26 /usr/local/opt/mariadb/bin/mysqld --basedir=/usr/local/opt/mariadb --datadir=/usr/local/var/mysql --plugin-dir=/usr/local/opt/mariadb/lib/plugin --log-error=/usr/local/var/mysql/drewson.err --pid-file=drewson.pid
drewson          10105   0.0  0.0  2444660   2376   ??  S     4:35pm   0:00.02 /bin/sh /usr/local/opt/mariadb/bin/mysqld_safe --datadir=/usr/local/var/mysql`

And here’s info from my err log:

2017-11-02 16:35:05 140735735079872 [ERROR] mysql.user has no `Event_priv` column at position 29
2017-11-02 16:35:05 140735735079872 [ERROR] Incorrect definition of table mysql.event: expected column 'sql_mode' at position 14 to have type set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH'), found type set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_A
2017-11-02 16:35:05 140735735079872 [ERROR] mysqld: Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler.
2017-11-02 16:35:05 140735735079872 [Note] Reading of all Master_info entries succeded
2017-11-02 16:35:05 140735735079872 [Note] Added new Master_info '' to hash table
2017-11-02 16:35:05 140735735079872 [Note] /usr/local/opt/mariadb/bin/mysqld: ready for connections.
Version: '10.2.10-MariaDB'  socket: '/tmp/mysql.sock'  port: 3306  Homebrew`

During this time, your website won’t load because it cannot connect to the database. So before I start, please note the circumstances in which this error occurs:

1). Trying to recreate your root account again.
2). Change the password for the root user in MySQL.
3). Any other reason.

Fix:

It is clearly mentioned in the error that if any mysqld process is still running and due to this you cannot change the password for the root user. So, we have to kill all mysqld process before running «mysqld_safe» command.

To kill all mysqld process :

# killall mysqld mysqld_safe

Wait for 10 seconds atleast so that it shut down cleanly.

Now, run this command to check whether still there are some mysqld process remained or not?

# ps aux | grep mysqld

If you still able to see more than run this command:

killall -9 mysqld mysqld_safe

This will kill all mysqld processes.

Now, you can perform your mysqld_safe command.


0

1

Здравствуйте!
На Vps установил mysql по этой инструкции: https://www.linode.com/docs/databases/mysql/how-to-install-mysql-on-centos-7
После того как я все сделал не запускается: sudo systemctl start mysqld
Ошибка: Job for mysqld.service failed because the control process exited with error code. See «systemctl status mysqld.service» and «journalctl -xe» for details.

После выполнения комманды: systemctl status mysqld.service вот скрин: http://joxi.net/p271Kggcqn0xr7
в логах пишет: вот скрин http://joxi.net/p271Kggcqnoxr7

Также у меня не сработала эта команда: sudo mysqld_safe —skip-grant-tables &
вот что выдало:
# sudo mysqld_safe —skip-grant-tables &
[2] 10771
# 170125 16:01:35 mysqld_safe Logging to ‘/var/log/mysqld.log’.
170125 16:01:35 mysqld_safe A mysqld process already exists

[2]+ Exit 1 sudo mysqld_safe —skip-grant-tables

Помогите пожалуйста

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.

Already on GitHub?
Sign in
to your account

Closed

sabrehagen opened this issue

Aug 26, 2015

· 4 comments

Comments

@sabrehagen

Hi,

I received this issue today when restarting my server. Just alerting you to it. PM2 version 0.14.7 on Ubuntu 14.04.

[PM2] Process server succesfully reloaded
[PM2] Process server succesfully reloaded
[PM2] Process server succesfully reloaded
Error: Process with pid 10377 already exists
    at Object.God.logAndGenerateError (/usr/local/lib/iojs-v2.3.3-linux-x64/lib/node_modules/pm2/lib/God/Methods.js:35:12)
    at Object.God.startProcessId (/usr/local/lib/iojs-v2.3.3-linux-x64/lib/node_modules/pm2/lib/God/ActionMethods.js:218:21)
    at Object.God.restartProcessId (/usr/local/lib/iojs-v2.3.3-linux-x64/lib/node_modules/pm2/lib/God/ActionMethods.js:421:18)
    at God.reloadProcessId (/usr/local/lib/iojs-v2.3.3-linux-x64/lib/node_modules/pm2/lib/God/Reload.js:198:18)
    at Server.onmessage (/usr/local/lib/iojs-v2.3.3-linux-x64/lib/node_modules/pm2/node_modules/pm2-axon-rpc/lib/server.js:105:6)
    at emitTwo (events.js:87:13)
    at RepSocket.emit (events.js:172:7)
    at Parser.<anonymous> (/usr/local/lib/iojs-v2.3.3-linux-x64/lib/node_modules/pm2/node_modules/pm2-axon/lib/sockets/rep.js:51:15)
    at emitOne (events.js:77:13)
    at Parser.emit (events.js:169:7)

@ClementParis016

I’m encountering the same problem. Did you managed to solve it @sabrehagen?

Ubuntu 14.04.3
pm2 v0.14.5

[PM2] Reloading process
[PM2] Process succesfully reloaded
Error: Process with pid 15357 already exists
    at Object.God.logAndGenerateError (/home/srv/.nvm/versions/v0.12.4/lib/node_modules/pm2/lib/God/Methods.js:35:12)
    at Object.God.startProcessId (/home/srv/.nvm/versions/v0.12.4/lib/node_modules/pm2/lib/God/ActionMethods.js:218:21)
    at Object.God.restartProcessId (/home/srv/.nvm/versions/v0.12.4/lib/node_modules/pm2/lib/God/ActionMethods.js:419:18)
    at God.reloadProcessId (/home/srv/.nvm/versions/v0.12.4/lib/node_modules/pm2/lib/God/Reload.js:198:18)
    at Server.onmessage (/home/srv/.nvm/versions/v0.12.4/lib/node_modules/pm2/node_modules/pm2-axon-rpc/lib/server.js:105:6)
    at RepSocket.emit (events.js:110:17)
    at Parser.<anonymous> (/home/srv/.nvm/versions/v0.12.4/lib/node_modules/pm2/node_modules/pm2-axon/lib/sockets/rep.js:51:15)
    at Parser.emit (events.js:107:17)
    at Parser._write (/home/srv/.nvm/versions/v0.12.4/lib/node_modules/pm2/node_modules/pm2-axon/node_modules/amp/lib/stream.js:91:16)
    at doWrite (_stream_writable.js:301:12)

@acarstoiu

A full restart (including God) solves it. This problem shows up with pm2 1.0.0 as well, but I cannot give a replication recipe (it’s a series of start/reload operations that triggered it).

The problem is that a process is both in state errored and at the same time God.clusters_db[id].process.pid is set. Looks very much like a bug!

@acarstoiu

For PM2 developers:
By any chance, is it that PM2 running in cluster mode places an instance in state errored when it fails to reply to a request, i.e. a timeout occurs before receiving an answer?

@venkatesh-tr

I can see one of the process getting SIGINT when this happened! Is it something to do with the fact that that process which got SIGINT is not closed down in time?

Понравилась статья? Поделить с друзьями:
  • Ошибка prnd пежо 408
  • Ошибка prnd пежо 407 акпп
  • Ошибка prnd пежо 308 что означает
  • Ошибка prnd peugeot 308
  • Ошибка prl на рефрижераторе zanotti как устранить