MySQL in XAMPP v3.2.1 not starting - xampp

My MySQL in XAMPP v3.2.1 is not working. It is installed properly but this comes while running it
4:41:28 PM [mysql] Attempting to start MySQL service...
It never starts!!! Neither does any other error message come. All other services(Apache, FileZilla, etc.) are working but MySQL is not. How to make it work?? Can someone help me??
Thanks in advance
P.S. - I read Xampp MySQL not starting - "Attempting to start MySQL service..." but couldn't find anything useful there

You can easily start your mysql just follow these steps:
open cmd in admin mode
type "sc delete mysql" // without cots
uninstall xampp
delete xampp folder
delete all temporary files
restart your pc
intall a fresh copy of xampp
Its done. Enjoy!!

Related

XAMPP Errors on Mac OS X Mojave

I am running MacOS Mojave 10.14 with XAMPP 7.2.5
Earlier today, I tried to start up XAMPP after a crash/restart. XAMPP Manager was unable to start the MYSQL Server. Apache did start correctly.
Figuring there was a potential corruption, I used my Time Machine to restore my XAMPP folder (to a 36-hour old file) in Applications.
Now when I try to run XAMPP Manager, I get a "Cannot find any readable ctl script" error message.
I've tried to run MYSQL Server directly from CLI. I receive the following message:
./mysql.server: line 200: my_print_defaults: command not found
Starting MariaDB
ERROR! Couldn't find MariaDB server (/Applications/XAMPP/xamppfiles/bin/mysqld_safe)
Any thoughts on how to resolve?
The issue has to do with a quirk with Time Machine - it does not completely regenerate all recorded folders/files. A bit of a pain.
I was able to run XAMPP from the command line:
-> cd /Applications/xampp/xamppfiles
-> sudo ./xampp start
To check on MYSQL status:
-> mysql status -u [username] -p [password]
Issue resolved
I spend a day on this and the solution in my case was:
Uninstall XAMPP
Delete all files except my databases folders from ⁨Applications/XAMPP⁩/xamppfiles/var⁩/mysql (there was some .err and log files if I remember well)
Reinstall XAMPP
Reconfigure it. If you use different user than root to access your databases you need to recreate it.
I got the "Cannot find any readable ctl script" error after a Time Machine restoration, too. I'm on 10.12.6 and XAMPP 5.6.
You are correct that it appears to be a TM issue, but I was able to resolve it by entering TM and specifically selecting the directories in XAMPP/xamppfiles/ that TM would not copy over by just selecting XAMPP/xamppfiles/. (In your case, you would not want to copy over /var/mysql, assuming you want to keep your data.)
Relief. There's nothing worse than realizing your trusty backup is not so trusty.

Not able to cache templates and will be slow because of this notice

Recently bought a Macbook Pro with macOS Sierra and installed XAMPP version 7.0.31.
After turning on MYSQL, ProFTPD and Apache Web Server, I noticed something when I opened phpmyadmin.
There was an error below saying:
The $cfg['TempDir'] (./tmp/) is not accessible. phpMyAdmin is not able to cache templates and will be slow because of this.
Probably, do you get an error like this?
The Solution Process:
First, stop xampp service; /opt/lampp/lampp stop
Then, Go to the installation director of phymyadmin then find its "config.inc.php" file then add $cfg['TempDir'] = '/tmp'; like this
At the end, start xampp service /opt/lampp/lampp start

"high sierra" pdo_mysql?

I upgrade my sierra to High sierra, then found my php database connection does not work anymore. It turns out the PDO_MYSQL driver is not installed by default. I reinstalled the mysql, which does not help.
Does anyone else have the same problem? How can I install the PDO driver?
Thanks
I just had the same issue upgrading today. I was using brewed versions of php. Moved to 'native' setup now. Mysql 5.7 was installed and working pre the update. The connection still works when you put in 127.0.0.1 as a host name.
Lands up that the php.ini file is not created on update, meaning that the location of the mysql socket is incorrect.
To fix this, I copied the /etc/php.default to /etc/php.ini
Once done, open terminal and run
mysql_config --socket
Keep the output.
Open the php.ini file and find/edit this line.
mysqli.default_socket =/tmp/mysql.sock
Save and restart the apache server
sudo apachectl restart

Add MySQL to existing XAMPP installation

I installed XAMPP with only Apache and PHP and now I realized I also need MySQL. I downloaded a XAMPP installer and ran it, but it won't install in C:\xampp as it already exists.
How can I add MySQL to the existing Apache+PHP installation?
Here is how I did it:
Re-run the installer and install with MySQL into a different folder. (These instructions assume c:\xampp2)
After the installation finishes, move the mysql directory from the new install into the old install. (I moved c:\xampp2\mysql to c:\xampp\mysql) You can then delete the second installation folder.
Be sure xampp is not running and edit c:\xampp\xampp-control.ini, looking for the [EnableModules] section. Set MySQL=1.
Restart xampp. The MySQL buttons should be enabled. Click the Config button next to MySQL and edit the my.ini file. Do a search and replace, changing all instances of xampp2 to xampp.
Now you can hit start, and MySQL should start up. Note these instructions assume c:\xampp is your desired install location, adjust accordingly.

XAMPP and MySQL installation on OSX

I installed XAMPP. Then I installed MySQL. It appears that MySQL may have already been bundled with XAMPP?
So I apparently installed a second MySQL. I also installed the "MySQL startup" thing that makes MySQL start everytime I start my computer.
Now I have MySQL installed in two places. I can start and run MySQL on the one I knowingly installed but the MySQL located in "xamppfiles" gives me this error:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/Applications/XAMPP/xamppfiles/var/mysql/mysql.sock' (2)
I'm not sure what to do. I appear to have a mysqld daemon running and I can't kill, it seems it restarts itself. I'm not sure of the proper way to get rid of one of the installations.
I'm not really sure what the question is. MySQL is bundled in XAMPP. You are receiving that error because you are trying to start 2 instances of it. This will help you uninstall mysql if that's what you are trying to do

Resources