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
What will you do
- Installing Mysql on AWS with Lucee
- Configure MySQL database for WordPress
- An active AWS account.
- Provisioned EC2 instance for hosting Lucee server.
- MySQL database configured on AWS RDS.
- Security group configuration to allow necessary ports.
- 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 :
sudo apt-get update
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 :
* you can go to https://download.lucee.org/ and check version accordingily.*
Step 4: Make Lucee installer executable :
chmod +x lucee-220.127.116.11-linux-x64-installer.run
Step 5: Run the installer using :
Step 6: Start the lucee server :
sudo service lucee_ctl start
Step 7: Allow incoming traffic by opening the port 8888 :
sudo ufw allow 8888/tcp
Step 8: Lucee will be installed by default in opt/lucee directory.
sudo ufw allow 8888/tcp
Step 9: You can make a simple test file and place it in:
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
sudo apt update
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 1||sudo systemctl start mysql|
Step 4: Enable the SQL server to start automatically on boot using :
|Command 1||sudo systemctl enable mysql|
Step 5: Check SQL status using :
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 1||sudo mysql -u root -p|
Step 7: Create user
|Command 1||CREATE USER ‘newuser’@’localhost’ IDENTIFIED BY ‘password’;|
Step 8: Grant permission :
|Command 1||GRANT ALL PRIVILEGES ON *.* TO ‘newuser’@’localhost’;|
Step 9: Flush the privileges to apply the changes :
|Command 1||FLUSH PRIVILEGES;|
Step 10: Exit the MySQL server :
Step 11: Install the MySQL Connector/J package using the following command:
sudo apt-get install libmysql-java
Step 12: After the installation is complete, navigate to the directory where the package is installed:
Step 13: Create a symbolic link to the MySQL Connector/J package so that it can be used by Java:
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 1||sudo apt install libapache2-mod-php|
Step2: Restart server :
|Command 1||sudo systemctl restart apache2|
Step 3: Check if php module is enabled :
|Command 1||sudo a2enmod php (use php with version like php8.x or php7.x)|
Step 4: Install phpMyAdmin :
|Command 1||sudo apt install phpmyadmin|
Step 5: Create symbolic link :
|Command 1||sudo ln -s /usr/share/phpmyadmin /var/www/html/phpmyadmin|
Step 6: Restart the server:
sudo systemctl restart apache2
Trust and Worth
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’.