I am trying to change my MySQL password. However, when I go into cmd and type the directory of my my.ini file, it tells me.
mysqld: [ERROR] Could not open required defaults file: Windows-SSD(C:)\ProgramData\MySQL\MySQL Server 5.7\my.ini
mysqld: [ERROR] Fatal error in defaults handling. Program aborted!
Please help, I am following this tutorial. I am sure that the directory is correct (I copied it).
Looks like your MySQL installation is missing my.ini file. Check if it's there.
It was a problem in 5.5 version (I'm not sure about 5.7), but you can try the solution from this this topic.
Mysql performance tuning,
when i am executing tuning-primer.sh script on cygwin on windows os that type of error occurs.
No valid socket file "/tmp/mysql.sock" found!
The mysqld process is not running or it is installed in a custom location.
If you are sure mysqld is running, execute script in "prompt" mode or set
the socket= variable at the top of this.
tuning-primer.sh script downloaded from https://launchpad.net/mysql-tuning-primer , after all i have run this script with prompt mode provide uid,pwd error is same.
any solution ?..
Note: Mysql server 5.6.14 is running on my computer. I have mysql.sock file in /var/lib/mysql/mysql.soc directory. I also link as /tmp/mysql.sock.
I have a mysql server installed on linux ubuntu and I am trying to install the keyring plugin. I have edited the my.cnf file located at /etc. The file was intially empty so I added the below content to it
[mysqld]
early-plugin-load=keyring_file.so
After doing the server restart , I ran the below query in workbench and I get zero results
SELECT PLUGIN_NAME, PLUGIN_STATUS FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME LIKE 'keyring%';
I am trying to follow this tutorial
https://dev.mysql.com/doc/refman/5.7/en/keyring-installation.html
This was resolved by having the value in the file /etc/mysql/my.cnf
I'm installing Apache server, php, and MySQL on Windows10.
First two was successful but MySQL has a problem.
I installed MySQL into C:\mysql-5.7.10-winx64, and changed my.ini like this
basedir = C:/mysql-5.7.10-winx64
datadir = C:/mysql-5.7.10-winx64/data
port = 3306
I succeeded install but if I try to start, it shows like below
C:\Windows\system32>net start mysql
The MySQL service is starting.
The MySQL service could not be started.
The service did not report an error.
More help is available by typing NET HELPMSG 3534.
However, if I check Computer Management>Event Viewer>Custom Views>Summary page events, it tells me "failed to set datadir to C:\mysql-5.7.10-winx64\data\"
If I make data folder manually, error message changed to
Can't open the mysql.plugin table
Please run mysql_upgrade to create it.." and some files are created in data folder
I tried to upgrade by typing mysql_upgrade but it failed.
mysql_upgrade: Got error: 2003: Can't connect to MySQL server on 'localhost' (10061) while connecting to the MySQL server. Upgrade process encountered error and will not continue.
How can I solve this issue?
Clear the "data" directory, then run command mysqld --initialize, and the command net start mysql, bingo!
1.For the error,
2003: Can't connect to MySQL server on 'localhost' (10061) while connecting to the MySQL server. Upgrade process encountered error and will not continue.
I ran the cmd as administrator and then go to \Program Files\MySQL\MySQL Server 5.7\bin\, and run
mysqld install
2.For the error,
C:\Program Files\MySQL\MySQL Server 5.7\bin>net start mysql
The MySQL service is starting.
The MySQL service could not be started.
The service did not report an error.
More help is available by typing NET HELPMSG 3534.
Try
mysqld --initialize
and then
net start mysql
Thanks to Athan's answer. Those combination worked for me.
I also had the same problem and I wasted hours solving the issue, but in the end this worked.
Go to you C:\ProgramData\MySQL\MySQL Server 5.7 and copy the my.ini file from there.
Go to C:\Program Files\MySQL\MySQL Server 5.7 and paste it there.
Open cmd and run net start mysql
It would work like a charm.
Explanation:
MySQL couldn't find my.ini, therefore tried to create data in Program Files... where it had no rights to do so, therefore it says access denied every time you run it.
This is old but I was running into the same problem you were seeing. I thought I'd share this answer for anyone looking. I created the data directory as you did initially and tried to start the service and got "Can't open and lock privilege tables: Table mysql.user doesn't exist." I then deleted the contents of the data directory and instead initialized the data directory by running the following command from the bin folder.
mysqld --initialize [with random root password]
mysqld --initialize-insecure [without random root password]
I had the same error, after checked this document: https://dev.mysql.com/doc/refman/8.0/en/data-directory-initialization.html
I just clear data directory and add the --console option to initialize:
bin\mysqld --defaults-file=C:\my.ini
--initialize --console
Hope this help
MySQL Server can either be run as a Program or as a Service. You cannot run both. You should stop 'mysqld' Server Program before starting 'mysqld' Server as Service.
The 'mysqld' Server Program can be stopped either by typing
'CTRL + c' or by issuing
'mysqladmin -u root -p shutdown' command and issue the password when prompted.
You need download from https://dev.mysql.com/downloads/mysql/ previous GA versions, and after that copy directory "data" to your new mysql or outher directory what you write in configfile my.ini in directory mysql-"version" .
For your error, main cause is in your my.ini setting.
Since you are installing MySQL on Windows, you should define path like:
basedir = C:\\mysql-5.7.10-winx64
datadir = C:\\mysql-5.7.10-winx64\\data
These slashes must be doubled.
Then start your MySQL service again. I guess this time would work.
And here is official document from MySQL.
This saved my life,
Just turn off the windows firewall and Give he port number correctly as 3306 as default, then restart MYSQL server . After that turn on the windows defender firewall
Just work it fine.
Looks like my solution is not added yet,
I've installed mysql80 , edited my.ini in windows notepad and got the same error like topic author "... NET HELPMSG 3534." when I start mysql service,
and my issue was in extra bytes added by notepad at the begining (EB BB BF) on my.ini, when I edited (added the same changes) my.ini in other editor everything worked fine.
I cannot get MySQL to start. It was running for months on my machine, then my machine crashed and it will not restart. In the log file I get the following error:
[ERROR] /usr/local/mysql/bin/mysqld: unknown option '--ndbcluster'
From what I have read, '--ndbcluster' is an option for running your db in clustered mode. I am not running in clustered mode, and I have not attempted to do so.
I am running MySQL 5.6.15 on OS X 10.8.3.
I deleted the MySQL install directory: /usr/local/mysql-5.6.15-osx10.7-x86_64, then reinstalled and I get the same error.
Is there some ENV variable that is causing nbcluster to be set?
Update: I installed MySQL Admin during the time between I started MySQL and the machine reset, as well as the MySQL Java libs.
Update: Based on this post there is a my.cnf somewhere (/etc/my.cnf on my Mac) that has those options. The my.cnf file on my machine is full of options about running in cluster mode including the option ndbcluster.
Removing /etc/my.conf and re-installing worked.
After I re-installed MySQL /etc/my.conf was not set.