Why must I specify a port for MySQL access on full install
Posted by: KenCRoy1 (67.231.49.---)
Date: December 30, 2019 09:25PM

I recently installed WampServer 3.2 64-bit full install after installing the Microsoft Visual C++ redistributable libraries from [wampserver.aviatechno.net]

Thanks for providing the direct links on the above site and providing the Tool to check if the VC++ packages needed to Wampserver 3 are installed correctly. Very useful

The following are the answers requested

1 - Windows version used (Specify version number AND whether 32 or 64 bit) - Windows 10 Pro 64-bit
2 - Version WampServer (Specify version number AND whether 32 or 64 bit) - WampServer 3.2 64-bit full install
3 - Apache Version - 2.4.41
4 - PHP Version - PHP 7.4.0
5 - MySQL Version - MySQL 5.7.28
5a - MariaDB version if applicable
6 - What color is the WampServer icon (in the notification area of the taskbar) - green
8 - Do you have access to localhost (Homepage WampServer)? - yes
8a - If so, is there an error message at the bottom of the page? - no
9 - Do you have access to phpMyAdmin? - yes
10 - If you refer to an error message, please include the EXACT wording of the error in your post
11 - If you use an Antivirus and / or Firewall, please include the names of these McAfee Small Business Security
12 - What is the full path to the installation of WampServer (eg D:\wamp\) - d:\wamp64
13 - If you have one or more Virtual Hosts defined, please show their definition(s)

I initially was not able to access MySQL from my web application (TNG) without specifying 3308 as the port.

I was also getting
Address Not Found for www.localhost.com

which I finally resolved by changing the about:config for SeaMonkey based on the following entry that I found in stackoverflow pertaining to Firefox redirecting to www.localhost.com

[stackoverflow.com]

I was also getting Connection Interrupted error on a specific script, that I was able to resolve by adding the following to the end of httpd.conf to increase the Apache stack size to 8MB.

<IfModule mpm_winnt_module>
ThreadStackSize 8388608
</IfModule>

based on another stackoverflow entry

[stackoverflow.com]

In my attempts to resolve why my script was not running, I ended up uninstalling WampServer 3.2 and installing my previous full install of WampServer 3.1.7

My question is why does WampServer 3.2 require a port specification to access the MySQL database when it was not required on the full install of 3.1.7 64-bit nor is it required when upgrading 3.1.7 to 3.1.9 and then 3.2?

Why is the ThreadStackSize entry not included in the WampServer httpd.conf?

Thanks for making it easier to check that one has all the required Visual C++ modules and for making it easier to define the Virtual Hosts.

Ken
an old IBM z/OS operating system expert

Options: ReplyQuote
Re: Why must I specify a port for MySQL access on full install
Posted by: Otomatic (Moderator)
Date: December 30, 2019 10:36PM

Hi,

Right-click Wampmamager tray icon -> Help -> MySQL -MariaDB

Read and you'll understand.

------------------------------------------------------------------------------------------------------------
Wampserver 3.2.3 32 bit - Apache 2.4.46 - PHP 7.4.9…5.6.40 - MySQL 5.7.31 - MariaDB 10.5.5
Wampserver 3.2.3 64 bit - Apache 2.4.46 - PHP 7.4.9…5.6.40 - MySQL 5.7.31/8.0.21 - MariaDB 10.5.5
PhPMyadmin 5.0.2 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

Options: ReplyQuote
Re: Why must I specify a port for MySQL access on full install
Posted by: KenCRoy1 (67.231.49.---)
Date: December 30, 2019 10:52PM

Sorry but maybe I did not ask the correct question. Now that I have installed WampServer 3.1.7 and upgraded it to 3.2 I do not need specify a port which means that MySQL defaults to port 3306.

When I installed the full install of WampServer 3.2 I was not able to connect to MySQL without specifying port 3308.

The question then becomes how is the default of MySQL to port 3306 set? or how do I make MySQL the default database on a full install. Are you saying the MariaDB is the default on a full install of 3.2 but MySQL remains the default on an upgrade? Is so where is the default specified?


Question is being asked more to help others since I no longer have the full install of 3.2 but the upgrade.


2nd question was why is the http stack definition not in the distributed code or at a minimum in your help sticky entries.

Options: ReplyQuote
Re: Why must I specify a port for MySQL access on full install
Posted by: Otomatic (Moderator)
Date: December 30, 2019 11:08PM

Read

------------------------------------------------------------------------------------------------------------
Wampserver 3.2.3 32 bit - Apache 2.4.46 - PHP 7.4.9…5.6.40 - MySQL 5.7.31 - MariaDB 10.5.5
Wampserver 3.2.3 64 bit - Apache 2.4.46 - PHP 7.4.9…5.6.40 - MySQL 5.7.31/8.0.21 - MariaDB 10.5.5
PhPMyadmin 5.0.2 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

Options: ReplyQuote
Re: Why must I specify a port for MySQL access on full install
Posted by: Otomatic (Moderator)
Date: December 31, 2019 10:08AM

Hi,

It is very simple :

As notified, Wampserver update 3.2.0 updates only "Wampmanager", does not add any Apache PHP, MySQL or MariaDB versions. It is a cumulative update. It is not necessary to apply the old updates 3.0.1 to 3.1.9 before applying 3.2.0. There will be no changes to your Apache, PHP, MySQL, MariaDB settings and versions used; your local sites and databases will not be affected. This update is necessary to install the latest Apache, PHP, MySQL or MariaDB addons.

Wampserver 3.2.0 is a full installation that installs MariaDB as the default database manager and MySQL only on option. Indeed, given the size occupied by MySQL 1356 MB (1.3 GiB ) and the resources required to run it, it was decided that it would no longer be the default database manager.

I am willing to believe, since English is not my mother tongue, that the explanations given in the file wamp(64)/mariadb_mysql.txt may not be correct for an English-speaking person.

Nevertheless, all the explanations are there and are understandable by anyone:

- Default database manager and ports used
Depending on the versions of the complete Wampserver installers, either MySQL or MariaDB is the default database manager.
If MySQL is the default manager, it uses port 3306, in which case MariaDB will use port 3307.
If MariaDB is the default manager, it will use port 3306, in which case MySQL will use port 3308.


- How to connect if this is not the default port
To connect with a manager that does not use port 3306, you must specify the port number:
$mysqli = new mysqli('127.0.0.0.1','user','password','database','3307');
or, in procedural terms:
$mysqli = mysqli_connect('127.0.0.0.1','user','password','database','3307');


- Replace MySQL with MariaDB and vice versa ---
Important note : It is imperative to save your databases in SQL files by exporting them before disabling MySQL.
This is the only sustainable way to transfer your databases between MySQL and MariaDB.
- There is a tool to reverse the default DBMS with a single click if both are enabled (MySQL AND MariaDB ):
- If MySQL is the default DBMS
Right-click Wampmanager icon -> Tools -> Invert DBMS by default MySQL <-> MariaDB
or
- If MariaDB is the default DBMS
Right-click Wampmanager icon -> Tools -> Invert DBMS by default MariaDB <-> MySQL
Of course, you still have to import your previously backed up databases.


And as for your last question:
> Why is the ThreadStackSize entry not included in the WampServer httpd.conf?
Because:
- 1 - Until now, the problem had never been encountered...
- 2 - This directive is not included in the Apache for Windows distribution.
- 3 - It is absolutely impossible to cover all cases
- 4 - It is up to the user - who has declared himself "Apache Server Administrator" - to know what he is doing.

This directive will be included in Wampserver 3.2.1 and future Apache releases.

On this subject, it is essential to specify that it is absolutely not necessary to include the directive in a <IfDefine mpm_winnt_module> structure.
This is because Apache for Windows includes the mpm_winnt_module in the apache core as standard, and this module cannot be disabled. This can be seen very easily by :
E:\wamp64\bin\apache\apache2.4.41\bin>httpd -M
Loaded Modules:
 core_module (static)
 win32_module (static)
 mpm_winnt_module (static)
 http_module (static)
 so_module (static)
 access_compat_module (shared)

And, to make the addition of this directive as explicit as possible, it will be done, in httpd.conf, just after AcceptFilter https none par:
AcceptFilter https none

# ThreadStackSize directive sets the size of the stack (for autodata)
# of threads which handle client connections and call modules to help process
# those connections. In most cases the operating system default for stack size
# is reasonable, but there are some conditions where it may need to be adjusted.
# Apache httpd may crash when using some third-party modules which use a
# relatively large amount of autodata storage or automatically restart with
# message like: child process 12345 exited with status 3221225725 -- Restarting.
# This type of crash is resolved by setting ThreadStackSize to a value higher
# than the operating system default.
ThreadStackSize 8388608‬

------------------------------------------------------------------------------------------------------------
Wampserver 3.2.3 32 bit - Apache 2.4.46 - PHP 7.4.9…5.6.40 - MySQL 5.7.31 - MariaDB 10.5.5
Wampserver 3.2.3 64 bit - Apache 2.4.46 - PHP 7.4.9…5.6.40 - MySQL 5.7.31/8.0.21 - MariaDB 10.5.5
PhPMyadmin 5.0.2 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

Options: ReplyQuote
Re: Why must I specify a port for MySQL access on full install
Posted by: KenCRoy1 (67.231.49.---)
Date: December 31, 2019 12:31PM

Bonjour Otomatic,

Un grand merci pour tes réponses. Your English is very good. I had not read to the bottom of the Help screen and might have missed that MariaDB became the default in WampServer 3.2 full install when I was building my new laptop.

Thanks for your future change to the httpd.conf While I was a system software developer and modified the IBM mainframe operating system, i was never an Apache server administrator.

Interesting that increasing the ThreadStackSize was not reported previously since i found the answer in a 7 year old thread [stackoverflow.com]

but then maybe it is only an issue on a brand new install on a new Windows 10 environment. Previously i would clone my D: drive when migrating from one system to the next.

Ken

Options: ReplyQuote


Sorry, only registered users may post in this forum.