Mysql Initializing Database error - mysql

Initializing Database Error
Error Log Beginning configuration step: Initializing Database
Attempting to run MySQL Server with --initialize-insecure option...
Starting process for MySQL Server 5.7.21...
Starting process with command: C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqld.exe --defaults-file="C:\ProgramData\MySQL\MySQL Server 5.7\my.ini" --console --initialize-insecure=on...
mysqld: Character set '0.0' is not a compiled character set and is not specified in the 'C:\Program Files\MySQL\MySQL Server 5.7\share\charsets\Index.xml' file
2018-04-02T09:44:47.468292Z 0 [Warning] option 'read_buffer_size': unsigned value 0 adjusted to 8192
2018-04-02T09:44:47.468337Z 0 [Warning] option 'read_rnd_buffer_size': unsigned value 0 adjusted to 1
2018-04-02T09:44:47.468371Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2018-04-02T09:44:47.468381Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2018-04-02T09:44:47.469610Z 0 [ERROR] Aborting
Process for mysqld, with ID 11812, was run successfully and exited with code 1.
Failed to start process for MySQL Server 5.7.21.
Database initialization failed.
Ended configuration step: Initializing Database

I got this issue when the selected port was already under use.
Changing the port (or stopping the existing service on that port) allowed me to continue from here.

Related

Error during MySQL installation - Database initialization failed

During the final step of the installation of MySQLServer (Apply Configurations), I get a strange error. I can't get it. Here's the Log :
Beginning configuration step: Initializing database (may take a long time)
Attempting to run MySQL Server with --initialize-insecure option...
Starting process for MySQL Server 8.0.31...
Starting process with command: C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe --defaults-file="C:\ProgramData\MySQL\MySQL Server 8.0\my.ini" --console --initialize-insecure=on --lower-case-table-names=1...
'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe (mysqld 8.0.31) initializing of server in progress as process 13960
mysqld: File '.\??bin.index' not found (OS errno 2 - No such file or directory)
The designated data directory C:\ProgramData\MySQL\MySQL Server 8.0\Data\ is unusable. You can remove all files that the server added to it.
Aborting
C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe: Shutdown complete (mysqld 8.0.31) MySQL Community Server - GPL.
Process for mysqld, with ID 13960, was run successfully and exited with code 1.
Failed to start process for MySQL Server 8.0.31.
Database initialization failed.
Ended configuration step: Initializing database (may take a long time)
` ` `
What's wrong here? Please help me
you need to tick Show Advanced and Logging options, and after that you will be able to change the filename of your log-in Logging Options (all of them have to be in English).

Docker - Mysql container is restarting

I am running a docker container locally on Ubuntu VM. The container is constantly getting restarted.
Logs while running pod
Error response from daemon: Container 8345404f85a30f71d18e420eb064ef2104748f1f7b6d3a is restarting, wait until the container is running
Output of docker ps
8345404f85a3 mysql:5.7.23 "docker-entrypoint.s…" 5 minutes ago Restarting (1) 29 seconds ago
POD Error logs
2020-09-23T05:00:35.302191Z 0 [Warning] option 'max_binlog_size': unsigned value 10485760000 adjusted to 1073741824
2020-09-23T05:00:35.302252Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2020-09-23T05:00:35.303732Z 0 [ERROR] Could not open file '/var/log/mysql/error.log' for error logging: Is a directory
2020-09-23T05:00:35.307546Z 0 [ERROR] Aborting
Initializing database
2020-09-23T05:01:01.866333Z 0 [Warning] option 'max_binlog_size': unsigned value 10485760000 adjusted to 1073741824
2020-09-23T05:01:01.866398Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2020-09-23T05:01:01.872326Z 0 [ERROR] Could not open file '/var/log/mysql/error.log' for error logging: Is a directory
2020-09-23T05:01:01.872464Z 0 [ERROR] Aborting
It looks like that the error cannot open file /var/log/mysql/error.log is the primary problem. Yo should check if that location exists, and the permissions on it are correct. See this for a similar case: https://support.plesk.com/hc/en-us/articles/115004039393-Unable-to-start-mysql-var-log-mysql-error-log-Permission-denied. Maybe the image expects that there is a volume mounted for logging. Is there something about that in the documentation?

MySQL 8.0.21.0 - database initialization error during installation

whatever I do I can't finish the successful MySQL installation via community installer.
I tried changing the template ini file, and my.ini file in ProgramData before hitting "Execute" button (lowercase_table_names set to both 1 and 0), but nothing seems to work.
Here's my log:
Attempting to run MySQL Server with --initialize-insecure option...
Starting process for MySQL Server 8.0.21...
Starting process with command: C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe --defaults-file="C:\ProgramData\MySQL\MySQL Server 8.0\my.ini" --console --initialize-insecure=on --lower-case-table-names=1...
'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe (mysqld 8.0.21) initializing of server in progress as process 4424
InnoDB initialization has started.
Unable to create temporary file; errno: 2
InnoDB Database creation was aborted with error Generic error. You may need to delete the ibdata1 file before trying to start up again.
Data Dictionary initialization failed.
The newly created data directory C:\ProgramData\MySQL\MySQL Server 8.0\Data\ by --initialize is unusable. You can remove it.
Aborting
C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe: Shutdown complete (mysqld 8.0.21) MySQL Community Server - GPL.
Process for mysqld, with ID 4424, was run successfully and exited with code 1.
Failed to start process for MySQL Server 8.0.21.
Database initialization failed.
Ended configuration step: Initializing database (may take a long time)

error initializing database (may take a long time) mysql server

I'm trying installing MySQL server 8.0 (with error) and then uninstall it and trying to install 5.7 instead (I read people can get it works with 5.7) and the result is the same error. I don't know about the problem cause this is my first time using MySQL to learn it and stuck at the installation process. Here's the log of the installation process:
Beginning configuration step: Writing configuration file
Saving my.ini configuration file...
Saved my.ini configuration file.
Ended configuration step: Writing configuration file
Beginning configuration step: Updating Windows Firewall rules
Adding a Windows Firewall rule for MySQL57 on port 3306.
Attempting to add a Windows Firewall rule with command: netsh.exe advfirewall firewall add rule name="Port 3306" protocol=TCP localport=3306 dir=in action=allow
Ok.
Successfully added the Windows Firewall rule.
Ended configuration step: Updating Windows Firewall rules
Beginning configuration step: Adjusting Windows service
Attempting to grant Network Service require filesystem permissions.
Granted permissions.
Adding new service
New service added
Ended configuration step: Adjusting Windows service
Beginning configuration step: Initializing database (may take a long time)
Attempting to run MySQL Server with --initialize-insecure option...
Starting process for MySQL Server 5.7.29...
Starting process with command: C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqld.exe --defaults-file="C:\ProgramData\MySQL\MySQL Server 5.7\my.ini" --console --initialize-insecure=on --lower-case-table-names=1...
2020-02-14T10:43:06.401608Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2020-02-14T10:43:06.401673Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2020-02-14T10:43:06.408061Z 0 [ERROR] InnoDB: Unable to create temporary file; errno: 0
2020-02-14T10:43:06.408344Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2020-02-14T10:43:06.408444Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2020-02-14T10:43:06.408532Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2020-02-14T10:43:06.408617Z 0 [ERROR] Failed to initialize builtin plugins.
2020-02-14T10:43:06.408711Z 0 [ERROR] Aborting
Process for mysqld, with ID 15120, was run successfully and exited with code 1.
Failed to start process for MySQL Server 5.7.29.
Database initialization failed.
Ended configuration step: Initializing database (may take a long time)
anyone knows what's the problem?

MySQL Installer Stucks on "Starting Service"

I had problem with updating my last version of MySQL, so I removed everyting and just wanted to install a refresh version of the new MySQL 5.7, The problem is that it doesn't let me to install any version of that anymore. all of them stuck on configuration on starting service. I have already tried whatever I found on google but... NOTHING.
Here is the Log:
Beginning configuration step: Stopping Server [if necessary]
Ended configuration step: Stopping Server [if necessary]
Beginning configuration step: Writing configuration file
Ended configuration step: Writing configuration file
Beginning configuration step: Updating firewall
Adding firewall rule for MySQL57 on port 3306.
Successfully added firewall rule.
Ended configuration step: Updating firewall
Beginning configuration step: Adjusting Windows service [if necessary]
Attempting to grant Network Service require filesystem permissions.
Granted permissions.
Adding new service
New service added
Ended configuration step: Adjusting Windows service [if necessary]
Beginning configuration step: Initializing Database [if necessary]
Deleting Data folder shipped
Attempting to run MySQL Server with --Initialize-insecure
Running process: C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqld.exe -- defaults-file="C:\ProgramData\MySQL\MySQL Server 5.7\my.ini" --initialize- insecure=on --console
Waiting for the server stops: C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqld.exe --defaults-file="C:\ProgramData\MySQL\MySQL Server 5.7\my.ini" --initialize-insecure=on --console
2015-12-19T18:45:25.297629Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2015-12-19T18:45:25.297629Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2015-12-19T18:45:26.485174Z 0 [Warning] InnoDB: New log files created, LSN=45790
2015-12-19T18:45:26.688242Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2015-12-19T18:45:26.797633Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: ab7fc704-a680-11e5-8978-4c0bbe100c76.
2015-12-19T18:45:26.813276Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2015-12-19T18:45:26.813276Z 1 [Warning] root#localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
Finished initialize database
Ended configuration step: Initializing Database [if necessary]
Beginning configuration step: Starting Server
Starting MySQL as a service