A minimal server image often ships with the C locale and nothing else. Everything works until text is not plain English: Arabic becomes question marks in a log, a filename with an accent cannot be created, and sorting puts names in an order no reader recognises.
See what is set
locale
locale -a | head
If the list is only C and POSIX, no UTF-8 locale is generated on the machine.
Generate and set one
sudo apt-get install -y locales
sudo locale-gen en_US.UTF-8 ar_EG.UTF-8
sudo update-locale LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8
Log out and back in. The variables are read at login, so the shell you set them from will not show them.
The warnings that come from SSH
Messages about a locale that cannot be set usually mean your laptop is sending its own locale to a server that does not have it. Either generate that locale on the server, or stop the client sending it.
# on your machine, ~/.ssh/config
Host *
SendEnv -LANG -LC_*
The database is a separate question
A server locale does not change what MySQL stores. A column declared latin1 mangles Arabic and emoji whatever the operating system is set to - that is covered in character set and collation.