• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

MySQL problems

moneyshot

Member
Ok. I'm trying to install phpbb forums. They use php and Mysql, I have PHP4 working fine. But when the install.php tests my Mysql it gives this error:

'Testing DB Connection...
Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) in /var/www/html/forums/install.php on line 39'

I was told this may be because I have not setup my etc/my.cnf, the person who told me this was not kind enough to tell me how to set it up though. If you believe this is the problem, could someone be kind enough to past an example of a working my.cnf here. If you would like some more info about the machine go here php4 test file (gives info about php and mysql config on the machine). This is all on Redhat 7.1 full install, which included apache, php4 and mysql out of the box. Thanks in advance.
 
The mysql server is probably not started. RH 7.* doesn't seem to work quite right "out of the box" (out of the rpm?).

Try this:

ps -ax | grep mysqld

If you don't see anything (other then the grep command), it's not running.

I've tried using chkconfig to turn it on, but it doesn't seem to take.
This works though:

# service mysqld start

You may have to change some permissions as well:

# chown -R mysql.mysql /var/lib/mysql; chmod a+rX /var/lib/mysql

I'm primarily using MySQL under RH6.2, but the above steps got it running for me under 7.1
The mailing list archive is a good source for questions like this.
Good luck
 
I did '# service mysqld start' and it stated that it started ok. But still no luck. Is there anything you have to configure in the my.cnf for it to work correctly? The error message I get in the logs is 'can't find file /mysql/host.frm' yet the file is there.
 
does the file '/var/lib/mysql/mysql.sock' exist?
Maybe its in a different location?
Maybe it has the wrong permissions? My install on RH 6.2 has the file owed by mysql.mysql
Can you start the normal command-line client?
Does the user that you're attempting to run the script as have permissions to the database server?

Not sure I can help much more. I'm just learning MySQL myself, and I don't know anything about PHP.
 
Ok I'll make this simpler. If you had a perfectly clean install of RH 7.1 what would you do to configure mysql. I'm a total n00b so please be scpecific. ie: how do you setup clients for mysql, do you have to tell it path names, is their a command line configuration? Thanks.
 
Back
Top