MariaDB on Windows 8 InnoDB error - mysql

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.

Related

Cannot find mysql bin file in macos

I am having a lot of problems with mysql on macos 10.14. It started with trying to reset my password. Back when I collaborated with someone in 2018 my collaborator used mysql but I did not know how to work it. I have a feeling that the password I used for mysql is not the typical password I used because my attempts to log in failed. watching this video I was told at 9:12 that the password would be set on installation but that turned out to be false. I was never asked for a password upon downloading but perhaps that is because I had part of mysql already downloaded on my computer but I did not have the workbench installed. All of my attempts to reset the password failed. So I then tried deleting mysql and redownloading. Now I am not able not to start the mysql server from mac's system preferences. But that's not my largest problem. I still cannot reset the password and hence even use the app. Following official mysql instructions I cannot reset the password because it requires the location of a pid file. It says
Stop the MySQL server if it is running. Locate the .pid file that contains the server's process ID. The exact location and name of this file depend on your distribution, host name, and configuration. Common locations are /var/lib/mysql/, /var/run/mysqld/, and /usr/local/mysql/data/.
In the folder for mysql located in /usr/local/var/mysql there is no pid file. A lot of the tutorials I've seen recommend using terminal but I cannot use terminal for mysql because I get the mysql command not found error. Ok, so to fix that problem trying this tutorial here it says:
If you’re installing MySQL using the official installer, then your MySQL bin/ folder should be located on /usr/local/bin/mysql
So now I need to find the mysql bin file but when I write ls in the /usr/local/bin folder, mysql does not come up. All of the file beginning near 'my' are
multinit
murge
nasm
So I'm stuck. I find it simply incredible that such a simple thing as resetting a password is so difficult.
Let’s say we installed MySQL version is 8.0 on our Windows OS. The bin directory is present at the following location −
C:\Program Files\MySQL\MySQL Server 8.0\bin

Why won't MySQL start on my XAMPP install?

I've been running without any problem Wordpress locally on my W10 x64 PC for over a week.
I turned on my computer this morning, opened XAMPP 3.2.4 and I am unable to start the MySQL module.
"Error: MySQL shutdown unexpectedly."
At first it says:
16:25:35 [mysql] Attempting to start MySQL service... 16:25:35
[mysql] Status change detected: running
And then this:
16:25:43 [mysql] Error: MySQL shutdown unexpectedly.
I tried changing port, reinstalling services, removing some files in the MySQL data folder (trying to follow the online guides about problems similar to mine) but nothing worked.
When I manually try to start the MySQL service I get the error 1067.
I uploaded the error log file here:
https://drive.google.com/file/d/1q-wQm5a5uChF6_6UCsfVEBFoeSvKwh2E/view?usp=sharing
It seems that you have your first warning at:
2019-11-13 14:00:05 6 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1932: Table 'mysql.gtid_slave_pos' doesn't exist in engine
Do you have a replication schema woriking? if not, you can rename master.info files to avoid replication.
Besides that you have your first error related to files access:
2019-11-13 14:10:32 0 [ERROR] InnoDB: Cannot open datafile for read-only: '.\virtualnordicdb\wp_commentmeta.ibd' OS error: 203
Can you access that file and the file has correct the write/read privileges
And Finally you have space enough in your hard drive?
019-11-13 14:20:25 0 [Note] mysqld.exe: Aria engine: starting recovery
recovered pages: 0% 10%191113 14:20:26 [ERROR] mysqld got exception 0xc0000005 ;
I was able to fix this by unistalling and reinstalling XAMPP.
I then copied the website folder back in htdocs, and finally went to "mysql>data", copied the database folder of the website and pasted the "ibdata1" file that I had before reinstalling XAMPP.
I came up with this solution thanks to this answer on another post:
https://stackoverflow.com/a/50855748/12367579
I have been to this problem thousands of times.
This problem is related to some custom things such as other programs or duplication.
I can give you several solutions:
Check Control Panel
Maybe you have installed your Xampp several times. Go there and check on the bottom. If there are too many Xampp installs, uninstall them all. Don't forget to save your xampp folder with htdocs and mysql.
Check your programs installed on pc
There are too many suspicious programs like Teamviewer or VMWare that block the port of mysql. Try to uninstall it, and install them again after finishing work with your Xampp.
Changing the port
Go to XAMPP Control Panel and near to MYSQL go to Config > my.ini
Search for port=3306, and replace all occurrences' values with 3336.
After that, go to CONFIG at the top on the right, then to Service and Port Settings, after it at MYSQL tab.
On that tab change the value of port to 3336.
After that click save and then quit your XAMPP.

During Install I can not create users, and other issues with install

Good Morning Stack Exchange!
Trying to get mysql installed on my personal computer and I've run into a few issues.
I can not create a user during install, If I try to add a user during install it fails on the create users step. So I figure I will just add the users after install via sql workbench, which brings me to number 2.
After installing mysql server, attempting to connect to the server with mysql workbench just asks me for the password endlessly until it locks me out. I know the password I'm using is correct because when I modify the mysql server instance via the installer it asks for the current root password, adn the password works there.
After install, if I stop the mysql service from running mysql workbench loads without issue.
Mysql installer can not stop the mysql service, to modify an install I have to manually stop the service.
The common thread to all of these issues is the windows service for mysql.
Troubleshooting steps
verified port 3306 was open in the firewall
disable firewall entirely
Turned off anti-virus
uninstalled anti-virus
Multiple restarts of both the service and computer
Uninstalled all my sql components and reinstalled (multiple times)
changed the root password via command shell (via This MySQL guide for recovering the root password)
Downloaded the installer again in case there was a corruption of my original file.
So I'm pretty stumped, I've been at this for two days and I don't feel any closer to a solution.
Configuration info:
windows 10 (intel core i-5, 16 gigs of ram, 96 gigs of open space on SSD)
MYSql Installer version 8.0.13.0
The first thing I would check is the logs.
However, given the info you provided it sounds like default settings are there but no root#localhost user password or root#127.0.0.1.
Check the my.ini existence for details and logs.
You may have to follow this to create the config file if it doesn’t exist - follow the link below.
https://dba.stackexchange.com/questions/21835/mysql-workbench-asking-for-password
Error log location in windows:
The error log is located in the data directory specified in your my.ini file. The default data directory location is C:\Program Files\MySQL\MySQL Server......

Issue with MySQL Server

My problem is that windows services don't have MySQL Server. How to run it?
I need to run MySQL Server on a new for me laptop. There's Windows 7. And MySQL have been installed on it. In order to verify this, I opened the Programs and Features window and saw it there:
But when I go to the Services to run it, I don't find it. It's absent there:
It's very strange for me. Why MySQL is not among the services? How can I run it? It's installed on this station.
Try performing the following steps and then check again.
Start Command Prompt (cmd)
Go to the "C:\Program Files\MySQL\MySQL Server 5.6\bin"
type mysqld --install
In my case I installed it through XAMPP so I do not have it among windows services (it has it´s own control panel), but I found this document that may help you solve this problem:
https://dev.mysql.com/doc/refman/5.1/en/windows-start-service.html
Also check the error log file which shows specific information about the start and stop of the service. In my case is called mysql_error.log and it is located under the '...mysql\data\' folder. Another document talking about that:
https://dev.mysql.com/doc/refman/5.7/en/error-log.html

Mysqld Crashes immediately on running on Windows 7...?

I am trying to run MySql 5.1 on Windows 7 Home Premium 64 bit. I have downloaded the MSI installer from the MYSql website and installed it. The installation is successful, but the service does not start.
If I try to run MySql manually using the mysqld executable, it crashes immediately on running (error: mysqld.exe has stopped working).
Earlier mysql was running on the machine, but I had some problem with it (wasn't executing big queries) and installed it again which somehow broke the program. I had installed it to work as a service which started giving me this isse, and now it won't work even if I don't install it as a service.
I have tried removing the mysql folder and re-installing. Is there somewhere else where Mysql saves configuration info or other data?
Has anyone else found this problem and solved it?
How can I find out why the process is failing to run?
Or you can try and run the mysqld.exe as administrator.
See the Debugging a MySQL Server in your MySQL reference manual.
download the noinstall (zip archive) version of MySQL corresponding exactly to the version that is already installed on your system
extract the .pdb symbols files to your existing MySQL installation's bin directory
start Dr. Watson
start mysqld-debug in standalone mode
capture the list of all moduled (i.e. loaded DLLs) with their full path from DrWatson
capture the stack trace from DrWatson
examine the MySQL log files (including mysqld.trace) to see what went on immediately prior to the crash