S
S
shaman3602020-06-22 17:44:38
SSH
shaman360, 2020-06-22 17:44:38

Give mysql privileges to user and change sql_mode?

Good afternoon.
Essence of the question. There is a large database that is imported to a new server (Ubuntu 18, VestaCP).
On the previous server, the configuration was done for me, because. and to this day I am not competent in this matter.

It is necessary to change the sql_mode of this table so that errors like "default value" or "only_full_group_by" do not appear. I don't have superuser rights.

What I tried:
1. In PHPMYADMIN itself, in the "variables" section, I found sql mode, but the values ​​were not saved there, because I didn't have superuser rights.
2. I created a root user for mysql via SSH with a password identical to the user and its database, but when I log in to PMA under the root login and this password, I get a refusal, although the password is correct, because
3. Tried in mysql> mode, connecting via SSH to give privileges to an existing user with the command

GRANT ALL PRIVILEGES ON database_name.* TO 'database_user'@'localhost';
but got a response
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id:    1040
Current database: *** NONE ***

4. Increased max_allowed_packet to 1000M in the VESTA panel for mysql, but I also got the error from point 3.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
shaman360, 2020-06-24
@shaman360

The config has been corrected.
But here comes the next problem. When the server (not mysql service) is restarted, sql mode returns to its previous position.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question