[Buildroot] [PATCH 3/4] mysql: add mysql init script

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Mon Jul 21 22:11:19 UTC 2014

Dear Marcelo Gutiérrez,

On Tue,  4 Mar 2014 14:50:02 +0000, Marcelo Gutiérrez wrote:

> +case "$1" in
> +	start)
> +		/usr/bin/mysqld_safe &

I've added a call to mysql_install_db on the first boot, to generate
the MySQL system tables, otherwise the server refuses to start. I've
also used --pid-file when calling mysqld_safe to explicitly specify
where the pid file should be stored, because...

> +		;;
> +	stop)
> +		if test -f /var/lib/mysql/mysqld.pid ; then
> +			PID=`cat /var/lib/mysql/mysqld.pid`

... it wasn't stored there, so I fixed that up as well.

Committed with those changes, thanks!

Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering

More information about the buildroot mailing list