I'm attempting to update some variables for my MySQL database server; I am running Maria version 10.3.12 on a Windows 10 64-bit laptop. I have attempted to update the my.ini file located here:
C:\Program Files\MariaDB 10.3\data\my.ini
I am adding the following lines to a rather simple my.ini
max_allowed_packet=64M
interactive_timeout=86400
wait_timeout=86400
I have saved the changes to the my.ini; but when I restart the database server using mysqld restart at the command console, and then log back into the client, I expect to see my changes using SHOW VARIABLES LIKE 'max%' and what I end up seeing is the default value. The default value for max_allowed_packet is about 16M and for the other two it is 28800.
There are numerous articles that relate to this; having poured over them I am aware of how to use the SET command to update these from within the client. My goal though is to make a permanent change.
I have no doubt I have overlooked something; any feedback is appreciated.
You can identify path of the configuration file by looking into services:
Open services and find MariaDB Service instance
Right click and click on Properties
You should see something like "C:\path\to\exe" --defaults-file="c:\path-to-ini\my.ini"
then you can edit correct configuration file
I found the solution. After making the changes noted in my post I was attempting to restart MySQL daemon using the Windows Command line and the following command:
C:\Users\david>mysqld restart
2019-03-14 21:05:48 0 [Note] mysqld (mysqld 10.3.12-MariaDB) starting as process 8548 ...
The results can be seen below the command which is mysqld restart
MySQL being installed and run as a Service, clearly this was not the was to restart it; so I restarted it using the Services.msc:
Typing Services.msc into the search bar
Selecting Services
In the Services app find MySQL
Right clicking MySQL and selecting
Restart
This caused the my.ini file to be reread.
Beginning configuration step: Initializing Database
Attempting to run MySQL Server with --initialize-insecure option...
Starting process for MySQL Server 8.0.11...
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...
2018-06-26T08:44:42.036600Z 0 [ERROR] [MY-011071] [Server] Unknown suffix '.' used for variable 'lower_case_table_names' (value '0.0')
2018-06-26T08:44:42.036600Z 0 [ERROR] [MY-011071] [Server] C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe: Error while setting value '0.0' to 'lower_case_table_names'
2018-06-26T08:44:42.036600Z 0 [ERROR] [MY-010119] [Server] Aborting
2018-06-26T08:44:42.036600Z 0 [Note] [MY-010120] [Server] Binlog end
Process for mysqld, with ID 3232, was run successfully and exited with code 1.
Failed to start process for MySQL Server 8.0.11.
Database initialization failed.
Ended configuration step: Initializing Database
I am having this error in log during the installing of MySQL on the application configuration part.
Resolved following these steps:
- Rollback installation until initial page and choose remove mysql server
- Uninstall from add/remove programs mysql community installer
- reboot
- install version mysql-installer-web-community-5.7.22.1 and select update when it asks.
- done
This is a Bug in the Installer of 8.0.11.
There are changes in the lower_case_table_names variable in the new release. See:
https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-11.html
Nobody can fix this. If you installing the Server the configfile is write before new. Every time. So if you fix this 0.0 to 0 in my.ini the changes will be overwritten.
Somebody have to report a this bug to MySql.
EDIT:
I have report a bug to oracle:
https://bugs.mysql.com/bug.php?id=91539
The only way to get rid of this error is by allowing MySQL Installer to update when it prompts to do so at the beginning of the installation. Please note that you will get this error if you didn't allow the installer to update.
Updating lower_case_table_names = 0 in my.ini doesn't fix this because MySql will re-initialize it to 0.0 everytime before running the scripts.
If you didn't allow updates, you will need to uninstall all components of MySql and run the installer again and let it update.
First you have to uninstall mysql:
Step 1. control panel->programs and then uninstall whole mysql.
Step 2. delete folder MySQL from the following path.
C:\Program Files\MySQL
C:\Program Files (x86)\MySQL
C:\ProgramData\MySQL (your programdata folder is hidden so you have to unhide from c drive->views->options->view ->show hidden files)
4.C:\Users\hp(your pc name)\AppData\Roaming\MySQL
Step 3. windows+r write regedit.exe enter and follow the path and delete mysql Computer\HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\
Step 4. control panel->administrative tool->services then find mysql copy name then open cmd run as administrative write (sc Delete "mysql name that you copied")enter.
Now you can install MySQL
Update the installer for mysql-installer-web-community-5.7.22.1 file during the installation from the web . I encountered the same problem, after updating the installer it works correctly.
When I downgrade MySQL from 8.0.11 to 5.7.22, I encountered this error. Spend a lot of time to fix the bug. Finally, I fix this problem by the following steps:
uninstall all the related features with MySql( use Control Panel > Programs and Features)
go to C: drive, make all hidden files visible(view > hidden items), find ProgramData file
delete the MySql file inside hidden ProgramData file manually.
Make sure all the MySQL files are deleted, reinstall MySQL. It works for me. I successfully installed MySQL 5.7.22 without any problem.
My Guess: This error probably will happen if you are second or third time to install MySql server. It seems like the error happens because the old MySql files are not deleted completely. Usually, we all think that after we uninstall the application, the files are deleted from program files, it is clean, everything was done. However, there still some files hidden from us. We have to delete them by ourselves.
On bug page, last comment states that the latest installer solves this problem.
For me not. The following steps made me a clean install (after get the latest installer):
When it fails on database initialization step just cancel it back to the installer's main page where you can see installed MySQL server with a reconfigure option.
Now edit the my.ini and set the
"lower_case_table_names=0.0"
to
"lower_case_table_names=0"
Click on reconfigure and now it goes over on this problem.
Hope it helps.
I faced the same problem with 1.4.25 installer and resolved that by doing the following steps [without updating the installer]
There is a folder MySQL Installer for Windows\Manifest\Templates
In Templates folder there are few text files which are there to be used as a template during my.ini generation. I have commented out the line lower_case_table_names=
Now I execute the configuration process using installer and it executes without any error.Also I add the variable later and restart the server.
As the bug reported in https://bugs.mysql.com/bug.php?id=91476, upgrade MySQL installer to 1.4.26.0 and reinstall MySQL server would resolve the issue.
When I installed mysql server, wizard of installation was stooped at the point initializing database (if necessary) for that I did.
remove mysql folder from 'C:\ProgramData' folder. Note: ProgramData is hidden. You need to make it visible.
Uninstall mysql server if it was in the list of installed programs in control panel.
Download mysql-installer-web-community-8.0.13.0 and install it again.
I had the same problem, tried to change my.ini did't work, so I uninstalled the SQL server, then I google my operating system + Install MySQL videos (In my case "Install MySQL on Windows 8"), then I installed MySQL 5.6.26 then worked.
I think the newer MySQL doesn't support certain old operating system.
Mamp servers won't start it seems apache will but mysql won't. I really have no idea what I need to do to resolve this. Please help.
Something similar happened to me, I hope that what has helped me, will also help you.
I just upgraded MAMP from 4.06 to 4.1, and, mysteriously, it has suddenly stopped working access to phphMyAdmin, with this error:
#2002 - No such file or directory - The server is not responding (or the local server's socket is not correctly configured).
After much reading and testing, this has finally been the answer that has worked for me:
phpmyadmin - error 2002 - on Mac
Steps:
Locate config.inc.php file. You can find it in /Applications/MAMP/bin/phpMyAdmin
Edit it, using some text editor (Sublime 2, TextEdit, Text Wrangler,...)
Locate this text: $cfg['Servers'][$i]['host'] = 'localhost';
Replace localhost with 127.0.0.1
$cfg['Servers'][$i]['host'] = '127.0.0.1';
Save it and close.
Restart servers (or stop and start), or just start them.
Try to access to phpMyAdmin.
It has worked for me, I hope for you too.
Simply remove two files
ib_logfile0 and ib_logfile1 from /Applications/MAMP/db/mysql56
I researched and found 2 (rather 3) solutions for this particular issue wherein Apache would start but MySQl would not. They were
1. Changing localhost to 127.0.0.1
2. Renaming the ib_logfile# to ib_logfile_#
3. Killing existing mysqld process
While none of the above approaches worked; what worked instead was the following
Surprisingly when MAMP was installed, it did not create mysql_error_log.err file under /Applications/MAMP/logs folder. I created this file under the same directory and MySQL service turned green in MAMP window. I found this file missing when I was attempting to start MySQL service directly using the bash script 'startMysql.sh' inside /Applications/MAMP/bin
Can add another cause to the problem. Since all other answers did not work for me, I took a further look into mysql_error_log.err file at /Applications/MAMP/logs folder and found the following:
[ERROR] Another process with pid 1083 is using unix socket file.
[ERROR] Unable to setup unix socket lock file.
[ERROR] Aborting
So my guess is, that somehow there was an old process of mysql stuck while shutting down the server.
Restarting my mac solved the problem, but it should also work if you kill the named process (in my case pid 1083) with:
sudo kill -1083 PID
I am a SQL Server guy and have only recently decided to venture into the world of MySQL and have run into an issue that is preventing me from progressing :(
I have installed MariaDB and started testing the installation by running
mysqld.exe --console
and received the following error
[ERROR] InnoDB: .\ibdata1 can't be opened in read-write mode
I have done quite a bit of research on this and have not found a solution that works.
I have tried the following:
Checked the user permissions for the containing folder of ibdata1 which is located at C:\Program Files\MariaDB 10.1\data and everything looks correct.
I have tried deleting the ibdata1 and log files from the above location, stopping mysql and restarting.
I have tried repairing the application.
I have tried uninstalling and reinstalling.
None of these have worked.
Please let me know if you have any information that might help me.
This is on Windows 8, MariaDB version 10.1.13.
Thanks!
You're running MariaDB from the console interactively, which means you're running it under your local user account security context. I'm guessing the command-prompt window was not elevated first, so your security level will not grant you access to write to anything under %programfiles%.
There are two options:
Change your MariaDB configuration to store the file under %ALLUSERSPROFILE% (which is C:\ProgramData on Windows 8) or your local user account.
Run MariaDB as a background service with its own user-account (a service-identity, perhaps, if you're comfortable with that, otherwise a normal user account) with appropriate permissions.
Out of curiosity, why are you running Windows 8 instead of Windows 8.1?
MariaDB MSI installs datadirectory under C:\Program Files\MariaDB ...\data (not that different from SQLServer , where data directory is also under the installation root). During the installation you were asked if you want to install as service. Say "yes" to this, and then you won't need to start mysqld on the console window, it is already there, running as service.
Perhaps this service is already running , and thus second attempt to open the files (when you run mysqld --console) does not succeed.
the MySQL service on local computer started and then stopped. Some services stop automatically if they are not in use by other services or programs.
Can anyone resolve this issue? Thanks.
After installing it by mysqld --install. Try this mysqld --initialize. We got the same problem but it's now working.
If using version 8 and you edit the my.ini I found that Notepad is putting 3 hex characters at the beginning of the my.ini file. EF BB BF. Deleting the 3 characters from the beginning of the file in a hex editor fixes the problem.
In version 8 they are accidentally putting Unicode characters in the ini file. This is causing Notepad to save the file with Byte order mark characters.
The following line in the file is the culprit "The line # range from 1 to 2^32 − 1. “Unique” means that each ID must be different." has 3 Unicode characters. This is causing notepad to append the byte order mark to the text file.
Also remember to give NETWORK SERVICE permission to the folder:
Right-click Data folder
Select Properties
Select Security tab
Click Advanced
Click Change Permissions...
Click Add...
Type NETWORK SERVICE
Click Check Names
Click OK
Select Full Control
Click OK – four times
Start MySQL service
In my case, I tried to open a DOS prompt and
go to the MySQL bin\ directory and issue the below command:
mysqld --defaults-file="C:\Program Files\MySQL\MySQL Server 5.0\my.ini" --standalone --console
And it shows me I was missing the "C:\Program Files\MySQL\MySQL Server 5.0\Uploads" folder; I built one and problem solved.
Using Community 8.0.17, upgraded from 8.0.16
There may be a more secure way of doing this, but since I'm just running a dev box:
navigate to the \data folder
make SURE the \data folder is EMPTY. If files exist the --initialize option will fail
give SYSTEM Full Control permissions on the \data folder
go back to your command prompt
run mysqld --initialize
you should see all of the required data file structures in the data folder now. If they are not created, the mysqld process has contention or improper security to write into the folder correctly.
Now start your named service in whatever fashion you want (SC/NET/service.msc, etc)
Assuming all of the files were created properly by --initialize the service will start.
Open Service
Right click on MYSQL service
select Log on
check local system account
start service
This may be because of changing lower_case_table_names after a server has been already initialized.
From the docs:
lower_case_table_names can only be configured when initializing the
server. Changing the lower_case_table_names setting after the server
is initialized is prohibited.
The solution to this problem is to set lower_case_table_names parameter at server installation as described in the following answer:
Can't set lower_case_table_names in MySQL 8.x on Windows 10
I see this error when I install MySQL 8.x, edit the max_allowed_packet in the my.ini file, and then restart mysql on a Windows 10 machine. My recommendation, to avoid this issue, is to edit the my.ini file in a hex editor (something like Frhed). DO NOT USE NOTEPAD. It does something to the hex layout of the .ini file.
Follow the below instruction as below to save your day:
If you modify my.ini not correct, you will find the trouble "the MySQL service on local computer started and then stopped". So you need to check your my.ini in "C:\ProgramData\MySQL\MySQL Server 8.0\my.ini" again to make sure there is no strange command. If you don't know and want to restore to original, you can search on web with key word "my.ini configuration", download the latest and copy it to "C:\ProgramData\MySQL\MySQL Server 8.0\my.ini"
For whom delete the SQL service on Window or Linux, You can follow these step below:
(Window)
Delete Current Service
You need to stop MySQL80/MySQLXX in Service before carry out the action below
Open commandLine of Window and run as administrator
sc delete mysql80 <= If you use mysql80, it will delete MySQL80 in Service
sc delete mysql <= If you use "mysql --initliaze", it will delete MySQL in Service
The command mysqld --initialize just create MySQL in Service of Window or Linux
So when you check it Path Executable, it misses my.ini so you can't use you MySQL Server although MySQL Service is working
For MySQL80
"C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe" --install MySQL80 --defaults-file="C:\ProgramData\MySQL\MySQL Server 8.0\my.ini"
For MySQLXX
"C:\Program Files\MySQL\MySQL Server X.X\bin\mysqld.exe" --install MySQLXX --defaults-file="C:\ProgramData\MySQL\MySQL Server X.X\my.ini"
=> It will create MySQLXX Service working with my.ini
Then MySQL works normally and you won't need to install your MySQL again.
I don't use Linux or Mac so I can't instruct - But you can find the answer above for reference
This problem is so complicated and depend on MySQL Version.My problem was happened on MySQL 8.0.2. When I've config my.ini file on notepad and save it.I soleved following #jhersey29 solution https://stackoverflow.com/a/55519014/1764354 but little different approch.
my solution is restore my.ini file and edit config value via Option files on WorkBench Application.
workBench Menu Example
Search for services.msc and look up through your services that are running if there is a mysql service running already other than the one you want to run (it could be xampp or wamp) or another service (for example Skype) using the same port as mysql and stop the service so you can run your mysql service.
This error happened in my case when secure-file-priv was pointing to unexistent folder, make sure it exists and readable.
The line of code example in my.ini:
secure-file-priv="D:/MySQL/uploads"
Nothing was working for me but then I checked here. I ran that command qc sc mysql57 and copied the value of BINARY_PATH_NAME from it. After that I checked this and changed the value of lower_case_table_names from 0 to 2 in my.ini file. Then in the command prompt, I ran this command - << BINARY_PATH_NAME >> --install-manual. After that, I started the MySQL57 service and it worked.
You also might have accidentally added some wrong text in my.ini file. Make sure no invalid character is added at the beginning of the file.
Rename or delete the folder under,
C:\ProgramData\MySQL\MySQL Server 5.7
folder name change as per your MYSQL version number.
I had this issue after my database was working fine for long time. It turned out it was some data corruption.
In the error log I had:
2017-02-07T10:11:42.270567Z 0 [ERROR] InnoDB: Ignoring the redo log due to missing MLOG_CHECKPOINT between the checkpoint 44002250712 and the end 44002250240.
2017-02-07T10:11:42.270606Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2017-02-07T10:11:42.577436Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2017-02-07T10:11:42.577470Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2017-02-07T10:11:42.577484Z 0 [ERROR] Failed to initialize plugins.
2017-02-07T10:11:42.577488Z 0 [ERROR] Aborting
Then I had to delete the 2 ib_logfile* files, and it restarted again.
my.ini file should save as (Encoding) ANSI not UTF-8 or others files.
I have faced the same situation. I have changed the server-id=2 and when saved got this error. After a lot of research, I have found the solution.
In windows after
changing my.ini mysql configuration file, save the file as
ANSI rather than UTF-8
This has worked for me well.
another instance of mysql like 5.6 or 8 run at the same time
and the 80 port was reserved
please > go to >> services>> stop all another instance >> disable them
in my case problem solved and service started as well
Changing xampp folder's permission in windows to full control for 'authenticates user' fixed my problem.
In my case, mysqld was starting and stopping with no error message. I needed to open command prompt using "Run as Administrator", and then run mysqld.
I am only doing this for temporary development. I would not recommend running MySQL as an administrator in any case.
This was the final step after the above troubleshooting.
Delete or rename the 2 following files from "C:\ProgramData\MySQL\MySQL Server 5.7\Data":
ib_logfile0
ib_logfile1
The same problem happened with me also, nothing worked... I first deleted the service (in my case MySQL80 and MySQL) by command:
sc delete MySQL80
sc delete MySql
and then reinstalled MySQL. Mine was MySQL 8.0. And then everything was back to normal.
the MySQL service on local computer started and then stopped
This Error happen when you modified my.ini in C:\ProgramData\MySQL\MySQL Server 8.0\my.ini not correct.
You can search my.ini original configuration or checking yours to make sure everything is OK
If you came across this while installing WAMP64 on Windows 10. Check if data folder in MySQL folder is missing. My WAMP 3.2.3 version installation failed to create such a folder. So wamp icon was orange (1 of 2 services running).
A quick fix was to run this command from MySQL location.
C:\wamp64\bin\mysql\mysql5.7.31\bin\
mysqld --initialize-insecure
non of the above actually works so delete mysql,reinstall mysql,restore back if any...enjoy
I had the exact same message as displayed in the question. I have tried many suggestions with little luck. I was about to install WAMP (I'm on Windows) and was about to uninstall MySql 8.0 first, when I noticed a program included in the installation: 'MySQL Installer - Community' so I tried that. With this installer I set up a new connection, added password to root, added another user with password, set my choice of locations for all logs and ran the install.
The result was that it now totally works.
Such a problem can very often come due to configuration errors.
Vivek Sethi mentioned 20th December 2012 that it is possible to get logging in the console by running the following command:
C:\Windows\system32>"C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld" --defaults-file="C:\Program Files\MySQL\MySQL Server 5.5\my.ini" --standalone --console
Right-clicking on my service in Windows 10, I recognized the --defaults-file= parameter, and with console logging I was able to see what was wrong in my configuration. In my case the path to datadir= and secure-file-priv= was wrong. I hope others can be empowered as well by being able to see logging details in the console. Good luck!
make sure your data folder is fully empty before use command mysqld --initialize
Go to "C:\ProgramData\MySQL\MySQL Server 8.0\Data\[machine name].err" and check the last rows - it should tell you why it failed. In my case it was duplicated tablespace id between databases.
It looks like this:
2021-09-12T05:19:22.815152Z 0 [Warning] [MY-010915] [Server] '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.
2021-09-12T05:19:22.818357Z 0 [System] [MY-010116] [Server] C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe (mysqld 8.0.22) starting as process 30664
2021-09-12T05:19:22.866774Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2021-09-12T05:19:22.908983Z 1 [ERROR] [MY-012209] [InnoDB] Multiple files found for the same tablespace ID:
2021-09-12T05:19:22.911667Z 1 [ERROR] [MY-012202] [InnoDB] Tablespace ID: 124 = ['db1\accounts.ibd', 'db2\accounts.ibd']
2021-09-12T05:19:22.915514Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Failed, retry may succeed.
2021-09-12T05:19:22.918627Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine
2021-09-12T05:19:22.927714Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2021-09-12T05:19:22.930912Z 0 [ERROR] [MY-010119] [Server] Aborting
2021-09-12T05:19:22.934432Z 0 [System] [MY-010910] [Server] C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe: Shutdown complete (mysqld 8.0.22) MySQL Community Server - GPL.