Questions tagged [mysqld-safe]

mysqld_safe : Environmentally configured startup script for mysqld

mysqld_safe is the shell script that configures and checks OS settings that are needed or required for mysqld to effectively execute.

When starting mysqld_safe by hand, there are many command options you can pass to it via a customized my.cnf (--defaults-file) or on the command line directly. Any options not understood by mysqld_safe are passed on to mysqld.

In mysqld_safe, there is a loop that launches mysqld executable. Execution in mysqld_safe freezes at that point and waits for mysqld to come back with an exit code.

Here are the possible scenarios for mysqld_safe handling an exit code from mysqld:

  • mysqld terminated normally because mysqld was shutdown with
    • service mysql stop, which makes mysqld_safe terminate
    • mysqladmin shutdown, which makes mysqld_safe terminate
  • mysqld terminated abnormally (mysqld crashes or someone run kill -9 mysqld)
    • mysqld_safe loops, attempts to start mysqld and mysqld works
    • mysqld_safe loops, attempts to start mysqld but fails, mysqld_safe terminates
11 questions
5
votes
3 answers

Cant initialize MySQL. "mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended"

I am doing a fresh install of MySQL on Fedora 22. After I run mysql_install_db I try to start the daemon using mysqld_safe but it does not work. The system says: mysqld_safe Logging to '/var/log/mariadb/mariadb.log'. mysqld_safe Starting mysqld…
user93897
3
votes
1 answer

MySQL: mysqld_safe options

Is there a way to specify these options in configuration file? I've tried to add them into [mysqld_safe] section but it doesn't work: [mysqld_safe] numa-interleave = 1 flush-caches = 1 - # ps -ww -lfC mysqld_safe F S UID PID PPID C PRI NI…
HTF
  • 451
  • 4
  • 13
  • 28
3
votes
2 answers

Unable to run mariadb in safe mode

When I run following command mysqld_safe --skip-grant-tables & I get message myuser@myvm:~$ 200523 08:24:41 mysqld_safe Logging to syslog. 200523 08:24:41 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql After that when I type…
Frank Martin
  • 451
  • 1
  • 5
  • 18
2
votes
1 answer

InnoDB: Error: pthread_create returned 12

have installed MySQL in a particular folder. I was able to run the server and create accounts, databases etc. However, now whenever I try to start the server, I get an error: $ mysqld_safe --defaults-file=mysql.cnf & [1] 2002 [compute-0-5…
highBandWidth
  • 163
  • 2
  • 5
2
votes
1 answer

mysqld_safe version different than mysqld?

Is it a problem that mysqld socket has a different version than the mysqld server? I noticed this in my mysqld log during startup 120420 19:30:06 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 120420 19:30:06 InnoDB:…
giorgio79
  • 1,407
  • 7
  • 19
  • 19
2
votes
1 answer

Is there anyway that I can manually create a PID for the MySQL instance?

I am running MySQL on a linux server. I have taken a copy-back mysql enterprise backup from another linux full backup. Ever sense then I have had problems getting MySQL to start. The problem is that MySQL is not updating the PID file, it's not…
asdf
  • 99
  • 1
  • 2
  • 11
2
votes
2 answers

Mysql hand machine due to high load average and CPU

Mysql is used by only one application which only fire query periodically. When i restart server,It run smooth for period of time. and then crash the whole server. My my.cnf…
1
vote
0 answers

Enabling Mysql safe updates

I'm using mysql 5.5 and trying to enable Mysql safe update on my.cnf file [mysq] --i-am-a-dummy -safe-update it got reflected on root mysql login. SHOW VARIABLES LIKE 'sql_safe_updates' is ON But When I tried to use mysql user, the -safe-update…
adminz
  • 123
  • 1
  • 7
1
vote
1 answer

Sync of Master Master replication when Primary node comes up MySQL 5.7 Enterprise

I have a Master (say Node A) - Master (Say Node B) asynchronous replication setup with ROW based logging method. Node A has been setup as Write/Read node and Node B has been setup as Read Node Only. From JBOSS , i am doing switch over that , when A…
simplifiedDB
  • 679
  • 6
  • 18
  • 36
0
votes
1 answer

Need clarifications on a few lines of code in the mysqld_safe shell script

I'm trying to develop a tool to check MariaDB option files to identify potential errors. When I was going through the mysqld_safe shell script in order to understand how it works, I came across these lines (lines 505 to 536, to be…
Anthony
  • 109
  • 2
0
votes
2 answers

How to set malloc-lib in mysql 5.7 in ubuntu 18.04 LTS

I recently installed jemmaloc 3.6.0-11 using apt-get install libjemalloc1 on my ubuntu server 18.04 The installation were successfull, but when I check using pt-mysql-summary | grep -A5 -i "memory management" I get Memory management library …
Ekkai Imwe
  • 11
  • 7