Variable 'general_log_file' can't be set to the value of '/var/lib/msyql/ubuntu.log'
ERROR 1231 (42000): Variable 'general_log_file' can't be set to the value of '/var/lib/msyql/ubuntu.log'
What's going on?
The simple answer is this file doesn't exist.
You type too fast. There is a typo in the file name, it should be /var/lib/mysql/ubuntu.log
.
I know this is a very old answer, but just in case someone else will be looking for an answer here.
In my case - the problem was in permissions that wasn't correct on the destination folder.
This is what helped me in a similar situation:
- Create a new folder somewhere on your machine, like so (of course, you can name the folder anything you want):
$ mkdir ~/log_files
-
Change ownership of this folder to
mysql
:
$ chown mysql: ~/log_files
-
Set the the variable
general_log_file
to the folder you just created in your mysql console, like so:
mysql> SET GLOBAL general_log_file = '~/log_files/mysql_log.log';
-
Restart mysql (terminal command can be googled for your specific setup, e.g. by searching for "bitnami mysql restart")
-
Check, if the log file exists in the folder you created in step 1
I hope it helps!