Upgraded WampServer, now can't start MySQL - mysql

I moved my WampServer www and SQL/data to Dropbox, and WampServer was working fine like this.
I noticed I was using an old version of WampServer on my desktop, while using the latest version of WampServer on my laptop.
I uninstalled WampServer on my desktop, and installed wampserver3.0.6_x86_apache2.4.23_mysql5.7.14_php5.6.25-7.0.10 on my desktop.
I edited my.ini: datadir="D:/Dropbox/WAMP/SQL"
When I load http://localhost/phpmyadmin in my browser, I attempt to login, but receive the error:
No connection could be made because the target machine actively
refused it. — The server is not responding (or the local server's
socket is not correctly configured).
If I check C:\wamp\logs\mysql.log I see:
wampmysqld: Table 'mysql.plugin' doesn't exist
2017-04-15T11:43:23.372042Z 0 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
2017-04-15T11:43:23.373043Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2017-04-15T11:43:23.378046Z 0 [Warning] Failed to open optimizer cost constant tables
2017-04-15T11:43:23.384551Z 0 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
2017-04-15T11:43:23.386553Z 0 [ERROR] Aborting
If I look in the folder D:\Dropbox\WAMP\SQL\data\mysql, I see the files:
plugin.frm
plugin.MYD
plugin.MYI
user.frm
user.MYD
user.MYI
If I run the following in a cmd window:
C:\wamp\bin\mysql\mysql5.7.14\bin> mysql_upgrade.exe
I receive the error:
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.
If I go to System Tray > Wamp > MySQL > Version, I see only one option: 5.7.14.
If I try to start MySQL from Wamp icon, or services.msc, it won't start, and the errors above repeat.
Update: if I run http://localhost/phpmyadmin on my laptop, which uses www and SQL data in Dropbox too, phpMyAdmin produces no error, and detects the databases fine, and lists them down the left hand side.
What do I need to do from here?

Related

MySQL 8.0: Error on trying to install keyring

Using MySQL 8.0 and MySQL Workbench on Windows 10. Also using Command Prompt to interface with mysql after cd'ing into C:\Program Files\MySQL\MySQL Server 8.0\bin.
I'm trying to implement encryption data-at-rest on several tables on a database. However, after trying to install keyring_file.dll via
install plugin keyring_file soname 'keyring_file.dll';
I get the following error:
ERROR 1123 (HY000): Can't initialize function 'keyring_file'; Plugin initialization function failed.
I have added the following to my.cnf under mysqld:
[mysqld]
early-plugin-load=keyring_file.dll
keyring_file_data=C:/Program Files/MySQL/MySQL Server 8.0/lib/plugin/keyring_file
After restarting MySQL server via services.msc, I ran 'show variables like '%keyring%';' which returned the following:
Running the following:
SELECT PLUGIN_NAME, PLUGIN_STATUS FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME LIKE 'keyring%';
Also returned:
Not sure what I have done wrong or missed out. Looking at similar questions and solutions for this issue don't seem to work for some reason.
I have got the same problem, following steps resolve my issue
check error log and found the permission issue cause the problem.
create a folder "Plugin" on "C:\ProgramData\MySQL\MySQL Server 8.0" (data directory path).
copy keyring_file.dll from "C:\Program Files\MySQL\MySQL Server 8.0\lib\plugin" to "C:\ProgramData\MySQL\MySQL Server 8.0\Plugin".
set keyring_file_data=C:\ProgramData\MySQL\MySQL Server 8.0\Plugin\keyring in my.ini file.
restart the mysql service
execute mysql> install plugin keyring_file soname 'keyring_file.dll';

Unable to start mysql via XAMPP - mysql\db crashed

I have successfully been using XAMPP on my windows 10 PC to run a website that I am working on locally until today.
When I try to start MySQL, it fails. The error logs state:
mysqld.exe: Table '.\mysql\db' is marked as crashed and last (automatic?) repair failed
Fatal error: Can't open and lock privilege tables: Table '.\mysql\db' is marked as crashed and last (automatic?) repair failed
As I try to fix this, I attempted the following:
mysqlcheck --repair --use-frm --all-databases
but this gives me the following error:
Got error: 2002: Can't connect to MySQL server on 'localhost' (10061) when trying to connect
Which I guess makes sense because the mysql service isnt able to run.
I have also tried running the following from this directory: c:\xampp\mysql\data. Doing this results in an error saying 'db' doesnt exist.:
myisamchk -r db
I noticed that i have a db.MAD file that is rather large 174,616K, so not sure if that is the problem.
I ran into the same problem here is what I did:
Find and open the 'my.ini' file with Notepad. (Mine is at c:\xampp\mysql\bin\my.ini )
Insert 'skip-grant-tables' in the 'my.ini' file on a new line following the label '[mysqld]' and save. You will remove this after the problem is fixed.
Now mySQL you can start XAMPP from the control panel.
Start phpMyAdmin from your browser and select the table 'db' from the database 'mysql'
(Select 'mysql' from left panel then check 'db' in right hand panel).
Beneath from the 'With selected' dropdown, run 'analyze' (it should say that it is corrupted). Then select again and run 'repair table'.
Find the 'my.ini' file again and open with Notepad.
Remove 'skip-grant-tables' in the 'my.ini' file and save.
Problem should be fixed and you should be able to start XAMPP normally which will start MySQL normally.

MYSQL no longer starting on Mac with MAMP

Up until today MYSQL was working OK for months with 2 MAMP Drupal localhost builds.
But now MYSQL no longer loads.
When opening MAMP the Apache Server starts,
whereas the MYSQL Server does not start.
This means the "Open WebStart page" option is greyed over and the Drupal path that would normally load the site just displays an error.
Using Terminal, if I run:
which mysql
the response is:
/Applications/MAMP/Library/bin/mysql
But if I try to login into MYSQL via Terminal:
mysql -u (myuser) -p
I am prompted for the password, but after entering correct password I receive:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/Applications/MAMP/tmp/mysql/mysql.sock' (2)
I checked that path, and there is no mysql.sock file there. In that directory there is just one file titled .dummy that has no content in it.
Some forums relating to the same error suggest I check and stop any other running MYSQL instances, but I don't appear to have any.
For example I ran:
ps -ef | grep mysql
And I just receive this:
501 11212 10699 0 12:31pm ttys000 0:00.00 grep mysql
I don't entirely understand that response, but it looks like there is nothing running that I can 'kill'.
Also, if I try things like:
sudo service mysql start
I am prompted for my Mac user password, which I enter, but I am then given the error:
sudo: service: command not found
Any help here would be greatly appreciated.
EDIT: I ran:
mysqld
And received a lot of information! Too long to paste here,
but some things I noticed were:
2019-02-14T03:01:33.211495Z 0 [Note] --secure-file-priv is set to NULL.
Operations related to importing and exporting data are disabled
I don't know how to address the above, but it sounds like it's not helping the situation?
Further on from there, the first 'warning' from the list was:
[ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
I followed that advice and ran:
mysql_upgrade
and received this error:
mysql_upgrade: Got error: 2002: Can't connect to local MySQL server through socket '/Applications/MAMP/tmp/mysql/mysql.sock' (2) while connecting to the MySQL server
Upgrade process encountered error and will not continue.
Any ideas as to how to fix that?
Some other errors I noticed are:
[ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
[ERROR] Fatal error: Failed to initialize ACL/grant/time zones structures or failed to remove temporary table files.
[ERROR] Aborting
followed by a lot of lines of "shutting down plugin...(various)..." that ended in:
mysqld: Shutdown complete
Again, I am completely lost here?
After hours of trying out suggestions from various forum threads, such as:
Creating my.cnf files; or
Adjusting the MAMP php.ini file with extra code, or
Reinstalling MAMP again,or
Dumping the "ib_logfile.." files from the MAMP/db/mysql57 directory,
The only thing that finally resolved this for me was:
I suddenly remembered I copied all my working files to a backup.
so I checked the backup directories for MAMP/db/mysql57 and noticed there was a lot of content in there that for some reason was now missing from my live version,
so I deleted everything in the current MAMP/db/mysql57 directory and pasted all the backup items in.
Suddenly MAMP's MYSQL server lights up, the Startup page auto loads into my browser and I can run drush commands in my CLI and load the Drupal CMS again.
Happy Days!

mysqld unknown option '--ndbcluster'

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.

MySQL won't start on XAMPP server

I have a problem with my XAMPP server. I can start Apache, FileZilla, and every thing else without problems, but when I try to start MySQL, it just says
Attempting to start MySQL service...
and it stays like that forever, like if it was frozen or something.
Any ideas how to fix it?
I fetch the problem to start xampp services "mysqld.exe: Aria recovery failed. Please run aria_chk -r on all Aria tables and delete all aria_log.######## files"
I delete all area_log files form xampp\mysql\data
after that I restart XAMPP than it works.
Thanks
Check the log files for MySQL. You will find them in this directory:
C:\xampp\mysql\data (assuming standard install location of xampp)
Also check if no other program or service uses the default MySql port.
You can do this by using this command:
netstat -an | findstr "3306"
If anything shows up the default mysql port is in use.
In Windows, you should go: Start > Run > services.msc > Apache 2.4 > Properties > Start Mode > Automatic > Apply > Start > OK > [Same as MySQL]
I was not able to start Mysql on xampp.
Error message was:-
Aria recovery failed. Please run aria_chk -r on all Aria tables and
delete all aria_log.######## files. Plugin 'Aria' init function
returned error. Plugin 'Aria' registration as a STORAGE ENGINE failed.
Plugin 'FEEDBACK' is disabled. Aria engine is not enabled or did not
start. The Aria engine must be enabled to continue as mysqld was
configured with --with-aria-tmp-tables. Aborting.
Just to go xampp/mysql/data and delete or remove the file related to aria_log and restart your xampp server.
Worked fine for me.
Resolve the issue stopping the mysql process in the activity monitor and then restarting the mysql server from within the xampp UI.
Go to the error log and check. For me I got this error message:
InnoDB: Error: could not open single-table tablespace file .\mysql\innodb_index_stats.ibd
InnoDB: We do not continue the crash recovery, because the table may become
InnoDB: corrupt if we cannot apply the log records in the InnoDB log to it.
InnoDB: To fix the problem and start mysqld:
InnoDB: 1) If there is a permission problem in the file and mysqld cannot
InnoDB: open the file, you should modify the permissions.
InnoDB: 2) If the table is not needed, or you can restore it from a backup,
InnoDB: then you can remove the .ibd file, and InnoDB will do a normal
InnoDB: crash recovery and ignore that table.
InnoDB: 3) If the file system or the disk is broken, and you cannot remove
InnoDB: the .ibd file, you can set innodb_force_recovery > 0 in my.cnf
InnoDB: and force InnoDB to continue crash recovery here.
So what I did was I went to the mysql folder and deleted the data1idb file. After that it worked fine. The problem started when I installed Drupal.
Perform
which mysql.server
sudo path/to/mysql.server start
This should work on *nix OS
eg sudo /Applications/XAMPP/xamppfiles/bin/mysql.server start for mac osx
In The xampp folder you should find the start mysql batch file. Run it, The firewall might ask if you want to allow it through ( So check your firewall if it lets mysqld.exe through )
OP did not provide enough information, however this (and other errors) can be caused by the default MySQL port (3306) being used. If this is the case, you can solve it like this:Go to: XAMPP Control Panel -> MySQL: "Config" button -> my.ini Change the port number from 3306 to a different valid port number. I just used 3307.You can find out more information about your problem by looking at the error log file. This is found here: XAMPP Control Panel -> MySQL: "Logs" button -> mysql_error.log
Running the "setup_xampp.bat" file located in the root directory of Xampp did the trick for me.
Though this is late, I'm sure it would help someone in future.
First run which mysql.server to know where mysql is located on your machine. After then run sudo /usr/local/bin/mysql.server stopto be sure that no other mysql process is running. If no other process is running, you would definitely get an error saying MySQL server PID file could not be found!. That's fine.
After then run sudo /Applications/XAMPP/xamppfiles/bin/mysql.server start to start Xampp's mysql server. When you go to the Xampp GUI, you should see that mysql status as running.
Please note that this is for OS X users.
I face same issue. I installed xampp in D drive.
I uninstall and install setup as run as administrator. Again face same issue.
I searched and try lot of suggestion but no luck.
I solve the problem by right click on xampp and open as Administrator and xampp start working fine.
I was not able to start MySQL service. When I checked mysql log it said:
[ERROR] mysqld: File 'C:\xampp\mysql\data\aria_log_control' not found (Errcode: 13 "Permission denied")
[ERROR] mysqld: Got error 'Can't open file' when trying to use aria control file 'C:\xampp\mysql\data\aria_log_control'
I checked suggested location in the log and file was present.
I found I was doing silly mistake, Since UAC is activated in my PC, I had to start XAMPP using "Run As Administrator".
It worked fine for me.