Zabbix server upgrade issue - zabbix

We are unable to upgrade the zabbix version to 4.4.. there seems to be an error with upgrading Database. Could someone help on this:
[Z3005] query failed: [1005] Can't create table 'zabbix.#sql-179d_144bb0' (errno: 135) [alter table `hosts` add `proxy_address` varchar(255) default '' not null]
This error is shown in logs. I tried to give privileges to zabbix user but no use

This issue got resolved.
The FS where database is stored has 100% utilization. Extending the FS resolved the issue.

Related

MySQL Workbench alter table after updating to Windows 11

I updated from Windows 10 to Windows 11. Now I can not alter any table anymore on MySQL Workbench.
I increased the timeout to 600 seconds, but still same error. My DB is quiet empty, so it should be no problem of size.
Do I have to change something in the configuration after updating to Win11 for MySQL Workbench?
I have a Python script, which is using this MySQL-DB to use some entries from this DB, that is still working.
I can not share error code as text, because of no copy-paste-functionality.
EDIT: I add the text a can be seen in the screenshot:
Error: There was an error while applying the SQL script to the database.
Executing:
ALTER TABLE 'map'.
ADD COLUMN `route_location` VARCHAR(45) NULL DEFAULT NULL AFTER `route_event`;
Operation failed: There was an error applying thee SQL script to the database.
ERROR 2013: Lost connection to MySQL server during query
SQL Statement:
ALTER TABLE `map`.`routepoints`
ADD COLUMN `route_location` VARCHAR(45) NULL DEFAULT NULL AFTER `route_event`
I tried it with SQL-Script and also with GUI.
After restarting MySQL-Workbench and several times of trying to rerun the SQL-Script it creates the column in the table. Since then I have no problem and its working properly, even if I add a new column.

mysql - update a column meet an error

I want to make an average of forex_askprice and forex_bidprice and insert into forex_midprice. like this
update eurusd_tickdata_2017 set forex_midprice=(forex_askprice+forex_bidprice)/2
But I met this error
2003 - Can't connect to MySQL server on 'localhost' (10061 "Unknown error")
时间: 759.205s'
There are around 40,000,000 rows in the table eurusd_tickdata_2017
it was the problem on your configuration settings of your database source like connection look up this video for your issue.
https://www.youtube.com/watch?v=ab25N34RO8w
It looks like your MySQL server is not installed. you can check steps & install from link - MySQL on Windows

MySQL Errcode: 13 - Permission denied

I'm using MySQL 5.7.10 and Flyway to handle my database migrations. Everything works fine on Linux and Mac but on Windows 10 I am getting this error:
Error on rename of '.\mydb\#sql-1da0_a.frm' to '.\mydb\proc_error_table.frm' (Errcode: 13 - Permission denied)
This is part of the SQL in question causing the error:
DROP TABLE IF EXISTS `proc_error_table`;
DROP TABLE IF EXISTS `error_import`;
CREATE TABLE `proc_error_table` (
`procedure_name` varchar(30) NOT NULL,
`sql_state` varchar(20) NOT NULL,
`sql_message` varchar(100) NOT NULL,
`error_timestamp` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
create index idx_proc on proc_error_table(procedure_name);
#
# This is the line causing the error.
#
create index idx_file_id on proc_error_table(data_set_file_id);
I tried explicitly defining a tmpdir with sufficient privileges but that didn't work:
tmpdir = C:/temp
I tried to give explicit FULL ACCESS to the data FULL ACCESS to the MySQL Data directory but that didn't work:
C:\ProgramData\MySQL\MySQL Server 5.7\Data\mydb
I tried changing the user that MySQL runs as to my personal account and that didn't work.
Something, somewhere is preventing MySQL from gaining access to this directory and or file(s). The Windows Event Log, nor the MySQL show any indications as to what is preventing it.
What tool can I use to figure this out?
it could be a conflict with antivirus software. try to turn it off

MySql : wait_timeout & "mysql server has gone away" error message

I've a page which selects data from a table based on the primary key of the table
ex: SELECT * FROM table_name WHERE id=primary_key_value
As soon as I execute this from my CI page, I'm getting following error message
"Mysql server has gone away"
I searched in mysql reference manual, they are telling, its the cause of "wait_timeout" in configuration file. My configuration file has following settings
wait_timeout = 10
Could someone help me resolve this issue?
MySQL Server Has Gone Away - MySQL 5.5
link
Another one

Error Table 'mysql.servers' doesn't exist

I get the error "Table 'mysql.servers' doesn't exist" from plesk when I try to create a new database user, the created user does not show up anywhere but the name is still reserved, and it does not allow me to access the database.
edit:
I was unable to login to phpMyAdmin to this webserver, so instead I managed to login to it through a different domain, and it tells me a notice: Your PHP MySQL library version 5.0.90 differs from your MySQL server version 5.1.49. This may cause unpredictable behavior.
edit:
manually installed phpmyadmin
then manually installed libmcrypt (which is an accomplishment with my cruddy sever skills :D) so that phpmyadmin works.
Then accidentally found out how to login as root via plesk (the trick is to enter webadmin without choosing any database), at least I think it's root :S
ran the sql: GRANT SELECT ON mysql.* TO 'my-user'#'localhost'; with a success message
went back to plesk to see if I can manage the sql with "my-user" and no, its still missing from the available users, but the name is still reserved...
tried to run: mysql_fix_privilege_tables –user=root –password=mypasswordobviosuly –verbose
but gave and error, and i'm still not sure how to run direct mysql commmands without using ssh (because i dont know the root password)
I entered mysql via pre-installed phpmyadmin as 'root' like so:
(in plesk) home-> database servers -> webadmin.
Then choose the "mysql" database, if the table 'servers' is missing (probably some mysql bug) then it will need to be created:
choose 'SQL' in 'phpmyadmin' to and run the following sql:
CREATE TABLE `servers` (
`Server_name` char(64) NOT NULL,
`Host` char(64) NOT NULL,
`Db` char(64) NOT NULL,
`Username` char(64) NOT NULL,
`Password` char(64) NOT NULL,
`Port` int(4) DEFAULT NULL,
`Socket` char(64) DEFAULT NULL,
`Wrapper` char(64) NOT NULL,
`Owner` char(64) NOT NULL,
PRIMARY KEY (`Server_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='MySQL Foreign Servers table';
so that the table at least exists... then create a new user in plesk, and viola! it works! I was able to login as the user I created after that, it seems like it was some bug with some mysql update I did not even know about.
This error can sometimes appear after a new installation of MySQL when the mysql table does not get created properly. Running the command...
mysql_install_db --user=mysql
from the bash prompt (not the MySQL prompt) will install the table and get things working.
After running the command above on a new installation the following command will help secure the install...
mysql_secure_installation
This will prompt you to enter a root password, remove anonymous access, limit root access to localhost only and remove the test database.
These commands are for Linux, they may not work on Windows but there are corresponding commands if you search the MySQL docs.
This is not related to the Plesk issue of the original poster but I stumbled upon this question while researching a MySQL installation problem and thought this might help save someone some time.
Found the following when attempting to upgrade. Was directed to the following page:
http://kb.parallels.com/en/112290
I ran the following from that page:
"Run the following command for repairing MySQL table:
#mysql_upgrade -T --debug-check -u admin -p`cat /etc/psa/.psa.shadow` mysql"
It looks like your user does not have access to the mysql database. You may want to grant the SELECT command as follows:
GRANT SELECT ON mysql.* TO 'your-user'#'localhost';
In my case show tables in mysql database identifies servers table exists, but yet I got the Error Table 'mysql.servers' doesn't exist error.
Listing <data-dir>/mysql directory revealed servers.frm file exists, but relative servers.MYI and servers.MYD files were missing - maybe I played a role on that!
Anyhow knowing that I'm using the server as an intermediate server in a Daisy Chain Replication, I got a backup from servers.frm file and recreated the table by running the #timo-huovinen's answer things got back to normal.
It's noteworthy that there was at least one other table (plugin) missing MYI and MYD files.