Below is a sample PHP code, that after configuration, can be used to connect to your database.
<?php
$DBType = "mysql";
$DBHost = "database-host";
$DBPort = "3306";
$DBEnco =...
Some of the most important SQL commands
Connect to MySQL Server:
mysql -u UserName -p
Show Users:
SELECT user FROM mysql.user;
Show Users and Hosts:
SELECT user,host FROM mysql.user;
Change Password...
Below are examples of backing up databases and examples of restoring database backups.
Backup:
mysqldump -u -p > /path/to/file.sql
Restore:
mysql -u -p <...