Home Tags MySQL

Tag: MySQL

PHP MySQL Connect to Database PDO

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 =...

MySQL Commands

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...

mysqldump Backup Database and mysql Restore Database

Below are examples of backing up databases and examples of restoring database backups. Backup: mysqldump -u -p > /path/to/file.sqlRestore: mysql -u -p <...

MySQL Connect Query Select Search Insert Update Delete

MySQL Connect<?php $mysqli = new mysqli("host", "username", "password", "dbname", "port", "socket"); if($mysqli -> connect_errno) { echo "MySQL Connection Error: " . $mysqli -> connect_error; exit(); } ?>MySQL Query: If you have...
Chernihiv
clear sky
13.8 ° C
13.8 °
13.8 °
33 %
3.5kmh
0 %
Fri
14 °
Sat
21 °
Sun
24 °
Mon
16 °
Tue
13 °
Google Translator