How do I start MySQL server without using startup script /etc/init.d/mysql?

by nixcraft · 0 comments

MySQL startup script only works if you have installed MySQL server using binary method such as apt-get, rpm command or up2date/yum tools etc.

All you need to do is use mysqld_safe command to start the mysqld daemon on Unix or Linux oses. So to start MySQL just type following command:

# /usr/bin/mysqld_safe &

Usually mysqld_safe located at /usr/bin/ directory. However, if you custom compiled MySQL then it will be available in your custom directory (specified using –prefix=/path/to/dir option to ./configure command). For example if you installed MySQL in /server/mysql directory then you need to pass this option to mysqld_safe command:

# /usr/bin/mysqld_safe --basedir=/server/mysql --datadir=/data/mysql --log=/var/log/mysql.log &

Read man page of mysqld_safe for more information.

Featured Articles:

Want to read Linux tips and tricks, but don't have time to check our blog everyday? Subscribe to our daily email newsletter to make sure you don't miss a single tip/tricks. Subscribe to our weekly newsletter here!

{ 0 comments… add one now }

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Previous FAQ:

Next FAQ:

nixCraft FAQ PDF Collection Now Available To All