What is phpMyAdmin?
A database is a place where your website keeps its information in tables. phpMyAdmin is a web page that lets you work with a MySQL database by clicking, without a command line.
A query is a written instruction you send to the database. The language is called SQL. For example, you can ask, "Show me all customers from Delhi."
Open phpMyAdmin
- Log in to cPanel. Your login link is in your Hostvento welcome email.
- In the Databases section, click phpMyAdmin.
- In the left list, click the name of your database.
Run a query
- Click the SQL tab at the top.
- Type your query in the big box.
- Click Go.
- The results show below.
Useful queries
Show the first 10 rows of a table:
SELECT * FROM customers LIMIT 10;
The star means "all columns". LIMIT 10 stops after ten rows.
Find rows that match a rule:
SELECT name, email FROM customers WHERE city = 'Delhi';
This shows only the name and email of customers in Delhi.
Count rows:
SELECT COUNT(*) FROM customers;
Add a row:
INSERT INTO customers (name, city) VALUES ('Asha', 'Pune');
Change a row:
UPDATE customers SET city = 'Mumbai' WHERE name = 'Asha';
Delete a row:
DELETE FROM customers WHERE name = 'Asha';
UPDATE and DELETE without a WHERE part change or remove every row. Always include WHERE, and export a backup first using the Export tab.Use the Search tab
If you do not want to write SQL, click a table and then the Search tab. Fill in the boxes and click Go. phpMyAdmin builds the query for you.
Fix errors
- Check that quotes are closed and every query ends with a semicolon.
- Check table and column names for typos.
- Read the red message. It names the spot where the error starts.
Quick recap
- Open phpMyAdmin from cPanel and pick your database.
- Use the SQL tab, type a query and click Go.
SELECTreads,INSERTadds,UPDATEchanges,DELETEremoves.- Always use
WHEREwith changes and deletes. - Back up with Export before big changes.