Is there any documentation as to how my.ini gets generated ? I cannot find it in the official docs.
I have had problems with some installations having NO_ZERO_DATE in sql_mode, and others not.
I keep trying different installation options to not have NO_ZERO_DATE, but cannot manage it.
The docs state that NO_ZERO_DATE is included by default, but I just did an install on a brand-new computer, and it wasn't included. There are too many options to narrow it down without the process taking days.
Related
Due to some configuration issue, I found out that I need to change a MySQL server parameter. However, MySQL was running in Windows "Services" as "C:\MySQL\bin\mysqld MySQL" which I understand does not provide a "defaults-file".
My question is,
Is there a default "defaults file" ? I searched for any *.ini or *.cfg file and could not find any.
Is there a sample file for this version I can download somewhere ? I tried some old files but there are some compatibility issues with previous versions.
Thanks in advance
MySQL Server has "default defaults" built-in. No options file is necessary to get these defaults.
You can find all the default values for every option in the manual: https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html
It's recommended to leave the defaults alone unless you have a specific reason to change one. Then make your own edits to your local options file.
It's a good idea to add comments to the options file so you have a record of why you changed each value away from its built-in default.
I had to reinstall MySQL 5.6 on OSX 10.12.4 with Homebrew 1.1.11 (mysql#5.6 formula) and this is the first time I've seen this issue. Basically, the new install appears to be enabling the --secure-file-priv option.
The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
This is a well documented question and I've read the threads but none of them seem to speak to where Homebrew sets this option? All of the file locations mentioned don't appear for my installation of MySQL.
I just need to disable the option, I don't want to specify a specific folder. Any help is appreciated!
For anyone else that runs into this issue, you can solve the problem by placing a .my.cnf in your home directory containing:
[mysqld_safe]
[mysqld]
secure_file_priv=""
I am trying to enable federated engine in mysql.For this I try to update my.ini file but my changes are not getting reflected on restarting the mysql service. I found that no matter whatever i put in my.ini the changes don't get reflected at all.
On googling i found a bug : MySQL Bugs: #49008: Applying changes to my.ini doesn't work
Is there any workaround for this without upgrading mysql?
I'm having a problem with a MySQL UDF function (mychem.sourceforge.net) that's dependent on a large library (openbabel.org) which is in turn plugin based. The problem is that the format plugins to openbabel doesn't seem to load in MySQL 5.1 and I suspect it might be due to the plugin_dir setting. I have set plugin_dir to /usr/lib/ which is the location for both libmychem.so and libopenbabel.so as well as the directory openbabel that contains the format plugins. Is there a way to turn off the plugin_dir restriction in MySQL (preferably without compiling MySQL from sources) so that I can test this hypothesis or do you have a different idea on what might cause the problem?
All this is done on Ubuntu 10.04 (but I had the same kind of problems on 8.04, where I managed to get it working after a lot of steps that I unfortunately have forgotten...)
I have turned off apparmor during testing and it doesn't help either.
I kind of solved my problem, so here is kind of an answer to my question. It all boils down to problems with apparmour, at least for me. The problem was that I couldn't turn off the apparmor, doing so seems to leave MySQL in full-enforce mode or something. If I had apparmor in complain mode, it worked fine, and I could also modify the apparmor profile so to not complain about the specific directories (i.e. the OpenBabel shared directory).
/Fredrik
How to enable inno-db support on installed instance of MySql?
I have installed mysql-5.0.67-win32.
'InnoDB' is 'DISABLED' when executing 'show engines'.
According to documentation MySql is compiled with support of inno-db
(From doc: A value of DISABLED occurs either because the server was started with an option that disables the engine, or because not all options required to enable it were given.)
In my.ini I commented line with 'skip-innodb'. This didn't help.
All other inno-db related variables remain unchanged.
I have performed some unusual action before I experienced described situation.
I have mysql-4.0.17-win installed. I uninstall it and after this installed mysql-5.0.67-win32.
In installation wizard I chose MyISAM support only (as far as I understand I disabled inno-db support in such way. When I tried to reinstall with support of inno-db I had problems of using my previous database 'mysql' with account information).
MySQL documentation says that I should use mysqldump to export data and after this to import exported data in process of upgrade. I tried to do so, but when importing data I obtained message about syntax error (I think that it is connected with some incompatibilities of 4-th and 5-th version of mysql)
Should be enabled by default. There are some situations where wrong permissions on the MySQL lib folder cause InnoDB to bark. Check your MySQL error log for permission errors.
I do have the following innodb options in my.ini. It is a very minimal configuration, so dont' use this values if you would like mysql to have a good performance. Please restart mysql after a change of my.ini.
#*** INNODB Specific options ***
innodb_data_home_dir="C:/mysqldata/"
#skip-innodb
innodb_additional_mem_pool_size=120M
innodb_flush_log_at_trx_commit=1
innodb_log_buffer_size=16M
innodb_buffer_pool_size=10M
innodb_log_file_size=2M
innodb_thread_concurrency=8
Maybe you have inno-db disabled in the global configuration file. On Linux this would be something like /etc/mysql/my.cnf - maybe Windows has a similar global conf-file.
Make sure you are changing the correct my.ini file. On Windows this is read from many locations. The order is:
WINDIR\my.ini, WINDIR\my.cnf
C:\my.ini, C:\my.cnf
INSTALLDIR\my.ini, INSTALLDIR\my.cnf
defaults-extra-file
Type mysql --help in the command prompt to see the actual order on your computer e.g.:
Default options are read from the
following files in the given order:
C:\my.ini C:\my.cnf C:\WINDOWS\my.ini
C:\WINDOWS\my.cnf C:\Program
Files\MySQL\M ySQL Server 5.0\my.ini
C:\Program Files\MySQL\MySQL Server
5.0\my.cnf
have you checked the startup parameters? maybe the shell script or batch file that you use to start up the server disable the engine on the command line.. IIRC command line flags trumps the .ini settings.
I have resolved the problem.
In short:
I was not able to dump databases on MySql4 and restore it on MySql5 due to some strange syntactic errors when importing data.
I tried after installation to override MySql5 databases with old ones, including database 'mysql'. It works ok but I was not able to enable inno-db support. (In such way I even was able to use function PASSWORD for old passwords (instead of OLD_PASSWORD))
Since database structure of 'mysql' is changed in 5 version I tried to install MySql5 again and copied my old databases except 'mysql' one. After this I updated 'mysql' database with corrected version of exported data from 'mysql'. In such a way I obtained mysql 5 working.
After all I also executed mysqlcheck --all-databases --auto-repair
to upgrade my tables.
P.S. Thank to authors of all answers which hint me to the correct way of resolving problem.