MySQL Front-End Tools and Application Connectors

MySQL uses a client-server architecture. You can administer and query a MySQL server through a graphical client such as MySQL Workbench or phpMyAdmin, through command-line tools, or from application code using a database connector.

Querying a database from different applications and updating records – SQL basics

GUI tools

MySQL Workbench

MySQL Workbench

MySQL Workbench is a desktop GUI for connections, SQL development and administration. A separate PHP/web-server installation is not required merely to use Workbench. Check the current Workbench compatibility notes when connecting to newer MySQL Server releases.

phpMyAdmin

phpMyAdmin

phpMyAdmin is a browser-based administration application written in PHP. It is commonly bundled with local development stacks and hosting control panels. Protect it like any other administrative interface: restrict access, use HTTPS and strong credentials, and avoid exposing an unnecessary public admin endpoint.

Using SQL from applications

The SQL statement is largely independent of the programming language. The connection library and result-handling APIs change.

SELECT id, name, class, mark
FROM student
ORDER BY id;

PHP with PDO

PHP and MySQL
<?php
$stmt = $dbo->query('SELECT id, name, class, mark FROM student ORDER BY id');
foreach ($stmt as $row) {
    echo htmlspecialchars($row['name']) . '<br>';
}
?>

PHP can connect through PDO or MySQLi. The removed original mysql_* extension should not be used in current applications.

Python with mysql.connector

import mysql.connector

connection = mysql.connector.connect(
    host="localhost",
    user="userid",
    password="password",
    database="database_name",
)

cursor = connection.cursor()
cursor.execute("SELECT id, name, class, mark FROM student ORDER BY id")
for row in cursor:
    print(row)

cursor.close()
connection.close()

See the Python/MySQL connection tutorial for connector setup and parameterized queries.

Java with JDBC

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;

public class MySqlExample {
    public static void main(String[] args) throws Exception {
        String url = "jdbc:mysql://localhost:3306/my_tutorial";
        try (Connection conn = DriverManager.getConnection(url, "userid", "password");
             Statement stmt = conn.createStatement();
             ResultSet rs = stmt.executeQuery("SELECT name FROM student ORDER BY id")) {
            while (rs.next()) {
                System.out.println(rs.getString("name"));
            }
        }
    }
}

Current MySQL Connector/J uses the driver class com.mysql.cj.jdbc.Driver when explicit driver loading is needed; the historical com.mysql.jdbc.Driver name should not be copied into new code.

MySQL installation · SQL introduction · SELECT · Tables and records · Excel/Access through ODBC · PHP and MySQL




Subscribe to our YouTube Channel here



plus2net.com




SQL Video Tutorials










✖
We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles Contact us
© 2000-2026 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer