MyBB Ideas

The MyBB Ideas site allows users to suggest new features and changes in MyBB and the MyBB Group to easily review them to decide what direction MyBB should head in. Search existing ideas.

Support for non standard MYSQL server ports

Voting Closed
5 votes

Submitted by hrreichardt, 31st August 2007, 11:57:33 AM

Request for enhancement of installation code to support non standard MYSQL server ports.

Here the contents of my thread (tid=22475) regarding this problem:
---------------------------------------------------------------------
Install fails with MySQL 5

Requirements Check shows
PHP Version: 5.2.2
Supported DB Extensions: MySQL Improved, MySQL
PHP XML Extensions: Installed
Configuration File Writable: Writable
Settings File Writable: Writable
File Uploads Directory Writable: Writable
Avatar Uploads Directory Writable: Writable
-----------------------------------------
Database Configuration
Error
There seems to be one or more errors with the database configuration information that you supplied:

Could not select the database 'wa5569_db2'. Are you sure it exists and the specified username and password have access to it?
Once the above are corrected, continue with the installation.
-----------------------------------------
This is the database I created with phpAdmin:
dbname: wa5569_db2
dbtype: MySQL 5
dbusers: wa5569_2 , wa5569
-----------------------------------------
If I try the same installation on a MySQL 4 database everything works fine. Any ideas?
===========================================

RE: Install fails with MySQL 5

My internet provider says:
---------------------------------------
Wenn Sie auf Ihrer Adminoberfläche MySQL5 ausgewählt haben, dann muss beim connectieren der Datenbank der Port 3307 mit angegeben werden, also z.B:

$server= "127.0.0.1:3307";
$user= "ww4711_1";
$passwort= "meinpasswort";
$datenbank= "usr_ww4711_db1";

$connection = mysql_connect($server, $user, $passwort);

Bei MySQLi wäre es dann:

$server="127.0.0.1";
$user="ww4711_1";
$passwort="meinpasswort";
$datenbnak="usr_ww4711_db1":
$port="3307";

$connection = mysqli_connect($server,$user,$passwort,$port);
-----------------------------------------------

But this won't work either (see attached screenshot).

HELP ME!
=========================================

RE: Install fails with MySQL 5

I opened a ticket at my provieder. They found a workaround as follows (translated from German to English by a machine):
--------------------------------------------------------------------
actually we had the same problem with the MySQL Improved option. We
installed the forum for you under the general MySQL option (MySQL 5), because
the forum software does not support a different port number under mysqli (which with us deviates under MySQL5 from the standard).
--------------------------------------------------------------------
Only one question still: Isn't the "Improved option" the better variant? Or differently around in demand: Which disadvantages could I have by the option installed now. Performance perhaps?
--------------------------------------------------------------------
Yes, MySQLi would be already somewhat more perfomant. Should not actually harm the forum however. The suggestion to the developers further to give should not harm however. The problem is that You have to pass the port number as a 5th paramater to connect to MySQLi. Possibly this is already given in the Script however it can not be installed if one has 2 MySQL servers (thus as with us MySQL4 on port 3306 and MySQL5 on port 3307).
--------------------------------------------------------------------

Included

2 Comments

  1. I think this would be very good to have as some people sql servers are not on the default port

    crsoft, 1st September 2007, 1:17:17 AM
  2. Chris included this in MyBB 1.2.10 and 1.4 a while back (As a bug report)

    Ryan Gordon, 4th September 2007, 10:47:11 PM