mysqldump --no-tablespaces -h example.com -u username -p databasename > dump.sql --set-gtid-purged=OFF
Import it
mysql -h example.com -u username -p databasename < dump.sql
-- Plugin can be 'auth_socket', 'mysql_native_password' or 'caching_sha2_password' | |
SELECT user, authentication_string,plugin,host FROM mysql.user; | |
-- Change the auth socket plugin to mysql_native_password of root user | |
ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'password'; | |
FLUSH PRIVILEGES; | |
-- Create another user that uses caching_sha2_password as plugin | |
USE mysql; | |
CREATE USER '{user}'@'localhost' IDENTIFIED WITH caching_sha2_password BY '{password}'; |
exports.handler = (event, context, callback) => { | |
const request = event.Records[0].cf.request; | |
const headers = request.headers; | |
if(request.uri == '/') { | |
if (typeof headers['accept-language'] !== 'undefined') { | |
const supportedLanguages = headers['accept-language'][0].value; | |
console.log('Supported languages:', supportedLanguages); | |
if(supportedLanguages.startsWith('en')){ | |
callback(null, redirect('/en/index.html')); | |
} else if(supportedLanguages.startsWith('ja')){ |
/****************************************************************************** | |
Balance Transfer | |
//Author Madhav Paudel | |
*******************************************************************************/ | |
#include <iostream> | |
#include<iomanip> | |
using namespace std; |
View all databases charset and collation:
SELECT SCHEMA_NAME 'database', default_character_set_name 'charset', DEFAULT_COLLATION_NAME 'collation' FROM information_schema.SCHEMATA;
View specified database charset and collation:
USE db_name;
SELECT @@character_set_database, @@collation_database;
commaSeparateNumber(event) { | |
let x, x1, x2; | |
let nStr = event.target.value + ''; | |
nStr = nStr.replace(/\D+/g, ''); | |
x = nStr.split( '.' ); | |
x1 = x[0]; | |
x2 = x.length > 1 ? '.' + x[1] : ''; | |
var rgx = /(\d+)(\d{3})/; | |
while ( rgx.test(x1) ) { | |
x1 = x1.replace( rgx, '$1' + ',' + '$2' ); |
<div class="parent"> | |
<section> | |
<h1>Center elements</h1> | |
<p>Center elements vertically or horizontally using following css</p> | |
<pre> | |
<code> | |
.parent { | |
display: flex; | |
justify-content: center; | |
align-items: center; |