initialize git
rust\me> git init
Add remote repository
rust\me> git remote add origin https://github.com/gunabalans/webservice.git
add files to local git
F:\me\rust\me> git add .
commit with message
F:\me\rust\me> git commit -m"initial commit or any message"
force push the content to remote (means origin) repository (here mine is master)
F:\me\rust\me> git push -f origin master
rust\me> git push -f origin master
done
Step 1: go to light sail dashboards and
Step 2: Assign static ip to the instance
Step 3: create dns zone with that static ip
This will provide Name server;
Step 4: Now u can also add A record for subdomain ex: www for your domain and use @ to pint the main domain
ex: @ to point your domain.com
www to pint your www.domain.com
Step 5: now go to domain where u baught (example godaddy dashboards)
you can see the DNS >
Step 6 : Now change Name server > and add the name provided by aws
That is it; dns propagation take min 24 hrs
so it will take 24 hrs min to see the changes the url points to new aws hosting
Note:
The A record maps a name to one or more IP addresses when the IP are known and stable.
The CNAME record maps a name to another name. It should only be used when there are no other records on that name.
The ALIAS record maps a name to another name, but can coexist with other records on that name.
SET SESSION default_collation_for_utf8mb4 = 'utf8mb4_unicode_ci'
The Unicode organization has been evolving the specification over the years. Here are the mappings from its "versions" to MySQL Collations:
4.0 _unicode_
5.20 _unicode_520_
9.0 _0900_
The suffix (MySQL doc):
_bin -- just compare the bits; don't consider case folding, accents, etc
_ci -- explicitly case insensitive (A=a) and implicitly accent insensitive (a=á)
_ai_ci -- explicitly case insensitive and accent insensitive
_as (etc) -- accent-sensitive (etc)
Performance:
_bin -- simple, fast
_general_ci -- fails to compare multiple letters; eg ss=ß, so somewhat fast
... -- slower
_900_ -- (8.0) much faster because of a rewrite
From mysql:8 default collation
collation_connection utf8mb4_0900_ai_ci
collation_database utf8mb4_0900_ai_ci
collation_server utf8mb4_0900_ai_ci
So we can go with utf8mb4_0900_ai_ci
because 1. Unicode 9.0 specification
2. introduced in mydql 8
3. reported faster Performance
Step 1 - data base alter collate
ALTER TABLE tablename COLLATE 'utf8mb4_0900_ai_ci';
Run this query - this work for a session
SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';
best way is to set in mysql .cnf files
$ sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf
Below [mysqld] section add sql_mode command Example:
[mysqld]
sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'
Then validate config
sudo mysqld --validate-config
OR
sudo mysqld --defaults-file=/etc/mysql/my.cnf --validate-config
No output, then everything good.
Then
sudo service mysql restart