This requires super-user privileges, most often sudo is used for this.
in order to change the owner of the files.
sudo chown -R mysql:mysql /var/lib/mysql
Restart mysql for changes
sudo service mysql restart
to which sch_portfolio belongs and what group they are in should be mysql: mysql. you will also need to restart mysql so that the changes affect
also check that the current user with access to the account had GRANT access to upgrade
The MySQL server works as user mysql , and not as the user with whom I logged in. To access files with user rights, they must belong to the user 'mysql' , since this is what works on the server. Make sure the folder and files used by mysql belong to the mysql user. These files are located in the /var/lib/mysql directory. The directory itself must also belong to 'mysql' .
Ghostman
source share