How to specify the configuration file when starting mysqld?

In our development machine, I don’t have the root permission to install MySQL server. But our SonarQube needs it.

Fortunately, if you using the MySQL TAR archive, “root” is not required to launch mysqld but you need specify the configuration file. The default one uses some folders which need root to access.

Here is the sample mysqld configuration. You can also start from a configuration file in folder support-files.

Basically, you need specify the basedir and datadir to tell mysql where it’s installed and where the database files should be put.

Other settings can keep the same as defaults in my case. Then I start the server instance. Option “–defaults-file” is important.

 References

发表评论

电子邮件地址不会被公开。 必填项已用*标注