DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Last call! Secure your stack and shape the future! Help dev teams across the globe navigate their software supply chain security challenges.

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Releasing software shouldn't be stressful or risky. Learn how to leverage progressive delivery techniques to ensure safer deployments.

Avoid machine learning mistakes and boost model performance! Discover key ML patterns, anti-patterns, data strategies, and more.

Related

  • An Overview of Health Check Patterns
  • Troubleshooting Connection Issues When Connecting to MySQL Server
  • How to Repair Corrupt MySQL Database Tables Step-by-Step
  • Harnessing the Power of AWS Aurora for Scalable and Reliable Databases

Trending

  • A Developer's Guide to Mastering Agentic AI: From Theory to Practice
  • Grafana Loki Fundamentals and Architecture
  • Ensuring Configuration Consistency Across Global Data Centers
  • Unlocking AI Coding Assistants Part 1: Real-World Use Cases
  1. DZone
  2. Data Engineering
  3. Databases
  4. JDBC Connection Pool In Payara Using phpMyAdmin (MySQL)

JDBC Connection Pool In Payara Using phpMyAdmin (MySQL)

In this article, we will learn how to create a JDBC connection pool in PHPMyAdmin.

By 
Hitanshi Mehta user avatar
Hitanshi Mehta
·
Jun. 28, 19 · Tutorial
Likes (3)
Comment
Save
Tweet
Share
12.5K Views

Join the DZone community and get the full member experience.

Join For Free

Introduction

In this article, we will learn how to create a JDBC connection pool in phpMyAdmin.

Step:1

Go to the database and create a new database. (I have created a database and table for your reference, you can use your own database and tables.)  

Step:2

In StudentDB, create a table tblStudent.

Step:3

Generate the structure of the table.

Step:4

For opening the Payara server, we have two options.

1) Go to netbeans>Services>Payara server>View Domain Admin Console

2) Go to any web browser (chrome, firefox, etc.)>Enter URL>http://localhost:4848/

(By default, the port number for Payara is 4848. If you have changed the port number of Payara Server, then use that port number)

Step:5

Once Payara is open, go to Resources>JDBC>JDBC connection pool>New   

Step:6

Pool Name: You can provide any name.

For Resource type and Database Driver Vendor, you need to check the version: MySQL-connector-java.

A path for MySQL -connector-java: (path where you have installed the payara) >payara5>glassfish>domains>domain1>lib

If a version of MySQL-connector-java is less than 8, then use:

Resource Type: javax.sql.DataSource

Database Driver Vendor: MySql

If the version of MySQL-connector java is 8 or higher then use:

Resource Type: javax.sql.PoolDataSource

Database Driver Vendor: MySql

Once you click next, the second textbox of Database Driver Vendor will become writable.

In second textbox of DatabaseDriver Vendor write: com.mysql.cj.jdbc.MysqlDataSource.

Don't forget to check Introspect. It will give a long list of the property, but not checking introspect will give an error during ping.  

Step:7

Click next and scroll down. There will be a long list of properties for which you have to set the following property.

We need to add one property:

1) driverClass: com.mysql.jdbc.Drive.

You can sort property for faster access using two triangles. (Highlighted in the screenshot).

2) Password: It is your phpMyAdmin password (Setting password is compulsory. If your phpMyAdmin has a null password, set a password of phpMyAdmin.)

3) User: It is a username of phpMyAdmin.

4) Port: Port number of phpMyAdmin. In most cases, it is 3306.

5) ServerName: It is phpMyAdmin serverName.

6) DatabaseName: Provide a database name for which you are creating a connection pool.

7) URL: You can manually specify a URL or, as an alternative, you can perform steps 8 and 9.    

Step: 8 (Optional)

Go to netbeans>services>Database>MysqlServer>Right click>connect

Step: 9 (Optional)

Select the database>Right click>connect.

One URL for a specific database will be created.

Copy until the name of the database and paste it into the URL, Url, url property.

Step:10

Once all properties are set, click finish.

Click Save>New value successfully saved message will be shown.

Click ping>Ping succeeded.

Ping succeeded means a connection pool is created successfully. 

Step:11

Once the connection pool has succeeded, create a new JDBC resource>new.   

Step:12

JNDI Name: Provide any JNDI name. Pool Name: Select the pool we have created. Click OK.

A connection pool has been created! If you have any doubts or questions, feel free to ask in the comments section!

Connection pool PhpMyAdmin Connection (dance) Database MySQL

Opinions expressed by DZone contributors are their own.

Related

  • An Overview of Health Check Patterns
  • Troubleshooting Connection Issues When Connecting to MySQL Server
  • How to Repair Corrupt MySQL Database Tables Step-by-Step
  • Harnessing the Power of AWS Aurora for Scalable and Reliable Databases

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: