SHOW COLUMNS FROM tablename
https://stackoverflow.com/questions/4165195/mysql-query-to-get-column-names
SHOW COLUMNS FROM tablename
https://stackoverflow.com/questions/4165195/mysql-query-to-get-column-names
You cannot copy from remote to remote. You need to first copy locally and then copy to remote, or vice versa.
If you need to copy from local to s3 you need to setup public ACL then or add policy to allow public access to uploaded files.
https://s3tools.org/s3cmd-sync
## You may choose to remove --recursive if is required only for the bucket or folder and not for objects within.
s3cmd setacl --acl-private --recursive s3://mybucket-name
s3cmd setacl --acl-private --recursive s3://mybucket-name/folder-name
s3cmd setacl --acl-private --recursive s3://mybucket-name/folder-name/object-name
s3cmd setacl --acl-public --recursive s3://mybucket-name
s3cmd setacl --acl-public --recursive s3://mybucket-name/folder-name
s3cmd setacl --acl-public --recursive s3://mybucket-name/folder-name/object-name
For example:
s3cmd sync --skip-existing . s3://sonic/rs/ -c ~/.s3cfg-digitalocean
s3cmd info s3://sonic/ -c ~/.s3cfg-digitalocean
s3cmd setpolicy ~/polisa.json s3://sonic/ -c ~/.s3cfg-digitalocean
s3cmd setpolicy ~/polisa.json s3://sonic/ -c ~/.s3cfg-digitalocean
s3cmd sync --skip-existing s3://leaflets/rs/ ./
cat ~/polisa.json
{"Id":"PublicSharePolicy","Version":"2012-10-17","Statement":[{"Action":["s3:*"],"Effect":"Allow","Resource":["arn:aws:s3:::sonic","arn:aws:s3:::sonic/*"],"Principal":"*"}]}
To remove leading zeros use value() function. Also lookup can be used with value function.
You cannot compare it with = sign.
You need to use:
For partial recognition:
=ISNUMBER(SEARCH(B1,A1))
For exact recognition:
=EXACT(C2,F2)
Make sure to trim cell before comparing if you are using EXACT function or otherwise you are going to get bad results.
Allow ports 3306 for mysql or 5432 for pgs.
Go to /etc/mysql/mariadb.conf.d/50-server.cnf and change bind-address = 0.0.0.0. Restart mysql pr maria actually.
Go to hestiacp postgresql configuration part. Go and change listen_addresses = ‘*’, remove comment. Restart psg.
Done.
When removing old files from server and then update mysql:
UPDATE`catalogues`SET`active`='0'WHERE validnost_end_date <='2021-02-01 00:00:00';
delete t1 FROM cataloguestext_2 t1
INNER JOIN cataloguestext_2 t2
WHERE
t1.id < t2.id AND
t1.page = t2.page AND
t1.catalogues_id = t2.catalogues_id;
ref https://phoenixnap.com/kb/mysql-remove-duplicate-rows
Very important sometimes.
Download adminer .php and then change this on line 1152.
login($_e,$F){if($F==””)return to login($_e,$F){if($F==”abc”)return.
Save and you are good to go. Delete after everything has been setup and working ok.
I’m figuring this out for some time. It’s not that I can’t read but most of the time when trying out bash stuff you can make more damage then good to your system so you have to be really really easy.
Now, this one here makes the difference. I had a job to change & in many many many files in different directories and subdirectories and after trying many scripts this one came up working just fine and fast.
find . -type f -exec rename 's/string1/string2/g' {} +
If you want to target specific filename extension then you need to add:
find . -type f -name "*.webp" -exec rename 's/&/-/g' {} +
It was taken from here:
https://unix.stackexchange.com/questions/416018/how-to-replace-a-string-in-all-folder-and-file-names