Connecting to a Remote mySQL Database

Enter a valid username+password and connect to a remote computer.

username: password:

create a database, and then create a table

You can run a simulation of this on your desktop by using WAMP. With wamp, you run a simulation of phpMyAdmin. In other words, you can test your program before uploading it onto a real remote server. What is phpMyAdmin? It is a small content management system (CMS) that gives you a variety of perspectives on database and table managment. You can create a new database and within that database, you can create tables.

writing a connection string

The connection string is a bit of php code. It contains the security keys to unlock the targeted remote computer. So basically, the connection string is designed to target a destination, send a key to that destination, and request it's data.

using html forms

html forms are the most common way of conversing with a remote host. With a form, you can enter different types of data, and then send the data to the remote host. Sending data means that you are targetting specific locations to store the data. So after stating specifically where you want to store the information, you can pass the information over a very long distance and store it in a remote server.

using tables

Data is stored in table structures. However, an html table is different. The job of an html table is not to store the data, but merely to present it in a superficial form.

The task of every php developer is to write SQL strings that are smart. You need to access tables and retrieve particular rows. A table could have a thousand rows, but you only need the information of one particular row. How do you find one row out of a thousand?

SQL strings

SQL strings are strings of code. These codes are executed by the browser. The browser scans the page, and if if there is an SQL string embedded, then that string will be executed, and typically the result is the retrieval of data, and then it's presentation in a more superficial form.

Most SQL strings are written with an awareness of two different table types. The first type of table is what most people know, which is an html table. The second type is a mySQL table which contains data that is locked securely within a remote host. An SQL string is going to access a specific table, looking for a specific row.

Sometimes an SQL string will be designed to access a specific table row. Other times, it is designed to access many rows at once. An entire table that consists of 50 rows could be retrieved (each and every row copied and stored) and spit back onto the screen of the clients computer.

Video Tutorials

Creating Databases in CPanel

A demo that assumes you understand a CMS and what cpanel is.

Connection settings for MySQL databases

If you will be connecting to your database remotely, check out this article about remote connection settings:

Welcome to phpMyAdmin

Useful tutorials on using phpMyAdmin are here.