Non-standard SQL po...
 
Notifications
Clear all

Non-standard SQL port (ie, not 3306)

9 Posts
4 Users
0 Reactions
3,927 Views
(@hobert)
Posts: 61
Trusted Member
Topic starter
 

URL to your eFiction: http://www.hobert.net/fic
Version of eFiction: 3.3
Have you bridged eFiction, if so with what?: No
Version of PHP: 5.2.4
Version of MySQL: 5.0.45
Have you searched for your problem: (yes/no)  Yes
If so, what terms did you try: SQL, port, 3306, step 2
State the nature of your problem: A fatal MySQL error was encountered.
ERROR: Failed to connect to the database!
Do you have a test account for us? Not that far yet.

I'm using a non-standard SQL port on my server setup (not 3306).  I don't see any way to change eFiction to talk to the new port.  I get the above error after inputting the SQL information and going to the next page.  Installation continues fine when I set the SQL port on the server to 3306.  So, is there a way to configure another port besides 3306?

Kevin


efiction - 3.5.3
MySql - 5.5.32
php - 5.5.22
Linex - Apache 2.2.17
Hosted by: Fatcow!
http://www.hobert.net/fic/

 
Posted : 10/09/2007 1:43 pm
(@tammy)
Posts: 2577
Member Moderator
 

Add the port to your server settings in config.php.


localhost:PORT


 
Posted : 13/09/2007 10:30 am
(@hobert)
Posts: 61
Trusted Member
Topic starter
 

I had tried that, first  :|, as well as IPADDRESS:PORT.  Neither seem to help.


efiction - 3.5.3
MySql - 5.5.32
php - 5.5.22
Linex - Apache 2.2.17
Hosted by: Fatcow!
http://www.hobert.net/fic/

 
Posted : 13/09/2007 12:48 pm
(@carissa)
Posts: 791
Member Moderator
 

If what Tammy said didn't work, then it's likely your host isn't localhost. Unfortunately, we can't tell you what it is. You'll have to check on your database page in cpanel or contact your host.


 
Posted : 14/09/2007 8:17 pm
(@hobert)
Posts: 61
Trusted Member
Topic starter
 

If what Tammy said didn't work, then it's likely your host isn't localhost. Unfortunately, we can't tell you what it is. You'll have to check on your database page in cpanel or contact your host.

I am my own host.  MySQL is running on the same machine as the eFiction pages, which is in the room next to my office.  "localhost" works fine with MT and Coppermine, which also run on the same machine.  That's why I am so confused.  Both MT and Coppermine will follow along any port changes I make to MySQL (as long as I change the config files in those scripts), but eFiction won't.


efiction - 3.5.3
MySql - 5.5.32
php - 5.5.22
Linex - Apache 2.2.17
Hosted by: Fatcow!
http://www.hobert.net/fic/

 
Posted : 17/09/2007 12:36 pm
(@jrabbit)
Posts: 64
Trusted Member
 

In your php.ini file, depending on whether you are using the mysqli or mysql extension set either:

mysql.default_port = <portnumber>

or

mysqli.default_port = <portnumber>


 
Posted : 27/09/2007 8:52 pm
(@hobert)
Posts: 61
Trusted Member
Topic starter
 

In your php.ini file, depending on whether you are using the mysqli or mysql extension set either:

mysql.default_port = <portnumber>

Yep, that had already been set correctly, proven by Coppermine working no matter what I set the SQL port to.  eFiction just throws up "_FATALERROR _NOTCONNECTED" when I use something other than 3306.

php.ini:

[MySQL]
mysql.allow_persistent = On
mysql.max_persistent = -1
mysql.max_links = -1
mysql.default_port = 14924 (or 3306 - grin)
mysql.default_socket =
mysql.default_host =
mysql.default_user =
mysql.default_password =
mysql.connect_timeout = 60
mysql.trace_mode = Off


efiction - 3.5.3
MySql - 5.5.32
php - 5.5.22
Linex - Apache 2.2.17
Hosted by: Fatcow!
http://www.hobert.net/fic/

 
Posted : 28/09/2007 5:27 pm
(@tammy)
Posts: 2577
Member Moderator
 

Why don't you try editing mysql_connect and putting your host information (with the port) directly into the dbconnect function? Sounds stupid I know, but the smart answers aren't working so you may as well try something crazy. πŸ™‚

Hmm.  Are you using localhost?  There's a note in the documentation at php.net

Note:  Whenever you specify "localhost" or "localhost:port" as server, the MySQL client library will override this and try to connect to a local socket (named pipe on Windows). If you want to use TCP/IP, use "127.0.0.1" instead of "localhost". If the MySQL client library tries to connect to the wrong local socket, you should set the correct path as  mysql.default_host  string  in your PHP configuration and leave the server field blank.

Try 127.0.0.1?


 
Posted : 29/09/2007 12:55 am
(@hobert)
Posts: 61
Trusted Member
Topic starter
 

Why don't you try editing mysql_connect and putting your host information (with the port) directly into the dbconnect function? Sounds stupid I know, but the smart answers aren't working so you may as well try something crazy. πŸ™‚

Hmm.  Are you using localhost?  There's a note in the documentation at php.net

Note:  Whenever you specify "localhost" or "localhost:port" as server, the MySQL client library will override this and try to connect to a local socket (named pipe on Windows). If you want to use TCP/IP, use "127.0.0.1" instead of "localhost". If the MySQL client library tries to connect to the wrong local socket, you should set the correct path as  mysql.default_host  string  in your PHP configuration and leave the server field blank.

Try 127.0.0.1?

I know I tried the static IP address of the server (with and without specific port as well), but I don't remember if I tried 127.0.0.1.  Tried it now, and no, it didn't work (although I still don't know why Coppermine Gallery would work and not eFiction if it was a PHP config problem/error).  Thanks for the suggestion, though, I'm pretty sure that one slipped my mind.

I'll try the direct edit after lunch.  I was looking to do that, but had no idea where to start to track down where that info is stored.

It's a puzzlement!!


efiction - 3.5.3
MySql - 5.5.32
php - 5.5.22
Linex - Apache 2.2.17
Hosted by: Fatcow!
http://www.hobert.net/fic/

 
Posted : 01/10/2007 12:53 pm
Share: