MySQL could not be started - help request

16 posts / 0 new
Last post
VA3KOT
MySQL could not be started - help request

New user John, VA3KOT here. Tried to start CQRLog for first time and received error msg: "MySQL could not be started, please check if the MySQL server is installed properly". I would appreciate some help, thanks.

My OS is Mint Cinnamon 19.3. I added and installed from the repo suggested on this site. Here are the last few lines of mysql.err:

2020-02-17 13:38:18 140230047665280 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2020-02-17 13:38:18 140230047665280 [Note] InnoDB: The InnoDB memory heap is disabled
2020-02-17 13:38:18 140230047665280 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2020-02-17 13:38:18 140230047665280 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2020-02-17 13:38:18 140230047665280 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-02-17 13:38:18 140230047665280 [Note] InnoDB: Using Linux native AIO
2020-02-17 13:38:18 140230047665280 [Note] InnoDB: Using generic crc32 instructions
2020-02-17 13:38:18 140230047665280 [Note] InnoDB: Initializing buffer pool, size = 80.0M
2020-02-17 13:38:18 140230047665280 [Note] InnoDB: Completed initialization of buffer pool
2020-02-17 13:38:19 140230047665280 [Note] InnoDB: Highest supported file format is Barracuda.
InnoDB: No valid checkpoint found.
InnoDB: A downgrade from MariaDB 10.2.2 or later is not supported.
InnoDB: If this error appears when you are creating an InnoDB database,
InnoDB: the problem may be that during an earlier attempt you managed
InnoDB: to create the InnoDB data files, but log file creation failed.
InnoDB: If that is the case, please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.6/en/error-creating-innodb.html
2020-02-17 13:38:19 140230047665280 [ERROR] Plugin 'InnoDB' init function returned error.
2020-02-17 13:38:19 140230047665280 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2020-02-17 13:38:19 140230047665280 [Note] Plugin 'FEEDBACK' is disabled.
2020-02-17 13:38:19 140230047665280 [ERROR] Unknown/unsupported storage engine: innodb
2020-02-17 13:38:19 140230047665280 [ERROR] Aborting

oh1kh
MySQL could not be started - help request

Hi John!

If you have used ppa asMySQL could not be started - help request adviced in this web page (download section) please check also that apparmor does not prevent running mysql(/modifying files) in ~/.config/cqrlog/database folder.

As you do not have any qsos in log you can always delete folder ~/.config/cqrlog

Console command fro doing that:
rm -rf ~/.config/cqrlog

Then try again to start from "tabula rasa".

There has been problems with Mint and perhaps someone of Mint users can give you more precise help.

https://www.cqrlog.com/node/1938

More can be found with:
https://www.google.fi/search?q=cqrlog.com+mint+cinnamon+mysql

Unfortunately there often are no [solved]-messages sent after the problem has solved. That could help others having similar issues.

--
Saku
OH1KH

oh1kh
MySQL could not be started - help request

HI!
I really do not understand how I get so often the subject line inserted into first line of the text body.
I can not be seen in preview and once saved, it is there...

--
Saku
OH1KH

VA3KOT
MySQL could not be started

Fixed - Thank you Saku. Deleting ~/.config/cqrlog did the trick. CQRLog opened as expected when I restarted the program. Now I begin the process of learning CQRLog - it looks like a great program!
John, VA3KOT

N9HSJ
MySQL could not be started

seeing a similar problem to what John had - not sure if it is exactly the same, since deleting .config/cqrlog does not fix it.

info:
Dell Latitude E6500 running

:~$ uname -a
Linux laptop5 5.3.0-40-generic #32-Ubuntu SMP Fri Jan 31 20:24:34 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

:~$ ls -al .config/cqrlog/database
total 12
drwxrwxr-x 2 user user 4096 Mar 2 21:05 .
drwxrwxr-x 12 user user 4096 Mar 2 21:06 ..
-rw-rw-r-- 1 user user 1857 Mar 2 21:05 mysql.cnf
:~$

:~$ cqrlog

Cqrlog Ver:2.4.0 (001) Date:2019-10-27
**** DEBUG LEVEL 0 ****
**** CHANGE WITH --debug=1 PARAMETER ****

OS:
Linux version 5.3.0-40-generic (buildd@lcy01-amd64-026) (gcc version 9.2.1 20191008 (Ubuntu 9.2.1-9ubuntu2)) #32-Ubuntu SMP Fri Jan 31 20:24:34 UTC 2020
/usr/bin/mysqld
Could not open required defaults file: /home/user/.config/cqrlog/database/mysql.cnf
Fatal error in defaults handling. Program aborted
Invalid file handle
Closing ini file ...
:~$

-----------------------------------------------------
attempting to access the mysql.err file gives:

Failed to open URI “file:///home/user/.config/cqrlog/database/mysql.err”
no such file or directory

-----------------------------------------------------

:~$ cqrlog --debug=1

Cqrlog Ver:2.4.0 (001) Date:2019-10-27
**** DEBUG LEVEL 1 ****

OS:
Linux version 5.3.0-40-generic (buildd@lcy01-amd64-026) (gcc version 9.2.1 20191008 (Ubuntu 9.2.1-9ubuntu2)) #32-Ubuntu SMP Fri Jan 31 20:24:34 UTC 2020
SSL libraries:
libssl.so
libcrypto.so
Loaded 134350 LoTW users
Loaded 125829 eQSL users
Loaded 36919 SCP calls
*
User home directory: /home/user/
Program home directory: /home/user/.config/cqrlog/
Data directory: /home/user/.config/cqrlog/database/
Memebers directory: /home/user/.config/cqrlog/members/
ZIP code directory: /usr/share/cqrlog/zipcodes/
Binary dir: /usr/bin/
Share dir: /usr/share/cqrlog/
*
56 us states loaded
Grid map created
/usr/bin/mysqld
MySQLProcess.Executable: /usr/sbin/mysqld Parameters: --defaults-file=/home/user/.config/cqrlog/database/mysql.cnf
--datadir=/home/user/.config/cqrlog/database/
--socket=/home/user/.config/cqrlog/database/sock
--port=64000

Trying to connect to database
Could not open required defaults file: /home/user/.config/cqrlog/database/mysql.cnf
Fatal error in defaults handling. Program aborted
TMySQL57Connection : Server connect failed.
Trying:1
Trying to connect to database
TMySQL57Connection : Server connect failed.
Trying:2
Trying to connect to database
TMySQL57Connection : Server connect failed.
Trying:3
Trying to connect to database
TMySQL57Connection : Server connect failed.
Trying:4
Trying to connect to database
TMySQL57Connection : Server connect failed.
Trying:5
Trying to connect to database
TMySQL57Connection : Server connect failed.
Trying:6
Trying to connect to database
TMySQL57Connection : Server connect failed.
Trying:7
Trying to connect to database
TMySQL57Connection : Server connect failed.
Trying:8

:~$

any suggestions would be most welcome - have cqrlog running on my desktop machine on UbuntuStudio 18.04 but I would verymuch like to get it running on my field laptop.

Tom N9HSJ

oh1kh
MySQL could not be started

Hi Tom!

It could be some kind of security issue that prevents MYSQL accessing the ~/.config/cqrlog/database

If you have running cqrlog you could try to copy ~/.config/cqrlog/ from that PC to USB stick, then remove ~/.config/cqrlog/ from laptop and copy the one from USB stick.

PC
cp -a ~/.config/cqrlog/ /your/usb_stick

Laptop:
rm -rf ~/.config/cqrlog/
cp -a /your/usb_stick/cqrlog ~/.config/

Then check that you see all files in ~/.config/cqrlog/database and that you can open ~/.config/cqrlog/database/mysql.cnf with text editor.
If ok, try to start cqrlog.

--
Saku
OH1KH

N9HSJ
MySQL could not be started - fixed!

Thanks for the help, Saku! copying over the working files from the other computer fixed this problem.

Tom N9HSJ

vu3izv
MySQL could not be started - help request

getting an error while installing on ubuntu 22.04 LTS please check the log & help me to resolve it.

2022-09-12T19:25:39.011310Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.30-0ubuntu0.22.04.1) starting as process 15512
2022-09-12T19:25:39.061697Z 0 [Warning] [MY-013242] [Server] --character-set-server: 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
2022-09-12T19:25:39.061720Z 0 [Warning] [MY-013244] [Server] --collation-server: 'utf8mb3_bin' is a collation of the deprecated character set UTF8MB3. Please consider using UTF8MB4 with an appropriate collation instead.
2022-09-12T19:25:39.079113Z 0 [Warning] [MY-010075] [Server] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: af1bd72e-32d0-11ed-83a5-90a4de721868.
2022-09-12T19:25:39.100459Z 1 [ERROR] [MY-011011] [Server] Failed to find valid data directory.
2022-09-12T19:25:39.101312Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2022-09-12T19:25:39.101374Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-09-12T19:25:39.103676Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.30-0ubuntu0.22.04.1) (Ubuntu).

oh1kh
MySQL could not be started - help request

Hi!

That error has been here now several times with Ubuntu 22.

Cqrlog needs MariaDB. As seen in first line "[Server] /usr/sbin/mysqld (mysqld 8.0.30-0u" your system has a mysql instead.

Installing MariaDB should remove Mysql and after that Cqrlog should work.

Please try something like:

sudo apt-get install mariadb-client-10.3 mariadb-server-10.3 libmariadb3 libssl-dev libmariadb-dev-compat

to replace Mysql.

--
Saku
OH1KH

vu3izv
Getting this error after following your mentioned steps

2022-09-13T16:52:50.444176Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.30-0ubuntu0.22.04.1) starting as process 5609
2022-09-13T16:52:50.451200Z 0 [Warning] [MY-013242] [Server] --character-set-server: 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
2022-09-13T16:52:50.451214Z 0 [Warning] [MY-013244] [Server] --collation-server: 'utf8mb3_bin' is a collation of the deprecated character set UTF8MB3. Please consider using UTF8MB4 with an appropriate collation instead.
2022-09-13T16:52:50.459649Z 0 [Warning] [MY-010075] [Server] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 80997969-3384-11ed-9a53-90a4de721868.
2022-09-13T16:52:50.465860Z 1 [ERROR] [MY-011011] [Server] Failed to find valid data directory.
2022-09-13T16:52:50.466072Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2022-09-13T16:52:50.466122Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-09-13T16:52:50.466745Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.30-0ubuntu0.22.04.1) (Ubuntu).

oh1kh
Getting this error after following your mentioned steps

HI!

Did you erase old error log?
If so and those appear after you made MariDB install it tells that the install has failled and you still have
Mysql in your system.

See the lines having " [Server] /usr/sbin/mysqld (mysqld 8.0.30-0ubuntu0.22.04.1) "

Instead having "mysqld 8.0" your should see "MariaDB "

If you do not use mysql for anything else try to remove it first with packet manager (Synaptic or similar).
After that install MariaDB

--
Saku
OH1KH

KC3SWL
KC3SWL's picture
Can't locate mysql on startup

I am on Mageia 9 and am using the cqrlog binary.
I also have the same issue with locating mysql error message on the initial startup.
2024-03-30 19:57:42 0 [Note] Starting MariaDB 10.11.7-MariaDB source revision 87e13722a95af5d9378d990caf48cb6874439347 as process 6623
2024-03-30 19:57:42 0 [Warning] option 'innodb-log-buffer-size': unsigned value 1048576 adjusted to 2097152
2024-03-30 19:57:42 0 [Note] InnoDB: The first data file './ibdata1' did not exist. A new tablespace will be created!
2024-03-30 19:57:42 0 [Note] InnoDB: Compressed tables use zlib 1.2.13
2024-03-30 19:57:42 0 [Note] InnoDB: Number of transaction pools: 1
2024-03-30 19:57:42 0 [Note] InnoDB: Using generic crc32 instructions
2024-03-30 19:57:42 0 [Note] InnoDB: Using Linux native AIO
2024-03-30 19:57:42 0 [Note] InnoDB: Initializing buffer pool, total size = 80.000MiB, chunk size = 1.250MiB
2024-03-30 19:57:42 0 [Note] InnoDB: Completed initialization of buffer pool
2024-03-30 19:57:42 0 [Note] InnoDB: Setting file './ibdata1' size to 12.000MiB. Physically writing the file full; Please wait ...
2024-03-30 19:57:42 0 [Note] InnoDB: File './ibdata1' size is now 12.000MiB.
2024-03-30 19:57:43 0 [Note] InnoDB: Buffered log writes (block size=512 bytes)
2024-03-30 19:57:43 0 [Note] InnoDB: Doublewrite buffer not found: creating new
2024-03-30 19:57:43 0 [Note] InnoDB: 128 rollback segments are active.
2024-03-30 19:57:43 0 [Note] InnoDB: Setting file './ibtmp1' size to 12.000MiB. Physically writing the file full; Please wait ...
2024-03-30 19:57:43 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB.
2024-03-30 19:57:43 0 [Note] InnoDB: log sequence number 0; transaction id 3
2024-03-30 19:57:43 0 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
2024-03-30 19:57:43 0 [Note] Server socket created on IP: '0.0.0.0'.
2024-03-30 19:57:43 0 [Note] Server socket created on IP: '::'.
2024-03-30 19:57:43 0 [Warning] Can't open and lock time zone table: Table 'mysql.time_zone_leap_second' doesn't exist trying to live without them
2024-03-30 19:57:43 1 [Warning] Failed to load slave replication state from table mysql.gtid_slave_pos: 1017: Can't find file: './mysql/' (errno: 2 "No such file or directory")
2024-03-30 19:57:43 0 [Note] /usr/sbin/mysqld: ready for connections.
Version: '10.11.7-MariaDB' socket: '/home/chris/.config/cqrlog/database/sock' port: 64000 Mageia MariaDB Server
I have these installed as seen below, however I can't seem to find a mageia rpm for mariadb-server.
Any help would be great
Thanks
Chris

File: 

Chris Holladay

oh1kh
Can't locate mysql on startup

Hi!
Try to remove all ib_logfileX where X is any number, usually zero. They exist in ~/.config/cqrlog/database folder. Then start again and see if that did help.

--
Saku
OH1KH

KC3SWL
KC3SWL's picture
Can't locate mysql on startup

Hi Saku
I tried that , more than once I had those two files in the folder.
I deleted them and the error came right back here is the mysql.err log file

2024-03-31 10:02:19 0 [Note] InnoDB: Initializing buffer pool, total size = 80.000MiB, chunk size = 1.250MiB
2024-03-31 10:02:19 0 [Note] InnoDB: Completed initialization of buffer pool
2024-03-31 10:02:19 0 [ERROR] InnoDB: File ./ib_logfile0 was not found
2024-03-31 10:02:19 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2024-03-31 10:02:19 0 [Note] InnoDB: Starting shutdown...
2024-03-31 10:02:19 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2024-03-31 10:02:19 0 [ERROR] Unknown/unsupported storage engine: innodb
2024-03-31 10:02:19 0 [ERROR] Aborting
2024-03-31 10:03:20 0 [Note] Starting MariaDB 10.11.7-MariaDB source revision 87e13722a95af5d9378d990caf48cb6874439347 as process 4259
2024-03-31 10:03:20 0 [ERROR] mysqld: File '/home/chris/.config/cqrlog/database/aria_log.00000002' not found (Errcode: 2 "No such file or directory")
2024-03-31 10:03:20 0 [Warning] option 'innodb-log-buffer-size': unsigned value 1048576 adjusted to 2097152
2024-03-31 10:03:20 0 [Note] InnoDB: Compressed tables use zlib 1.2.13
2024-03-31 10:03:20 0 [Note] InnoDB: Number of transaction pools: 1
2024-03-31 10:03:20 0 [Note] InnoDB: Using generic crc32 instructions
2024-03-31 10:03:20 0 [Note] InnoDB: Using Linux native AIO
2024-03-31 10:03:20 0 [Note] InnoDB: Initializing buffer pool, total size = 80.000MiB, chunk size = 1.250MiB
2024-03-31 10:03:20 0 [Note] InnoDB: Completed initialization of buffer pool
2024-03-31 10:03:20 0 [ERROR] InnoDB: File ./ib_logfile0 was not found
2024-03-31 10:03:20 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2024-03-31 10:03:20 0 [Note] InnoDB: Starting shutdown...
2024-03-31 10:03:20 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2024-03-31 10:03:20 0 [ERROR] Unknown/unsupported storage engine: innodb
2024-03-31 10:03:20 0 [ERROR] Aborting

Thanks for your help
Chris

File: 

Chris Holladay

oh1kh
Can't locate mysql on startup

OK!
If this is the first time you start Cqrlog (I.E. no previous qsos in log) you can delete folder ~/.config/cqrlog/ to get fresh new start.
Depending on your Cqrlog version the startup offers you to save log data to local machine (yes/no), or three options: linux user folder, local machine sql server and external sql server.

In first case you can say No and create mysql user with password and grant all privileges to 'cqr%'@'%' to that user.
Then you can set (in database connect window) address: localhost, port: 3306, user and password as you created and check autoconnect and remember me.

That is the complex way. You need to know how to create SQL user
See message https://www.cqrlog.com/comment/11126#comment-11126 and from that the chapter "3)"

In second case if you have three options to choose at first start select the middle one "local machines SQL server"
Now Cqrlog tries to create the SQL user for you. It also makes backup scripts ready for backing up whole database structure because it is needed when using local SQL server (the copying ~/.config/cqrlog folder is not enough then)

Both cases you still have logs in local machine, but now in the default running SQL server, not in user folder running extra SQL server.

That is the way I have used here over 10 years.

--
Saku
OH1KH

KC3SWL
KC3SWL's picture
Can't locate mysql on startup

Hi Saku
I somehow stumbled into a solution.
This is what is now installed from mariadb. I installed lib64mariadb-devel, lib64mariadb-embedded-devel,mariadb-connect, and the error went away,
I am guessing the mariadb-connect may be the solution but since I installed it all at once I can't really tell.
Thanks for pointing out the steps for mysql. It was in doing that I found out it wasn't finding anything regardless of command.
This is what I have installed from the Mageia repo.
Screenshot below
Thanks for your help
Chris

File: 

Chris Holladay