LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-28-2011, 05:38 AM   #1
jonaskellens
Member
 
Registered: Jul 2008
Location: Ghent, Belgium
Distribution: Fedora, CentOS
Posts: 632

Rep: Reputation: 33
"Lost connection to MySQL server" when using different port


Hello,

I'm getting the following error on my webpage :

Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server at 'reading initial communication packet', system error: 111 in /var/www/vhosts/...

When I use the default MySQL port 3306, then I have no error.

But when I use port 33060, then I get the error !

My /etc/my.cnf :
Code:
[mysqld]
datadir = /var/lib/mysql
socket = /var/lib/mysql/mysql.sock
user=mysql

old_passwords=1
port = 33060

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
Even when port=33060 still I can connect on port 3306 without any error.

Does anyone know a solution ?
 
Old 04-28-2011, 08:18 AM   #2
omgs
Member
 
Registered: Dec 2010
Posts: 64

Rep: Reputation: 6
I think you have a php problem. Find how to connect to a different mysql hostort
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
"Lost" user mysql while updating system griffey Red Hat 2 02-17-2010 11:08 AM
anybody familiar with this error "Xlib: connection to ":0.0" refused by server" ? rajnivanza Linux - Newbie 3 03-22-2009 06:10 PM
free radius server interaction with mysql server ""configuration in code" yawar Linux - Newbie 2 07-23-2008 03:06 PM
"Anaconda" and "mini-wm" lost connection to display :1.0;??? cbrittain Fedora - Installation 2 03-14-2004 12:22 PM
"Anaconda" and "mini-wm" lost connection to display :1.0;??? cbrittain Linux - General 0 02-24-2004 06:04 PM


All times are GMT -5. The time now is 08:20 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration