How to Setup WAMP Server 2016 2019 in Azure/AWS/GCP
The best way to setup or install WAMP Server on any of the cloud platforms (Azure, AWS, GCP) is to use our marketplace image. The image comes pre loaded with WAMP Server on Windows with Apache, PHP, MySQL, MariaDB, phpMyadmin and Mysql Workbench. The perfect solution to host your web applications in the cloud.
Getting started with WAMP
Once you’ve deployed WAMP Server to your cloud environment you’re ready to start using it. The below sections explain how to use and login to your new WAMP Server and making any configuration changes.
WAMP Login Username and Password
The default login for PhpMyadmin, MariaDB, Mysql for each cloud platform are as follows:
Azure Users
User: root
Pass: blank (no password is set)
AWS Users
User: root
Password: Password is the VM Instance ID. To find the Instance ID you will find on the top right of the desktop or within the AWS console under the EC2 VM properties
NOTE: If you find the root password doesn’t work, try no password sometimes on Windows 2016 it doesn’t get set otherwise Wait 5 mins as during the first boot a start script is setting the root MySQL password and could still be running. You can see if its still running by viewing any Windows task schedule jobs. Wait for it to finish and then try logging in again.
GCP Users
User: root
Password: Password is the VM Instance ID. To find the Instance ID you will find on the property details of the VM within your GCP console. Here is a screenshot of where you will find it:
NOTE: If you find the root password doesn’t work. Wait 5 mins as during the first boot a start script is setting the root MySQL password and could still be running. You can see if its still running by viewing any Windows task schedule jobs. Wait for it to finish and then try logging in again.
MySQL and MariaDB
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 3307. In some cases it can also be port 3308
You may find that MariaDB is the default database manager and if you want to use MySQL, Simply right-click Wampmanager Icon -> Wamp Settings -> Allow MySQL to check
To find out what ports MariaDB or MySQL are using – right click on WAMP icon tray > Tools and as shown in the screenshot you can see the ‘Default DBMS’ is MariaDB and the ports used by MariaDB are 3306 and MySQL using port 3308. In most cases it is normally 3307.
PhpMyAdmin
PhpMyAdmin is configured to use either MySQL or MariaDB.
When calling PhpMyAdmin, there will be a choice of server: MySQL or MariaDB, the default server being the first in the list.
If you receive an error message about versions, you can ignore this message and proceed. It refers to connecting to MariaDB.
Connection to the database by MariaDB or MySQL
In order for your connections to a database server to be made with MariaDB or MySQL, you must specify the port if it is not the default port 3306. Indeed, without specifying the port, it will be the default port that will be used, so 3306.
Connection scripts use, for example:
$mysqli = new mysqli(‘127.0.0.0.1′,’user’,’password’,’database’);
or, in procedural terms:
$mysqli = mysqli_connect(‘127.0.0.0.1′,’user’,’password’,’database’);
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′);
To check the connections to the MySQL or MariaDB database manager, use the script
wamp\www\testmysql.php by’http://localhost/testmysql.php’
by first modifying the script according to your settings.
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.
Create or add a VirtualHost
With Wampserver 3, you can create a VirtualHost with few clicks.
For ease of explanation, here are some names:
– sitefolder : folder in which you want to host the local site
– sitename : name that will be called the local site (http://sitename/)
First, choose where we want to host your local site, it can be a folder in Wampserver as c:/wamp/www/sitefolder/ but this is not mandatory; this host folder can be anywhere on the hard drive, avoiding the paths comportants spaces; for simplicity of explanation we choose c:\sitefolder\.
We need the folder to host the site exists before creating the VirtualHost, we must create it whith File Explorer, launched as administrator(See bottom of page *) :
– Move in the disk tree to where we want to create the folder “sitefolder“
– Right-Click, New -> Folder
– Then type the folder name
– Lauch Wampserver, wait for icon W gren
– Wampmanager Icon -> localhost
We arrive on the home page Wampserver, without Your VirtualHosts menu in the lower right (This is normal, just after installing Wampserver)
– Click Add Virtual Host in your Tools menu at the bottom left
Arriving there, everything is ready in order to create his first VirtualHost
– In the form
— For « Name of the Virtual Host No space – No underscore(_) », we type:
sitename
— For « Complete absolute path of the VirtualHost folder Examples: C:/wamp/www/projet/ or E:/www/site1/ », we type:
c:\sitefolder\
And validates the form by the button:
– Start the creation of the VirtualHost
As stated: It can take some time.
After this “time” it is stated that unfortunately certain operations required for the recognition by Windows and and Apache of this new VirtualHost can not be performed automatically by the browser, so, as shown:
– Right-Click Wampmanager Icon -> Tools -> Restart DNS
Wait until the icon turns green.
Click on Back to home
You now have Your VirtualHost Your menu, at right with such items:
– localhost
– sitename
Likewise, you also have this submenu Your VirtualHosts with Wampmanager icon.
Now everything is ready to set up your local site in the folder c:\sitefolder\ indicating, if required during the installation, that the URL is (http://sitename/) (Without parentheses).
*To launch an application, via its shortcut, as administrator :
– Right-click on the shortcut, Properties
– Shortcut tab
– Advanced button
– Select Run as Administrator
– OK, Apply, OK
Virtual Host Apache Documentation
Refer to the following link for more detailed instructions on setting up Virtual Hosts on Apache using WAMP:
http://forum.wampserver.com/read.php?2,127757
Disable MariaDB or MySQL
You are not required to keep using both MySQL and MariaDB managers, you can keep only the one that suits you and you can even completely disable both database managers by:
Right-click Wampmanager Icon -> Wamp Settings -> Allow MariaDB to uncheck
Right-click Wampmanager Icon -> Wamp Settings -> Allow MySQL to uncheck
WAMP Firewall Ports
The apache webserver uses the following ports:
TCP/80 – (http traffic)
TCP/443 – (https traffic)
Mysql and MariaDB use the following ports depending how they are configured on WAMP:
TCP/3306
TCP/3307
TCP/3308
To setup AWS firewall rules refer to – AWS Security Groups
To setup Azure firewall rules refer to – Azure Network Security Groups
To setup Google GCP firewall rules refer to – Creating GCP Firewalls
Support / Documentation
If you have any questions about this WAMPServer deployment or are experiencing any issues with your deployment leave your comments below and i will answer them for you within 24 hours.
If you would like to hire us to setup your WAMP server environment for you, get in touch and we can get you up and running
Further WAMP Support and documentation can also be found on their forum: http://forum.wampserver.com/
Related Posts:
- How to Install WordPress on Windows Server Using WAMP on AWS
- Setup Active Directory Federation Services ADFS Farm in Azure/AWS/GCP
- How to Setup Squid Proxy Server on Google Cloud GCP (Secure Cache)
- How to Install Apache Tomcat Server on Windows Server 2019
- How to Install MySQL Server on Windows Server 2019 Tutorial
- How to Install LAMP Stack on Ubuntu 20.04 Server (Apache, MariaDB)