Unable to import the database via PLESK - mysql

I'm trying to import my database via PLESK and still have the same errors:
enter image description here
ERROR 2006 (HY000) at line 1898: MySQL server has gone away
Traceback (most recent call last):
File "/usr/local/psa/admin/sbin/dbbackup", line 6, in
File "/usr/local/psa/lib/modules/python/dbbackup/dbbackup.py", line
100, in main restore(options, password)
File "/usr/local/psa/lib/modules/python/dbbackup/dbbackup.py", line
89, in restore
raise Exception("program 'mysql' finished with non-zero exit code:
%d" % p.returncode)
Exception: program 'mysql' finished with non-zero exit code: 1
I tried to enlarge memory_limit and upload_max_filesize in PLESK PHP Settings but it still doesn't work. I've also checked version of my MySQL (5.5.2) because I found it might be not supported by the latest version of Plesk, but it seems to be OK.
I am beginner in such subjects and I really don't know what to do. Please, rescue me :(

It is timeout issue.
I would suggest increasing wait_timeout in my.cnf

Hi Todra,
if you desire to increase the "wait-timeout", you have to define for example in your "my.cnf":
AFTER => [mysqld]
interactive_timeout=60
wait_timeout=60
In addition, you might consider to set as well:
mysql -uadmin -p`cat /etc/psa/.psa.shadow` -e"SET GLOBAL wait_timeout=60; SET GLOBAL interactive_timeout=60"

Related

libvirt.libvirtError: An error occurred, but the cause is unknow

I am using XEN hypervisor. For managing virtual Machine I am using virt-manager whenever I want to start to Virtual Machine at last when everything is ready and I click the create Button I get the following error
Unable to complete install: 'An error occurred, but the cause is unknown'
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 75, in cb_wrapper
callback(asyncjob, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/createvm.py", line 2089, in _do_async_install
guest.installer_instance.start_install(guest, meter=meter)
File "/usr/share/virt-manager/virtinst/install/installer.py", line 542, in start_install
domain = self._create_guest(
File "/usr/share/virt-manager/virtinst/install/installer.py", line 491, in _create_guest
domain = self.conn.createXML(install_xml or final_xml, 0)
File "/usr/lib/python3/dist-packages/libvirt.py", line 4034, in createXML
if ret is None:raise libvirtError('virDomainCreateXML() failed', conn=self)
libvirt.libvirtError: An error occurred, but the cause is unknow
For the Xen driver, you may have more infos in /var/log/libvirt/libxl/libxl-driver.log
Same issue here.
When I check the /var/log/syslog, there is a log from libvirtd: "unsupported configuration: emulator '/usr/lib/xen-4.11/bin/qemu-system-i386' not found".
It may be caused by this bug. So we can create a symbolic link sudo ln -s /usr/bin/qemu-system-i386 /usr/lib/xen-4.11/bin/qemu-system-i386, and I hope it works for you too.
Check if you have installed
qemu-system-x86-xen
if not - install
apt install qemu-system-x86-xen
that helped me

MySQL MHA binlog setting check failed

i try to config MHA 0.56 for mysql 5.7, everything is done. when i run masterha_check_repl, i get the following message:
executing command: save_binary_logs --command=test --start_pos=4 --binlog_dir=/data/mysql --output_file=/data/mysql
Failed to save binary log: Set --start_file=<starting_binlog_filename> or --binlog_prefix=<binlog_file_prefix>
Binlog setting check failed!
I modified MasterMonitor.pm added
--binlog_prefix=mysql-bin
into the command , but it doesn't work, still gave me above error message.
I have no idea on how to deal with it..
Try setting binlog_prefix in my.cnf rather than via command line.
I made a mistake when I copied other's app1.cnf explanation into my app1.cnf.
The #comment after parameters in the same line should be removed.

Wordpress mysql service error ERROR: Failed to start "mysql": cannot start service: Process exited with status 3

I'm hoping someone can help me, i've been working on a website using wordpress for the past 3 months on my mac, only when i tried to access it this past weekend the mysql service won't run and i keep getting the error
ERROR: Failed to start "mysql": cannot start service: Process exited with status 3
Can anyone help me get my site up and running again?
This is the first tie using Wordpress so i'm not really sure what I'm doing.
Any help would be greatly appreciated
i've managed to run mysql in safe mode and this is the code it gives
Last login: Mon Jul 13 22:23:09 on ttys001
Lukes-iMac:~ lukejackson$/Users/lukejackson/.bitnami/stackman/machines/wordpress/volumes/root/mysql/bin/mysqld_safe ; exit;
/Users/lukejackson/.bitnami/stackman/machines/wordpress/volumes/root/mysql/bin/my_print_defaults: line 12: /Users/lukejackson/.bitnami/stackman/machines/wordpress/volumes/root/mysql/bin/my_print_defaults.bin: cannot execute binary file
/Users/lukejackson/.bitnami/stackman/machines/wordpress/volumes/root/mysql/bin/my_print_defaults: line 12: /Users/lukejackson/.bitnami/stackman/machines/wordpress/volumes/root/mysql/bin/my_print_defaults.bin: Undefined error: 0
/Users/lukejackson/.bitnami/stackman/machines/wordpress/volumes/root/mysql/bin/my_print_defaults: line 12: /Users/lukejackson/.bitnami/stackman/machines/wordpress/volumes/root/mysql/bin/my_print_defaults.bin: cannot execute binary file
/Users/lukejackson/.bitnami/stackman/machines/wordpress/volumes/root/mysql/bin/my_print_defaults: line 12: /Users/lukejackson/.bitnami/stackman/machines/wordpress/volumes/root/mysql/bin/my_print_defaults.bin: Undefined error: 0
/Users/lukejackson/.bitnami/stackman/machines/wordpress/volumes/root/mysql/bin/mysqld_safe: line 674: /opt/bitnami/mysql/data/Lukes-iMac.err: No such file or directory
Logging to '/opt/bitnami/mysql/data/Lukes-iMac.err'.2020-07-13T21:43:10.6NZ mysqld_safe Starting mysqld daemon with databases from /opt/bitnami/mysql/data/Users/lukejackson/.bitnami/stackman/machines/wordpress/volumes/root/mysql/bin/mysqld_safe: line 144: /opt/bitnami/mysql/data/Lukes-iMac.err: No such file or directory
/Users/lukejackson/.bitnami/stackman/machines/wordpress/volumes/root/mysql/bin/mysqld_safe: line 199: /opt/bitnami/mysql/data/Lukes-iMac.err: No such file or directory
/Users/lukejackson/.bitnami/stackman/machines/wordpress/volumes/root/mysql/bin/mysqld_safe: line 937: /opt/bitnami/mysql/data/Lukes-iMac.err: No such file or directory
2020-07-13T21:43:10.6NZ mysqld_safe mysqld from pid file /opt/bitnami/mysql/data/Lukes-iMac.pid ended
/Users/lukejackson/.bitnami/stackman/machines/wordpress/volumes/root/mysql/bin/mysqld_safe: line 144: /opt/bitnami/mysql/data/Lukes-iMac.err: No such file or directory
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
[Process completed]
Your local database server is failing to start up, and it's being started with enough layers between you and it that any reporting it's doing on why is being hidden. To attempt to start it while being able to see what it's complaining about, try the methodology here: start MySQL server from command line on Mac OS Lion
Bitnami Engineer here.
Thank you for using our solution. Please note that the OS X VM solution is a VM we build and configure with the application. You need to open the Console of the VM when running any command, can you try to open the console and run the start command?
sudo /opt/bitnami/ctlscript.sh start
You can use the ctlscript.sh file to stop the services and get the status as well. If the database can't be started, you can take a look at the database's log file (/opt/bitnami/mysql/data/mysqld.log) to get more information
sudo tail -n 30 /opt/bitnami/mysql/data/mysqld.log

How do I connect Airflow to SQLite locally?

I'm trying to try out Airflow for the very first time and I'm trying to connect it to a local SQLite database. But I can't seem to get my head around on how to actually do it.
I've read up on Airflow's document, Set my executor to LocalExecutor and set up my sql_alchemy_conn to sqlite:////home/myName/Programs/sqlite3/DatabaseName.db but it doesn't seem to work as it throws an
Traceback (most recent call last):
File "/usr/local/bin/airflow", line 21, in <module>
from airflow import configuration
File "/usr/local/lib/python2.7/dist-packages/airflow/__init__.py", line 35, in <module>
from airflow import configuration as conf
File "/usr/local/lib/python2.7/dist-packages/airflow/configuration.py", line 520, in <module>
conf.read(AIRFLOW_CONFIG)
File "/usr/local/lib/python2.7/dist-packages/airflow/configuration.py", line 283, in read
self._validate()
File "/usr/local/lib/python2.7/dist-packages/airflow/configuration.py", line 169, in _validate
self.get('core', 'executor')))
airflow.exceptions.AirflowConfigException: error: cannot use sqlite with the LocalExecutor
error when I tried to run airflow initdb. I tried to google around and tried vipul sharma's solution found here and set the value of my sql_alchemy_conn to mysql://:#localhost:3306/ but it still doesn't work as it throws an
sqlalchemy.exc.OperationalError: (_mysql_exceptions.OperationalError) (1045, "Access denied for user 'myName'#'localhost' (using password: NO)")
error. I know that the answer should be really simple but I really don't understand how to so I hope you can guide me through on what to do/read.
Use SequentialExecutor
"This executor will only run one task instance at a time, can be used for debugging. It is also the only executor that can be used with sqlite since sqlite doesn’t support multiple connections." airflow documentation
You just didn't need to change to LocalExecutor, change it back to SequentialExecutor, change sql_alchemy_conn to point to sqlite:////home/myName/Programs/sqlite3/DatabaseName.db and stop airflow services (webserver, scheduler).
Execute airflow initdb then start up the services again.
Hopefully that works.

MySQL Connector/Python 1.0.7 on OSX 10.8 not getting a cursor

Here's a skeleton of my Python code:
import mysql.connector
sql = mysql.connector.connect(user='user', password='pwd',
host='127.0.0.1', database='my_db')
cursor = sql.cursor()
Yields this mysterious error message:
Traceback (most recent call last):
File "pyscript_v2.py", line 36, in
cursor = sql.cursor()
file "/Library/Python/2.7/site-packages/mysql/connector/connection.py", line 1063, in cursor raise errors.OperationalError("MySQL Connection not available.")
mysql.connector.errors.OperationalError: MySQL Connection not available.
My Google-fu is failing to dig anything up, am I missing something in setting up my MySQL DB connection in Python?
I'm running Python 2.7.2 on OS X 10.8.2, and am using MySQL Connector/Python 1.0.7.
Following link has explanation and possible solution.
http://bugs.mysql.com/bug.php?id=67649