on my dev machine (Ubuntu 20.04, mysql-server 8.0.29-0ubuntu0.20.04.3) my laptop needed to be turned off, and since that mysql does not start.
I've table corruption errors like this:
2022-07-01T12:13:08.666633Z 0 [Warning] [MY-013139] [Server] Cannot load from
mysql.proxies_priv. The table is probably corrupted!
2022-07-01T12:13:08.666748Z 0 [ERROR] [MY-010316] [Server] Fatal error: Could not
read the column 'authentication_string' from table 'mysql.user'. Please perform the
MySQL upgrade procedure.
2022-07-01T12:13:08.666825Z 0 [ERROR] [MY-010952] [Server] The privilege system
failed to initialize correctly. For complete instructions on how to upgrade MySQL to
a new version please see the 'Upgrading MySQL' section from the MySQL manual.
2022-07-01T12:13:08.667187Z 0 [ERROR] [MY-010119] [Server] Aborting
I'd be happy to run mysql_upgrade, however:
The mysql_upgrade client is now deprecated. The actions executed by the upgrade client are now done by the server.
To upgrade, please start the new MySQL binary with the older data directory. Repairing user tables is done automatically. Restart is not required after upgrade.
The upgrade process automatically starts on running a new MySQL binary with an older data directory. To avoid accidental upgrades, please use the --upgrade=NONE option with the MySQL binary. The option --upgrade=FORCE is also provided to run the server upgrade sequence on demand.
It may be possible that the server upgrade fails due to a number of reasons. In that case, the upgrade sequence will run again during the next MySQL server start. If the server upgrade fails repeatedly, the server can be started with the --upgrade=MINIMAL option to start the server without executing the upgrade sequence, thus allowing users to manually rectify the problem.
It seems mysql_upgrade is not supported at this version. What can I do to solve this problem?
Thanks.
https://dev.mysql.com/blog-archive/mysql-8-0-16-mysql_upgrade-is-going-away/ says:
From MySQL 8.0.16 onwards:
Shutdown the server and install the new binaries
Start the server and let the server upgrade the data dictionary tables and system tables.
Read the article I linked to for more details.
You may have to force the MySQL Server to apply the upgrades to tables, by using mysqld --upgrade=FORCE as mentioned in the article. Another user reports having to do that here.
Related
I recently try to upgrade my MySQL server from 5.6 to 8.0. Since we cannot skip major version, I first upgraded 5.6 to 5.7. The upgrade process took a while but it was a success (windows server OS, using zip archive replacement).
However after I replaced 5.7 with 8.0 binaries and start the mysql service, it ran into error that I could not figure out what is wrong:
[System] [MY-011012] [Server] Starting upgrade of data directory.
[ERROR] [MY-013140] [Server] Unknown storage engine 'partition'
[ERROR] [MY-013140] [Server] Can't find file: '.\some_db\some_table.frm' (errno: 0 - No error)
[ERROR] [MY-013137] [Server] Can't find file: '.\some_db\some_table.frm' (OS errno: 0 - No error)
[ERROR] [MY-010348] [Server] Error in reading file .\some_db\some_table.frm
[ERROR] [MY-010758] [Server] Error in creating TABLE_SHARE from some_table.frm file.
I understand server partitions no longer supported in mysql 8, however "some_table" is a table with innodb partitioning. It is using Innodb storage engine. I do not understand why the error says 'partition' storage engine, as well as unable to find the .frm file. anyone encounter similar issue before?
For record, I found the rootcause after going thru mysql documentation again. Looks like the latest mysql 5.7 (5.7.21) does not perform partition upgrade or partition check. I have to perform below command on all affected tables prior to upgrading the server to 8.0.
ALTER TABLE some_db.some_table UPGRADE PARTITIONING;
Once this is done in all tables (very quick process, just metadata changes), the upgrade to 8.0 has no issue whatsoever. The thing that I do not understand is why later version of 5.7.x does not complete this step in mysql_upgrade, and I am not sure what was done in those partitioned tables during mysql_upgrade that took almost 2 days to complete. Maybe MySQL dev team has a reason for it, but to me this just make no sense.
I have this really strange problem.
To give you some context, I've have a script that setsup my dev env which contains mysql and percona server and some other things using brew on OSX.
I've re-runned it to do some reconfiguration that got messed up.
But after the re-run mysql won't stay up. Every time I check the mysqld pid I get a different result. I checked the mysql logs and the problem is "mysqld_safe A mysqld process already exists".
So I decided to delete everything related to mysql. I followed the gist from https://gist.github.com/vitorbritto/0555879fe4414d18569d but somehow, the mysql and mysqld process still starts after I restart my laptop.
How is this possible? Has anyone else had this problem? How do I fix it without reinstalling OSX?
So tadman was right. I managed to get my environment to work, I still don't know what that zombie process is, but because it's not affecting me, I don't care.
The problem was that my script was installing the latest version of MySQL and percona-server#5.6. and there is a conflict with InnoDB.
After reinstalling manually everything in the MySQL log there was something along the lines:
[ERROR] Plugin 'InnoDB' init function returned error.
[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
[ERROR] Unknown/unsupported storage engine: InnoDB
[ERROR] Aborting
After installing MySQL#5.6 everything seems to work as expected.
Thanks tadman.
Firstly, after first run after installation, everything works fine; but now, after hour and restart later, when I start EasyPHP Dashboard, MySQL is not running. When I try to start it, loading circle appears, then page is refreshed and MySQL is still not started - without any message. I erased Error log and directly after try to run, it writes following:
2016-05-21T08:39:32.432081Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-05-21T08:39:32.432081Z 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.
2016-05-21T08:39:32.432081Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.
2016-05-21T08:39:32.432081Z 0 [Warning] Insecure configuration for --secure-file-priv: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path.
2016-05-21T08:39:32.432081Z 0 [Note] ..\eds-binaries\dbserver\mysql5711x86x160521094439\bin\eds-dbserver.exe (mysqld 5.7.11) starting as process 1732 ...
Do you have any idea, what happens and how to solve it?
EDIT:After a few reinstalls is situation still same. Directly after installation everything works, but after easyphp is closed, MySQL never starts again. Errorlog always says, that mysql is starting process xxxx, but that process never starts.
Install MySQL Server separately don't install the MySQL that comes with EasyPHP. And the MySQL service starts at the start of Operating System, you don't need to start the service in EasyPHP.
Please note that if you want to use this installation with phpMyAdmin, you should adjust configuration of phpMyAdmin (likely your MySQL password) or alternatively you can use Database GUI tools like MySQL Workbench.
Hope this helps you. [I am using XAMPP with the same procedure. It works for me]
Have you ever installed mysql before ?
You can check in services.msc. If so, open a terminal in administrator and run sc delete mysql. mysql, in the command, must be the name of the service.
Restart, reinstall EasyPHP and it might be solved.
I'm trying to start MySQL in safe mode but the log file just keeps spitting out:
[ERROR] InnoDB: Unable to lock ./ibdata1 error: 35
[Note] InnoDB: Check that you do not already have another mysqld process using the same InnoDB data or log files.
Notes:
I've stopped all mysql processes and have checked using the ps command
I've read this having repeated trouble with MySQL and Snow Leopard - Unable to lock ./ibdata1, error: 35
Just had this issue with MAMP Pro. Couldn't stop or start MySQL. Typed ps aux | grep mysql, then kill [process id] for each line. Then I could successfully launch MySQL again from MAMP Pro.
Strange error codes, both from MySQL and the operating system, can be explained by running a shell command perror which is a part of MySQL distribution. On Linux, for example, perror 35 returns OS error code 35: Resource deadlock avoided. I do not have an OSX system handy to test, but from this:
http://www.opensource.apple.com/source/xnu/xnu-1456.1.26/bsd/sys/errno.h
I gather that error 35 is "Resource temporarily unavailable", meaning that some other process (possibly another instance of mysqld?) has already locked the file.
To debug, first I would check if there is another MySQL process running by chance (looks like you already have), and if not, reboot for good measure to make sure there are no strange stale file locks, and then try again.
Somebody has run into this error before, and found a solution:
mysql_install_db, error: 35, on a Mac OS X 10.9.1
I had a similar issue after updating MAMP from 4.x to 5.x
Unfortunately the only way that I could manage to resolve this was by manually removing all of my database files (moving them into another directory) then starting MySQL via MAMP; this seemed to work.
The files in question (for me) were in:
/Library/Application Support/appsolute/MAMP PRO/db/mysql57
All of the files in this directory (except the mysql directory) need moving somewhere else. I was then able to start MySQL.
I realise this isn't a very useful answer for most situations, but if this is a local development environment (like MAMP, as in my case) then I think losing the local databases is probably acceptable.
I have spent hours trying to get the server running (for the first time), trying many solutions posted online, but to no success.
First time install (Win 7 x64), light remains orage (server offline). If I look at service, the start/resume service remains green:
If I go in services and try start wampmysqld64 service I get this error message:
Here is the Event Viewer Application log (the WAMP mysql log is empty):
Error 11/09/2015 09:04:22 MySQL 100 None Aborting
Error 11/09/2015 09:04:22 MySQL 100 None Unknown/unsupported storage engine: InnoDB
Error 11/09/2015 09:04:22 MySQL 100 None Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
Error 11/09/2015 09:04:22 MySQL 100 None Plugin 'InnoDB' init function returned error.
Error 11/09/2015 09:04:22 MySQL 100 None InnoDB: Could not open or create the system tablespace. If you tried to add new data files to the system tablespace, and it failed here, you should now edit innodb_data_file_path in my.cnf back to what it was, and remove the new ibdata files InnoDB created in this failed attempt. InnoDB only wrote those files full of zeros, but did not yet use them in any way. But be careful: do not remove old data files which contain your precious data!
Error 11/09/2015 09:04:22 MySQL 100 None InnoDB: space header page consists of zero bytes in data file .\ibdata1
Warning 11/09/2015 09:04:22 MySQL 100 None InnoDB: Doublewrite does not have page_no=0 of space: 0
I haven't removed/deleted any files, but I did install WAMP server on my D drive (OS on C) due to space limitations).
Installing WAMPServer on the D: drive is just fine.
Possibly somehow these files have been corrupted so try deleting them.
Stop WAMPServer
Delete these files, as this is an initial install they will not have any data in them and the restart of WAMPServer should cause MYSQL to re-create them.
\wamp\bin\mysql\mysql5.6.17\data\ib_logfile0
\wamp\bin\mysql\mysql5.6.17\data\ib_logfile1
\wamp\bin\mysql\mysql5.6.17\data\ibdata1
Now for a little bug fix: Edit \wamp\bin\mysql\mysql5.6.17\my.ini
Find the section marker [wampmysqld] and change it to [wampmysqld64]
Save my.ini
Restart WAMPServer
Also if you are a little short of memory adding this parameter to the my.ini file inside the [wampmysqld64] will reduce the MYSQL memory requirement. Later versions of MYSQL seem to use a hugh amounts of memory ( half a gig ) lots of which is the table_definition_cache for MYISAM files, this will reduce it to something sensible and not effect your use of MYISAM files.
[wampmysqld64]
table_definition_cache = 600
In my case I just had to: edit \wamp\bin\mysql\mysql5.6.17\my.ini and find the section [wampmysqld] and change it to [wampmysqld64].
Then I restarted mysql and it worked!
For me, I realised that I had another MySQL program (from Oracle) installed that was causing a common port-use conflict. Uninstall/disable MySQL server/workbench and other MySQL programs then restart WAMP. This might solve the problem, it worked for me.
I also uninstalled and deleted an old version of WAMP before installing the latest version.
WAMP is a less stable platform. I would suggest XAMPP over WAMP.
It is light compared to wamp-server and much stable than WAMP.
Benefits -
XAMPP is more powerful and resource taking than WAMP.
WAMP provides support for MySQL and PHP.
XAMPP provides support for MYSQL, PHP and PERL
XAMPP also has SSL feature while WAMP doesn't.
If your applications need to deal with native web apps only, Go for WAMP. If you need advanced features as stated above, go for XAMPP.
As of priority, you cant run both together with default installation as XAMPP gets a higher priority and it takes up ports. So WAMP can't be run in parallel with XAMPP.
If mysql service is not starting open my.ini file located at C:\wamp\bin\mysql\mysql[version]\my.ini
Change port number to 3305 at 3 location:
Here:
#password = your_password
port = 3305
socket = /tmp/mysql.sock
Here:
\# The MySQL server
[wampmysqld]
port = 3305
And here:
[mysqld]
port=3305
Now go to C:\wamp\apps\phpmyadmin[version], find config.inc.php and change this line:
$cfg['Servers'][$i]['port'] = '3306';
to this:
$cfg['Servers'][$i]['port'] = '3305';
(3305 being the port you selected previously).
Those steps should get your MySQL running.