Which config file does MySQL use?

735 pts.
Tags:
MySQL
MySQL 5.0
Zend
Zend Server
Hi, I'm having trouble with MySQL. My OS is IBMi V7R1. We are using MySQL 5.0.45 with zend server 5.6.0. The problem is that the MySQL server works fine in qp2term(shell) but ends immediately after start with zend server. Also, when I check the defaults config file for MySQL I get this message: Default options are read from the following files in the given order: /etc/my.cnf ~/.my.cnf /usr/local/mysql/etc/my.cnf I am guessing that MySQL uses the configuration file in the last location '/usr/local/mysql/etc/my.cnf'? Is this so? Note that no my.cnf file found in that location, the config file was created by MySQL in '/etc/my.cnf'. So can this be the problem? If so how do I set MySQL to look for the '/etc/my.cnf' last instead of '/usr/local/mysql/etc/my.cnf'?

Software/Hardware used:
MySql 5.0.45, Zend Server 5.6.0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 8  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    No, it's not correct. If the .CNF file is found in the /etc directory and does not exist in later directories (or exists but has incorrect permissions), the /etc .CNF file controls everything. Are there any errors logged either in related joblogs or in MySQL log files? -- Tom
    125,585 pointsBadges:
    report
  • TomLiotta
    Also, how are you starting the MySQL server? The startup command can specify the location of a my.cnf file if you want a specific one to be used. -- Tom
    125,585 pointsBadges:
    report
  • jailall101
    No there are no errors in the log file when this happens. As for starting mysql, we start it by using the zend mysql management menu and selecting 1 to start MySql subsystem. When we do this and use WRKACTJOB , we see that ZMYSQL(mysql subsystem) is started along with ZMYSQLD(mysql server), but we see a DLYW status and after refreshing the screen it(ZMYSQLD job) disappears. Also note like i said we tried starting the mysql server using: qp2term cd /usr/local/mysql/bin mysqld_safe -uroot & and mysql works okay like this.And FYI its a new mysql installation and no password was set.
    735 pointsBadges:
    report
  • jailall101
    The issue is getting mysql to start with zend but i dont know where zend log files are to see why the mysql daemon fails to start.
    735 pointsBadges:
    report
  • TomLiotta
    If that is how you start MySQL, the log files should be in your MySQL data directory. I'm not aware of Zend changing the log file target when it starts MySQL. -- Tom
    125,585 pointsBadges:
    report
  • jailall101
    Problem solved. The problem was that a file 'mysql.sh' was missing in mysql/bin but i cant understand why zend didn't create it during installation or mysql itself for that matter. It took us about 5 days to figure that out. I did find the log file but that didn't give any error message. If only it had mentioned that 'mysql.sh' was missing it would have made it a lot easier. Thanks for your responses Tom.
    735 pointsBadges:
    report
  • TomLiotta
    Any chance you can share how you discovered that obscure glitch? Sorry there weren't any hints visible that I could help with. -- Tom
    125,585 pointsBadges:
    report
  • jailall101
    I came across a post in Zend forum which states that zend looks for /usr/local/mysq/bin/mysql.sh. However, when i checked we didn't have it.http://forums.zend.com/viewtopic.php?f=77&t=6793 
    735 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following