MySQL does not start in XAMPP 1.7.3 for Windows - mysql

In 2000 I had installed XAMPP 1.7.3 on my Windows 7 64 Bit machine in F:/xampp. I always started the XAMPP Control Panel Application from this folder, clicked on the "Start" buttons for the MySQL and the Apache so it looked like this:
https://docs.moodle.org/19/de/images_de/e/e6/29_Apache_Stop-de.png
I recently decided to install the XAMPP 5.6.3 version to F:/xampp2. I imported another database and working on this new database was fine.
However, for some reason I cannot start the MySQL server in the F:/xampp any more. The Apache server does start. But when I click on the "Start" button in the XAMPP Control Center the text "Running" flashes up in green for a second (see linked picture above) and vanishes again. Nothing happens. In (this version 2.5.8 of) the Control Panel no additonal info is displayed in the log.
I tried everything to avoid a duplicate posting:
The other Mysql server in F:/xampp2 not running. The Port Check function of the Control Panel says 3306 is free.
Skype is not running.
There is no mysqld.exe in the Windows Task Manager
Checked services.msc - there is nothing running related to MySQL.
I ran netstat in a command line and there was no sign of 3306 anywhere.
I changed 3306 to 3307 in the f:/xampp/mysql/bin/my.ini. Nothing!
There are many threads like this one and I tried everything except to "delete and reinstall". I cannot delete F:/xampp - I have 500 GB and 500 tables of data in the F:/xampp MySQL database that my life depends on. I do not even want to touch the data in there and risk any loss. I cannot delete F:/xampp2 either. What can I do?
Thanks!
EDIT: I tried the following in the commandline:
f:\xampp\mysql\bin\mysqld.exe
150602 6:03:24 [Warning] Can't create test file \usr\local\mysql\data\MY-PC.lower-test
150602 6:03:24 [Warning] Can't create test file \usr\local\mysql\data\MY-PC.lower-test
f:\xampp\mysql\bin\mysqld.exe: Can't change dir to '\usr\local\\mysql\data\' (Errcode: 2)
150602 6:03:24 [ERROR] Aborting
150602 6:03:24 [Note] f:\xampp\mysql\bin\mysqld.exe: Shutdown complete
EDIT 2: I looked for the mysql.err file in f:\xampp\mysql\data.
150602 7:04:01 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: Error: log file \xampp\mysql\data\ib_logfile0 is of different size 0 5242880 bytes
InnoDB: than specified in the .cnf file 0 1073741824 bytes!
150602 7:04:01 [ERROR] Plugin 'InnoDB' init function returned error.
150602 7:04:01 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
150602 7:04:01 [ERROR] F:\xampp\mysql\bin\mysqld.exe: unknown variable 'innodb_file_format=barracuda'
150602 7:04:01 [ERROR] Aborting
150602 7:04:01 [Note] F:\xampp\mysql\bin\mysqld.exe: Shutdown complete
EDIT 3: Thanks for your comment, I tried the following but it there are other errors:
f:\xampp\mysql\bin\mysql --help
gives me inter alia:
Default options are read from the following files in the given order:
C:\Windows\my.ini C:\Windows\my.cnf C:\my.ini C:\my.cnf f:\xampp\mysql\my.ini f:\xampp\mysql\my.cnf
then i try this line and I know that the my.ini file is there:
f:\xampp\mysql\bin\mysqld.exe --defaults-extra-file=F:\xampp\mysql\bin\my.ini
150602 14:39:21 [ERROR] Can't find messagefile '\xampp\mysql\share\english\errmsg.sys'
150602 14:39:21 [Warning] Can't create test file \xampp\mysql\data\MY-PC.lower-test
150602 14:39:21 [Warning] Can't create test file \xampp\mysql\data\MY-PC.lower-test
f:\xampp\mysql\bin\mysqld.exe: Can't change dir to '\xampp\mysql\data\' (Errcode: 2)
150602 14:39:21 [ERROR] Aborting

Open a command prompt - press Win key + R and type in cmd.
In the command prompt type in F:\xampp\mysql\bin\mysqld.exe and press Enter. (note it is mysqld with a d in the end)
What do you see? There should be an error, possibly regarding your config file.
EDIT:
Try using:
F:\xampp\mysql\bin\mysqld.exe --defaults-extra-file=F:\path\to\config

Related

MySQL 8.0.28 is not allowing validate_password variables in /etc/my.cnf

I have looked but don't see a similar issue anywhere.
Server OS is Red Hat Linux 8
MySQL version 8.0.28
This section of the my.cnf file issues errors when I try to start mysqld:
validate_password.check_user_name=1
validate_password.dictionary_file=/usr/share/dict/words
validate_password.length=30
validate_password.mixed_case_count=1
validate_password.number_count=1
validate_password.policy=2
validate_password.special_char_count=1
password_reuse_interval=3650
checking my.cnf with mysqld and the --validate-config option:
> mysqld --defaults-file=/etc/my.cnf --validate-config
2022-06-16T13:46:46.323049Z 0 [ERROR] [MY-000067] [Server] unknown variable 'validate_password.dictionary_file=/usr/share/dict/words'.
2022-06-16T13:46:46.323088Z 0 [ERROR] [MY-010119] [Server] Aborting
That is after I commented out the check_user_name line in the my.cnf
The component_validate_password component is loaded.
This my.cnf works with 8.0.26!
Any ideas on what I can try to make this work?
Thanks in advance.

error initializing database (may take a long time) mysql server

I'm trying installing MySQL server 8.0 (with error) and then uninstall it and trying to install 5.7 instead (I read people can get it works with 5.7) and the result is the same error. I don't know about the problem cause this is my first time using MySQL to learn it and stuck at the installation process. Here's the log of the installation process:
Beginning configuration step: Writing configuration file
Saving my.ini configuration file...
Saved my.ini configuration file.
Ended configuration step: Writing configuration file
Beginning configuration step: Updating Windows Firewall rules
Adding a Windows Firewall rule for MySQL57 on port 3306.
Attempting to add a Windows Firewall rule with command: netsh.exe advfirewall firewall add rule name="Port 3306" protocol=TCP localport=3306 dir=in action=allow
Ok.
Successfully added the Windows Firewall rule.
Ended configuration step: Updating Windows Firewall rules
Beginning configuration step: Adjusting Windows service
Attempting to grant Network Service require filesystem permissions.
Granted permissions.
Adding new service
New service added
Ended configuration step: Adjusting Windows service
Beginning configuration step: Initializing database (may take a long time)
Attempting to run MySQL Server with --initialize-insecure option...
Starting process for MySQL Server 5.7.29...
Starting process with command: C:\Program Files\MySQL\MySQL Server 5.7\bin\mysqld.exe --defaults-file="C:\ProgramData\MySQL\MySQL Server 5.7\my.ini" --console --initialize-insecure=on --lower-case-table-names=1...
2020-02-14T10:43:06.401608Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2020-02-14T10:43:06.401673Z 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.
2020-02-14T10:43:06.408061Z 0 [ERROR] InnoDB: Unable to create temporary file; errno: 0
2020-02-14T10:43:06.408344Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2020-02-14T10:43:06.408444Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2020-02-14T10:43:06.408532Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2020-02-14T10:43:06.408617Z 0 [ERROR] Failed to initialize builtin plugins.
2020-02-14T10:43:06.408711Z 0 [ERROR] Aborting
Process for mysqld, with ID 15120, was run successfully and exited with code 1.
Failed to start process for MySQL Server 5.7.29.
Database initialization failed.
Ended configuration step: Initializing database (may take a long time)
anyone knows what's the problem?

Unable to change the MySQL data directory

I'm trying to change the data directory of my MySQL database from the default location /var/lib/mysql to a new path which in my case is /home/dev/Desktop/iiab/db/mysql.
I have tried following the answer provided by Victor in the following post:
How to change MySQL data directory?
(I have also edited the alias file as per the instruction from mak in the comments on Victor's answer).
BUT, I am getting the following terminal error when trying to start MySQL again:
mysql.serviceJob for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details.
When inspecting the log file using below command
tail -f /var/log/mysql/error.log
It shows the following:
2016-05-23T13:43:11.608141Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2016-05-23T13:43:11.608234Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2016-05-23T13:43:11.608252Z 0 [ERROR] Failed to initialize plugins.
2016-05-23T13:43:11.608260Z 0 [ERROR] Aborting
2016-05-23T13:43:11.608297Z 0 [Note] Binlog end
2016-05-23T13:43:11.608416Z 0 [Note] Shutting down plugin 'MyISAM'
2016-05-23T13:43:11.608469Z 0 [Note] Shutting down plugin 'CSV'
2016-05-23T13:43:11.609124Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
My my.cnf file looks as follows (I omitted the initial comments ##):
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mysql.conf.d/
[mysqld]
datadir=/home/dev/Desktop/iiab/db/mysql
socket=/home/dev/Desktop/iiab/db//mysql.sock
My /etc/apparmor.d/usr.sbin.mysqld file looks as follows (I only included the parts which were affected by the instructions i.e. replace var/lib/mysql with the new path).
# Allow data dir access
/home/dev/Desktop/iiab/db/mysql/ r,
/home/dev/Desktop/iiab/db/mysql/** rwk,
# Allow data files dir access
/home/dev/Desktop/iiab/db-files/ r,
/home/dev/Desktop/iiab/db-files/** rwk,
# Allow keyring dir access
/home/dev/Desktop/iiab/db-keyring/ r,
/home/dev/Desktop/iiab/db-keyring/** rwk,
My /etc/apparmor.d/tunables/alias file looks as follows (I omitted initial comments ##):
# Or if mysql databases are stored in /home:
alias /var/lib/mysql/ -> /home/dev/Desktop/iiab/db/mysql/,
I am able to restart and reload apparmor successfully.
I'm using Ubuntu 16.04.
Anyone know what I am doing wrong?

Error 1067 in starting Xampp Mysql in Windows with linux like config signature

I said "Linux-like config signature", which means I'm trying to run Mysql in Windows but mysql error shows linux-like file path.
I'm new to Xampp and I don't know exactly how it works.I simply runned xampp setup tool from Xampp control panel.
I try to carry Xampp with my Portable HDD and set-up xampp in portable mode.It works in my own computer but in all the other computers,Mysql didn't start with error 1067.I found this console output.
Even in my local computer,when I tried to setup Xampp for the first time,I had to put the whole Xampp directory into Local C: drive and after setup I've to copy the folder from C: to my External HDD.Then setup again.If I setup from HDD for the first time,the above error comes out even in my own local computer. "My external HDD have a ext4 partition and NTFS partition." I think the error comes out because Xampp set-up tools finds the ext4 partition and it thinks that my OS is Linux when it first run in my external HDD.
E:\xampp\mysql\bin>mysqld --console
121127 14:36:42 [Warning] Can't create test file \usr\local\mysql\data\W39.lower
-test
121127 14:36:42 [Warning] Can't create test file \usr\local\mysql\data\W39.lower
-test
mysqld: Can't change dir to '\usr\local\\mysql\data\' (Errcode: 2)
121127 14:36:42 [ERROR] Aborting
121127 14:36:42 [Note] mysqld: Shutdown complete

Having issues starting MySQL Daemon

I'm new to the forums here but I hope to become more active as I've recently purchased a dedicated server and I'm running Fedora off of it so it's a constant learning process, I'm fairly average at BASH, but I know enough to make my way around, I'm a software developer to trade more than a network techi. Which leads me to my initial problem, I'm having an issue starting my MySQL daemon after rebooting my dedi, I have no clue why it's suddenly doing this, I'm running PHPMyAdmin from the server and also issuing certain commands through the CLI for MySQL, but after rebooting I'm getting this error everytime I try to start the instance of the daemon:
[root#ks23085 ~]# service mysqld start
Redirecting to /bin/systemctl start mysqld.service
[root#ks23085 ~]# systemctl mysqld start
Unknown operation mysqld
[root#ks23085 ~]# systemctl start mysqld
Failed to issue method call: Unit name mysqld is not valid.
[root#ks23085 ~]# systemctl start mysqld.service
[root#ks23085 ~]# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/path/to/mysql.sock' (2)
It's completely bizarre as it was working perfectly before I rebooted it, I didn't update it or change the install, the only thing that I did do was install postfix, but I don't see why that would cause any issues with MySQL :S
I really need a hand on this one, I've tried several solutions from google with no results whatsoever. Thanks in advance guys.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Update 1:
Okay, so I found the directory that mysqld is held, it was '/usr/libexec/mysqld', I typed './mysqld start' in this directory and it specifies this output:
120729 1:49:09 [Warning] The syntax '--log-slow-queries' is deprecated and will be removed in a future release. Please use '--slow-query-log'/'--slow-query-log-file' instead.
120729 1:49:09 [Warning] The syntax '--log-slow-queries' is deprecated and will be removed in a future release. Please use '--slow-query-log'/'--slow-query-log-file' instead.
120729 1:49:09 [Warning] Can't create test file /run/mysql/ks23085.lower-test
120729 1:49:09 [Warning] Can't create test file /run/mysql/ks23085.lower-test
./mysqld: Can't change dir to '/run/mysql/' (Errcode: 2)
120729 1:49:09 [ERROR] Aborting
120729 1:49:09 [Note] ./mysqld: Shutdown complete
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Update 2:
I managed to get passed the directory issue by creating the 'mysql' directory in 'run/' with all my old databases, but now I seem to be getting an error that doesn't seem to be as easy to fix :/
Here's the output:
120729 2:15:59 [Warning] The syntax '--log-slow-queries' is deprecated and will be removed in a future release. Please use '--slow-query-log'/'--slow-query-log-file' instead.
120729 2:15:59 [Warning] The syntax '--log-slow-queries' is deprecated and will be removed in a future release. Please use '--slow-query-log'/'--slow-query-log-file' instead.
120729 2:15:59 [Warning] Can't create test file /run/mysql/ks23085.lower-test
120729 2:15:59 [Warning] Can't create test file /run/mysql/ks23085.lower-test
120729 2:15:59 [Note] Plugin 'FEDERATED' is disabled.
120729 2:15:59 [Note] Plugin 'InnoDB' is disabled.
mysqld: Can't find file: './mysql/plugin.frm' (errno: 13)
120729 2:15:59 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
120729 2:15:59 [ERROR] mysqld: unknown option '--skip-locking'
120729 2:15:59 [ERROR] Aborting
120729 2:15:59 [Note] mysqld: Shutdown complete
The official doc states that there's 2 possible reasons for this error:
You don't have permissions to access the directory /var/lib/mysql/whatever.sock because mysql is the owner of the folder
or
/path/whatever.sock doesn't exist.
Execute the following to find your socket:
mysqladmin variables | grep socket
Added to configuration file as suggested:
You can try this though [Linux specific, but what other operating
systems are there?] Go to /etc/my.cnf and change/add the lines:
[mysqld]
datadir=/var/lib/mysql
socket=/tmp/mysql.sock
[client]
socket=/tmp/mysql.sock
2) Don't forget to check your permissions!