MySQL is not starting in XAMPP - mysql

Now I'm working with some projects so I fill my Database using xampp(my english is s*cking, sorry). I get error:
Warning: Unknown(): write failed: No space left on device (28) in Unknown on line 0
Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0
I changed session storage and get next level of headache:
#2002 - No such file or directory — Server isn't responding (or local socket of Mysql incorrectly configured ).
mysqli_real_connect(): (HY000/2002): No such file or directory
An error occurred while indicating the connection for controluser in configuration
mysqli_real_connect(): (HY000/2002): No such file or directory.
Previously I installed conkeror browser and tried to set it as default browser. After some time (about 4hrs) mysql crashed. I used commmands:
sudo update-alternatives --config x-www-browser
sudo update-desktop-database
I really need to save my database because it contains so mush data...
Please help (
About my computer: Debian 8 GNOME + Awesome WM. Lenovo b590.

So I found solution. I watched my logs and mysql couldn't init tc.log (/opt/lampp/var/mysql/tc.log).
I just removed it and started the server. It started working!
But I still must move my logs to the other partition, because logs eat so much memory...

Related

Bitnami unknown error when starting mysql and apache

When attempting to start the mysql and apache services from the Bitnami Wamp stack manager i get the following error.
Starting MySQL Database... Exit code: 1 Stdout:
Stderr: Unknown error starting mysql
I have been able to start the mysql server manually by navigating to the mysql/bin folder and running mysqld, but this is a less than desirable solution.
I tried running the net start "wampstackMySQL" command in cmd, which i found in the mysql/scripts/servicesrun.bat file, but i get the following error.
System error 1058 has occurred.
The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.
In the services monitor (windows tool) i find both apache and mysql, but all the options for them are greyed out.
There seems to be an issue with the mysql and apache services, but i am unable to figure out what and how to solve this. Anyone have any ideas?

Digital ocean sql connection and phpmyadmin suddenly stopped working

I have a Laravel app on digital ocean and it runned fine for about 4 days now.
But today when I woke up it suddenly couldn't connect to the DB.
Also when I try to login in phpmyadmin it says
2002 - Connection refused — The server is not responding (or the local server's socket is not correctly configured).
I tried changing localhost to 127.0.0.1 in the config-db.php file and restarting apache, because some guy in their forums had the same problem and said that it fixed it for him, but for me it had no effect.
Other errors I see are
mysqli_real_connect(): (HY000/2002): Connection refused
Connection for controluser as defined in your configuration failed.
mysqli_real_connect(): (HY000/2002): Connection refused
I am certain that no configuration files have been changed, it just stopped working, why that might be, and how to prevent it in the future ?
The OS is Ubutnu 18.04.13 (if it matters)
It would appear as if your MySQL daemon is no longer running.
The hints here are that the Laravel app is not able to reach the MySQL server, and that phpMyAdmin is also unable to reach the MySQL server.
You should look in the MySQL error log for hints. You may also find hints in your syslog, depending on how your system is configured. This could give you information about why the service has stopped. You might also find information in the systemd log, which can probably best be viewed with journalctl -u mysql -b.
You could verify that it's actually stopped with systemctl status mysql, even though it's difficult for me to think of a reason why it would be running correctly but not responding to any connection attempts.
Next, you should probably start the service again with sudo systemctl start mysql. If it fails to start, you'll see some information about why not with information about viewing the log file, which you can copy and paste in to your question to help us further with troubleshooting.

Wamp- command line "mysqld" doesn't work

When I write the command line C:\wamp\bin\mysql\mysql5.6.17\bin>mysqld
nothing happens. It just shows the path again C:\wamp\bin\mysql\mysql5.6.17\bin>
and when I write this:
C:\wamp\bin\mysql\mysql5.6.17\bin>mysql
it shows an error: ERROR 2003 (HY000): Can't connect to mysql server on 'localhost' (10061)
I tried a lot to find an answer to this, but I couldn't find anything useful. Why isn't the server working?
I installed the same program for my friend, too and it works fine for her.
The error ERROR 2003 (HY000): Can't connect to mysql server on 'localhost' (10061) means that the MySQL server daemon is not running and so the client mysql can not connect. That makes sense, because mysqld doesn't start.
There are plenty of reasons, often its simply a misconfiguration or port collision (3306 already used?).
The first step is to make sure that the daemon is working without a configuration file. Please try to start the daemon by using mysqld --no-defaults.
no-defaults means that mysql will not read any option files, before starting.
If it starts up, you know that the configuration file(s) are to blame.
Then search in your my.ini for "wrong" or "old and deprecated" entries and fix them, to allow a normal startup. Its also helpful to enable logging.
If you are in doubt, go with one of the default configuration files: https://dev.mysql.com/doc/refman/5.6/en/server-default-configuration-file.html
You can check the ports with a tool like CurrPorts:
http://www.nirsoft.net/utils/cports.zip

Xampp Linux: PDOException: SQLSTATE[HY000] [2002] Connection refused in lock_may_be_available() error

I have been struggling to find a solution for this issue with MySQL. Things changed after I placed a ojdbc jar file on Apache Solr tomcat server. Since then i have been getting this error. It seems there is yet another mysql instance running on the machine.
Xampp Status shows MySQL Database is deactivated. I have been searching for a working solution since this morning but no luck. Your help is very much appreciated.
PS: /opt/lampp/lampp status says mysql is 'running'. When stopped, it reads 'OK' but when starting it again, it says 'already running'....and the Xampp Status page says MySQL database is Deactivated
The command /opt/lampp/lampp status basically goes and check for the pid file
MYSQL_PIDFILE=/opt/lampp/var/mysql/$HOSTNAME.pid
Sometimes this PID file get corrupted (in case of a crash, or procees kill).
In such scenario, the status command will tell you that the mysql is running, where as there is no process that exists for that PID file and the XAMPP status which shows in the browser will not be able to connect to the server (because it is not running) and hence come as deactivated.
Just rename the pid file as $HOSTNAME_bkp.pid or something like that and restart lampp, the issue will get resolved.

MySQL Server does not start after changing max_allowed_packet parameter

MySQL Community Edition 8.0.13 on Windows 10 Pro 32 GB x64
I am running the community server 8.0.18 (from the command line and not the service) and I need to set the max_allowed_packet value to higher than the default.
However,the server hangs on start with max_allowed_packet=16M, both when
change is made in the ini file, or
the value is passed as a command line parameter
Update:It seemed strange that the server would not start after a legal change - so I just saved the conf (my.ini) file without making any changes. And the got the same result
The ini file is as follows:
# The maximum size of one packet or any generated or intermediate string, or any parameter sent by the
# mysql_stmt_send_long_data() C API function.
max_allowed_packet=16M
The steps I followed are:
Install MySQL with advance logging and turn on all logs and without setting up a service
Start server by running mysqld : starts ok
Stop server by running mysqladmin -u root -p shutdown : shutsdown ok
change the value in the my.ini
Start server - server hangs
Full logging is on but nothing even gets written to the log. The last entry in the log is:
2019-10-24T14:47:56.916731Z 10 Connect root#localhost on using SSL/TLS
2019-10-24T14:47:56.916973Z 10 Query shutdown
2019-10-24T14:47:56.917224Z 10 Query
At this point, the only thing possible is to reboot, uninstall and then install again.
I have searched the forum for similar issues, and none of the previous suggestions apply/or work.
Issues resolved: Am posting an answer instead of deleting the question just in case it helps somebody else.
I had the conf (ini) file open in an editor (sublime/atom at different times) while I was starting the server. Finally I used notepad edited the file, closed it and the server started just fine.
I think the server is not able to load the conf file if it is open by another process.