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.

Advertisement

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.

πŸ₯Ί Was this helpful? Please add a comment to show your appreciation or feedback.

nixCrat Tux Pixel Penguin
Hi! 🀠
I'm Vivek Gite, and I write about Linux, macOS, Unix, IT, programming, infosec, and open source. Subscribe to my RSS feed or email newsletter for updates.

0 comments… add one

Leave a Reply

Your email address will not be published. Required fields are marked *

Use HTML <pre>...</pre> for code samples. Your comment will appear only after approval by the site admin.