We’re here to help and answer any question you might have. We look forward to hearing from you.

Setting up MySQL on AWS with Lucee involves deploying a MySQL database integrating it with the Lucee server. By doing so, you can create a robust and scalable environment for hosting dynamic web applications. With AWS handling the database management and Lucee providing the server-side scripting capabilities, you can enjoy the benefits of a reliable and efficient setup for your web development needs.

MySQL Setup on AWS with Lucee

DAStek logo

What will you do

  1. Installing  Mysql on AWS with Lucee
  2. Configure MySQL database for WordPress


  1. An active AWS account.
  2. Provisioned EC2 instance for hosting Lucee server.
  3. MySQL database configured on AWS RDS.
  4. Security group configuration to allow necessary ports.
  5. Lucee installation and integration with MySQL database.

Step 1: Launch an instance choosing AWS ubuntu AMI.

Step 2: Open terminal and install java using following command :

Command 1

sudo apt-get update

Command 2

sudo apt-get install openjdk-“version”-jdk (openjdk-8-jdk)*
Choose any version and replace with “version” in above command.

Step 3: Download Lucee using following command :

Command 1

wget https://cdn.lucee.org/lucee-


* you can go to https://download.lucee.org/ and check version accordingily.*

Step 4: Make Lucee installer executable :


chmod +x lucee-

Step 5: Run the installer using :

Command 1

sudo ./lucee-

Step 6: Start the lucee server :

Command 1

sudo service lucee_ctl start

Step 7: Allow incoming traffic by opening the port 8888 :

Command 1

sudo ufw allow 8888/tcp

Step 8: Lucee will be installed by default in opt/lucee directory.

Command 1

sudo ufw allow 8888/tcp

Step 9: You can make a simple test file and place it in:

opt/lucee/tomcat/webapps/ROOT/ directory
You see your page by visiting http://localhost:8888/page_name.cfm (replace localhost by you ip/domain)

To install My SQL, follow these steps:

Step 1: Run the following commands

Command 1

sudo apt update

Command 2

sudo apt install mysql-server

Step2: During the installation, you will be prompted to create password for root user.

Step 3: Start SQL server using :

Command 1sudo systemctl start mysql

Step 4: Enable the SQL server to start automatically on boot using :

Command 1sudo systemctl enable mysql

Step 5: Check SQL status using :

Command 1

sudo systemctl status mysql

Step 6: Login to the MySQL as follows :

If you want to create a new user for MySQL follow steps below.

Command 1sudo mysql -u root -p

Step 7: Create user

Command 1CREATE USER ‘newuser’@’localhost’ IDENTIFIED BY ‘password’;

Step 8: Grant permission :

Command 1GRANT ALL PRIVILEGES ON *.* TO ‘newuser’@’localhost’;

Step 9: Flush the privileges to apply the changes :


Step 10: Exit the MySQL server :

Command 1EXIT;

Step 11: Install the MySQL Connector/J package using the following command:

Command 1

sudo apt-get install libmysql-java

Step 12: After the installation is complete, navigate to the directory where the package is installed:


cd /usr/share/java/

Step 13: Create a symbolic link to the MySQL Connector/J package so that it can be used by Java:

Command 1

sudo ln -s mysql-connector-java-8.0.26.jar mysql-connector-java.jar/

Connect Lucee with database as following :

Step 1: Install the SQL server on your Ubuntu EC2 instance. You can install either MySQL or PostgreSQL, depending on your preference.

Step 2: Install the appropriate JDBC driver for your SQL server. You can download the driver from the SQL server’s website and place it in the Lucee’s lib directory (/opt/lucee/lib).

Step 3: Open the Lucee Administrator by going to http://localhost:8888/lucee/admin/web.cfm in your web browser. and place it in the Lucee’s lib directory (/opt/lucee/lib).

Step 4: Click on “Datasource” under the “Server” section in the left-hand navigation.

Step 5: Click the “New datasource” button.

Step 6: Enter a name for your datasource, select the appropriate driver type, and enter the necessary database connection details.

Step 7: Enter a name for your datasource, select the appropriate driver type, and enter the necessary database connection details.Click the “Save” button to create the datasource.

Step 8: Once you have created the datasource, you can test it by clicking the “Verify” button. If the connection is successful, you should see a success message.

To install PHP and PHPMyAdmin, follow these steps:

Step 1: Install php using :

Command 1sudo apt install libapache2-mod-php

Step2: Restart server :

Command 1sudo systemctl restart apache2

Step 3: Check if php module is enabled :

Command 1sudo a2enmod php (use php with version like php8.x or php7.x)

Step 4: Install phpMyAdmin :

Command 1sudo apt install phpmyadmin

Step 5: Create symbolic link :

Command 1sudo ln -s /usr/share/phpmyadmin /var/www/html/phpmyadmin

Step 6: Restart the server:

 Command 1

sudo systemctl restart apache2

Trust and Worth

Our Customers

We are having a diversified portfolio and serving customers in the domains namely Sports Management, Online Laundry System, Matrimonial, US Mortgage, EdTech and so on.

Would you like to start a project with us?

DAStek team would be happy to hear from you and would love to turn your ‚ÄėImaginations to Reality‚Äô.