LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-24-2010, 02:22 AM   #1
hyperborea
LQ Newbie
 
Registered: Sep 2010
Posts: 3

Rep: Reputation: 0
I have problem with configuration on apache, mysql and php for AMXbans


Hi, i have a problem with AMXbans.

My Linux is Slackware 13.0. , mysql is version 5.0.84, Apache/2.2.13,PHP 5.2.3
from locahost or real IP in internet explorer i see this error " Lost connection to MySQL server at 'reading initial communication packet', system error: 111".
In /var/log/httpd/error_log i see this error:
" [error] [client IP] PHP Warning: mysql_connect() [<a href='function.mysql-connect'>>function.mysql-connect</a>]:Lost connection to MySQL
server at 'reading initial communication packet', system error: : 111 in /var/www/htdocs/web/include/config.inc.php on line 48, referer: http://My real IP/web/

//connect to db - "this is line 46"
$config->db_host=gethostbyname($config->db_host); "this is line 46"
$mysql = mysql_connect($config->db_host,$config->db_user,$config->db_pass) or die (mysql_error()); - "this is line 48"

Please ,help me for fix that error
I apologize for my bad English. Thenks

Last edited by hyperborea; 09-24-2010 at 12:31 PM.
 
Old 09-26-2010, 03:47 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

Check if you have a firewall running that is blocking access to port 3306.
Also take a look at /etc/my.cnf and comment out "skip-networking" and "bind-address".
Restart mysqld and check if it works

Regards
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem in configuration of php and apache jetro2k5 Linux - Newbie 2 04-11-2007 01:21 AM
Initial PHP configuration after starting MySQL and Apache studioq Linux - Newbie 2 09-27-2006 11:23 PM
Apache PHP Configuration Problem Br. Nicholas SUSE / openSUSE 3 09-20-2006 03:59 PM
Apache MySQL PHP configuration Gilion Linux - Software 1 02-02-2004 10:58 AM
apache php-mysql configuration problems ugol Linux - Software 1 11-08-2003 09:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration