Bug #90557 | Initializing 8.0.11 fails to populate data directory and mysql system database | ||
---|---|---|---|
Submitted: | 22 Apr 2018 16:07 | Modified: | 23 Apr 2018 15:59 |
Reporter: | Muhammad Perreira | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: DML | Severity: | S2 (Serious) |
Version: | 8.0.11 | OS: | CentOS (El7) |
Assigned to: | CPU Architecture: | x86 (Linux 3.10.0-229.1.2.el7.x86_64 x86_64) | |
Tags: | initialize, MySQL |
[22 Apr 2018 16:07]
Muhammad Perreira
[22 Apr 2018 16:48]
MySQL Verification Team
You should try fix your my.cnf and comment out the query cache variables, or start mysqld with --no-defaults as the first option so that my.cnf is ignored..
[22 Apr 2018 16:49]
MySQL Verification Team
> > 2018-04-21T21:23:21.013169Z 0 [ERROR] [MY-011071] [Server] unknown variable 'query_cache_type=1' >
[22 Apr 2018 22:27]
MySQL Verification Team
Please try what Shane asked. Thanks.
[23 Apr 2018 15:10]
Muhammad Perreira
Thanks for your help! However this doesn't resolve the issue. query_cache_type has always been set to off. No defaults: $ mysqld --initialize --basedir=/home/motif/mysql8 --datadir=/home/motif/mysql8/data --tmpdir=/home/motif/mysql8/tmp --no-defaults --port=18868 --user=motif 2018-04-23T15:06:45.603500Z 0 [Warning] [MY-010140] [Server] Could not increase number of max_open_files to more than 20000 (request: 150000) 2018-04-23T15:06:45.604535Z 0 [Warning] [MY-010143] [Server] Ignoring user change to 'motif' because the user was set to 'mysql' earlier on the command line 2018-04-23T15:06:45.604736Z 0 [System] [MY-013169] [Server] /home/motif/mysql8/bin/mysqld (mysqld 8.0.11) initializing of server in progress as process 27221 2018-04-23T15:06:45.610429Z 0 [Warning] [MY-010122] [Server] One can only use the --user switch if running as root 2018-04-23T15:06:45.618192Z 0 [Warning] [MY-012364] [InnoDB] InnoDB: innodb_open_files should not be greater than the open_files_limit. 2018-04-23T15:06:47.816174Z 0 [ERROR] [MY-011071] [Server] unknown variable 'query_cache_type=1' 2018-04-23T15:06:47.816234Z 0 [Warning] [MY-010952] [Server] The privilege system failed to initialize correctly. If you have upgraded your server, make sure you're executing mysql_upgrade to correct the issue. 2018-04-23T15:06:47.816253Z 0 [ERROR] [MY-010119] [Server] Aborting 2018-04-23T15:06:49.196406Z 0 [System] [MY-010910] [Server] /home/motif/mysql8/bin/mysqld: Shutdown complete (mysqld 8.0.11) Source distribution. With defaults: $ mysqld --initialize --basedir=/home/motif/mysql8 --datadir=/home/motif/mysql8/data --tmpdir=/home/motif/mysql8/tmp --defaults-file=/home/motif/mysql8/etc/my.cnf 2018-04-23T15:05:07.180204Z 0 [Warning] [MY-010140] [Server] Could not increase number of max_open_files to more than 20000 (request: 150000) 2018-04-23T15:05:07.181477Z 0 [System] [MY-013169] [Server] /home/motif/mysql8/bin/mysqld (mysqld 8.0.11) initializing of server in progress as process 26946 2018-04-23T15:05:07.187299Z 0 [Warning] [MY-010122] [Server] One can only use the --user switch if running as root 2018-04-23T15:05:07.195284Z 0 [Warning] [MY-012364] [InnoDB] InnoDB: innodb_open_files should not be greater than the open_files_limit. 2018-04-23T15:05:09.428034Z 0 [ERROR] [MY-011071] [Server] unknown variable 'query_cache_type=1' 2018-04-23T15:05:09.428119Z 0 [Warning] [MY-010952] [Server] The privilege system failed to initialize correctly. If you have upgraded your server, make sure you're executing mysql_upgrade to correct the issue. 2018-04-23T15:05:09.428151Z 0 [ERROR] [MY-010119] [Server] Aborting 2018-04-23T15:05:10.835599Z 0 [System] [MY-010910] [Server] /home/motif/mysql8/bin/mysqld: Shutdown complete (mysqld 8.0.11) Source distribution. Basic my.cnf file: $ cat etc/my.cnf [mysqld] query_cache_type=0 port=18868 datadir=/home/motif/mysql8/data basedir=/home/motif/mysql8 max_allowed_packet=16M user=motif socket=/home/motif/mysql8/mysql.sock tmpdir=/home/motif/mysql8/tmp
[23 Apr 2018 15:19]
MySQL Verification Team
> > [ERROR] [MY-011071] [Server] unknown variable 'query_cache_type=1' > Sorry, but this is not a bug. Query cache options need to be removed now. https://mysqlserverteam.com/mysql-8-0-retiring-support-for-the-query-cache/
[23 Apr 2018 15:19]
MySQL Verification Team
furthermore, --defaults-file and --no-defaults must always be the first options provided.
[23 Apr 2018 15:37]
Muhammad Perreira
Alright, I commented query_cache_type and ran the following: $ mysqld --initialize --basedir=/home/motif/mysql8 --datadir=/home/motif/mysql8/data --tmpdir=/home/motif/mysql8/tmp --port=18868 --user=motif 2018-04-23T15:31:06.310766Z 0 [Warning] [MY-010140] [Server] Could not increase number of max_open_files to more than 20000 (request: 150000) 2018-04-23T15:31:06.311754Z 0 [Warning] [MY-010143] [Server] Ignoring user change to 'motif' because the user was set to 'mysql' earlier on the command line 2018-04-23T15:31:06.311950Z 0 [System] [MY-013169] [Server] /home/motif/mysql8/bin/mysqld (mysqld 8.0.11) initializing of server in progress as process 30225 2018-04-23T15:31:06.317626Z 0 [Warning] [MY-010122] [Server] One can only use the --user switch if running as root 2018-04-23T15:31:06.325454Z 0 [Warning] [MY-012364] [InnoDB] InnoDB: innodb_open_files should not be greater than the open_files_limit. 2018-04-23T15:31:08.730201Z 0 [ERROR] [MY-011071] [Server] unknown variable 'query_cache_type=1' 2018-04-23T15:31:08.730262Z 0 [Warning] [MY-010952] [Server] The privilege system failed to initialize correctly. If you have upgraded your server, make sure you're executing mysql_upgrade to correct the issue. 2018-04-23T15:31:08.730282Z 0 [ERROR] [MY-010119] [Server] Aborting 2018-04-23T15:31:09.923687Z 0 [System] [MY-010910] [Server] /home/motif/mysql8/bin/mysqld: Shutdown complete (mysqld 8.0.11) Source distribution. $ cat etc/my.cnf [mysqld] #query_cache_type=0 port=18868 datadir=/home/motif/mysql8/data basedir=/home/motif/mysql8 max_allowed_packet=16M user=motif socket=/home/motif/mysql8/mysql.sock tmpdir=/home/motif/mysql8/tmp This worked though: $ mysqld --no-defaults --initialize --basedir=/home/motif/mysql8 --datadir=/home/motif/mysql8/data --tmpdir=/home/motif/mysql8/tmp --port=18868 --user=motif 2018-04-23T15:30:18.478683Z 0 [System] [MY-013169] [Server] /home/motif/mysql8/bin/mysqld (mysqld 8.0.11) initializing of server in progress as process 30093 2018-04-23T15:30:20.980702Z 4 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: a9f_.lrpOK3= 2018-04-23T15:30:22.928402Z 0 [System] [MY-013170] [Server] /home/motif/mysql8/bin/mysqld (mysqld 8.0.11) initializing of server has completed So why by default is query_cache_type being called and it's been removed in MySQL 8? I only added query_cache_type=0 to my.cnf because of the error message. Thanks
[23 Apr 2018 15:42]
MySQL Verification Team
Recommend to search for other my.cnf's on your system. mysqld --help --verbose|grep "cnf" should show some locations of other my.cnf that is being read. Make sure they also don't contain query cache paraphernalia .
[23 Apr 2018 15:59]
Muhammad Perreira
@Shane Bester thanks for your help. It seems it was reading it from the system-wide v5.7 install. This can be closed now. Many thanks