By editor, 27 June, 2016 MySQL Recover / Change root Password Tags Server Shell Database 1. Stop the MySQL service of started sudo /etc/init.d/mysql stop #On Debian based linux systems (Ubuntu, Mint ...) sudo /etc/init.d/mysqld stop #On Red Hat Enterprise based Linux systems (CentOS, Fedora, Suse ...)
By Anonymous (not verified), 10 June, 2016 Database Basic Examples (Select, Merge, Insert ...) Tags Drupal 8 Code Database Drupal 9 Select: $con = \Drupal\Core\Database\Database::getConnection(); $query = $con->select('table_name', 't') ->fields('t', ['field_1', 'field_2']);
By editor, 30 January, 2016 Mysql Database Backup / Restore Syntax Tags Server Shell Database Syatax (Usually used) mysqldump --host=IP-OR-HOST --user=USERNAME --password=PASSWORD database_name > database_name.sql mysqldump -h IP-OR-HOST -u USERNAME -pPASSWORD database_name > database_name.sql
By editor, 12 January, 2016 Set the initial Auto Increment value Tags Drupal 8 Code Database Example: $con = Drupal\Core\Database\Database::getConnection(); $start_value = 100000; $query = "ALTER TABLE {the_table} AUTO_INCREMENT = $start_value"; $con->query($query);
By editor, 8 December, 2015 Database LIKE condition Tags Drupal 8 Database Code The like condition syntax is: $query->condition('field_name', "%" . $query->escapeLike("The string") . "%", 'LIKE'); Example:
By editor, 7 December, 2015 Drupal Mysql / Database Data types Tags Drupal 8 Database Drupal 7 Link : https://www.drupal.org/node/159605
By editor, 28 November, 2015 Database Merge, Insert or Update if exist. Tags Drupal 8 Database Merge SQL data base: Insert field or update if exist