My channel website is using mysql but i use XAMPP on my mac,which from newer version uses MariaDB instead of Mysql.
I tried to import large database from my cpanel to my localhost via command line on my mac.
At one point the query stopped working and printed the error message that
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'Array
(
[type] => 1
[message] => Maximum execution time of 300 seconds e' at line 280
Query OK, 0 rows affected (0.00 sec)
so i want to know is it a problem with 2 different versions or its execution time problem.
What should i do to increase the execution time in my Xampp?
Thank you
You could try altering the configuration to change max_statement_time. This assumes that you are on MariaDB 10.1.1 or later and that the execution time is the issue.
You may also wish to have a look at Aborting Statements that Exceed a Certain Time to Execute
Related
I have a project with a MySQL database to which I connected using the Database Navigator plugin.
Now when I open the DB Browser window, select the database and click on "Open DB console" and insert the query
SELECT CAST('2017-08-29' AS DATE);
for one, the IDE highlights CAST as an unknown identifier:
and, additionally, when I try to execute the statement, I get the error
Error executing SELECT statement. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 - Connection: test: 112ms
However, to my knowledge, this is valid MySQL, at least this page suggests so.
I am also able to perform MySQL queries with casts from a python script that builds the connection itself.
What am I doing wrong here? Do I have to configure the dialect for Database Navigator?
Yesterday I typed a bad query into the SQL box of PHPMyAdmin.
Ever since, when I click on my database table in the bar on the left, or click the Browse button, my query is used as the default query. Or rather the part I typed at the end is added to every query.
I get an error dialog reading
#1064 - You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server
version for the right syntax to use near 'offset1000
LIMIT 0, 30' at line 1
which is my bad query. How can I get rid of this? Is there a cache with this query in it somewhere?
Details: PHPMyAdmin 4.0.10deb1ubuntu0.1 / Apache/2.4.7 (Ubuntu) / Ubuntu 14.04.1 and yes, I've logged out and even rebooted the server.
I have found the answer to this after a lot of searching.
PHPMyAdmin 4 has a table for this helpful feature.
It's in the database phpmyadmin, table pma_table_uiprefs. Stored against my username, that table and database was the bad query. I deleted it, which didn't help right away, but when I logged out and back in, it was gone.
I ran a SQL script containing INSERT statements on a table that has sufficient column length using mysql command line utility and got an error:
ERROR 1406 (22001) at line 115: Data too long for column 'Name' at row 1
Note that same script works fine from MySQL Workbench. Statement that failed is:
INSERT INTO geotable (Id,Name,Description,IsReadOnly,IsActive,IsModified,LastUpdated) VALUES (188,'Helsinki, Rovaniemi, Oulu, Kokkola, Jyväskylä, Por','',0,0,1,'2017-02-01 11:13:03');
Like suggested in earlier posts, I tried with following and still doesn't work:
SET ##global.sql_mode='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'
Server version: 5.7.20-log MySQL Community Server (GPL)
Windows Version 10
Any ideas?
STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
replace with NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
I get an error saying 'Error Code: 2013. Lost connection to MySQL server during query' when I work on Workbench. I increased the limit from 600 seconds to 6000 seconds. However, it loses connection way before 100 seconds. I'm using Workbench 6.1. My syntax has no issues with it since I tried on fiddle by creating a sample, small-sized table.
You don't specify exactly which limit parameter you increased. According to MySQL documentation, It seems that the most suitable configuration option for this is net_read_timeout on MySQL server (default 30 sec). Also, check the rest of the recommendations there.
I'm trying to install Open Cart on my virtual machine with, PHP 5.4.7, MySQL 5.5 and Apache 2.2. After A LOT of troubles, I've managed to arrive at the moment of installation script execution, but I receive this problem:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '/*!40101 SET #OLD_CHARACTER_SET_CLIENT=##CHARACTER_SET_CLIENT */' at line 1
Honestly I'm stuck. I've tried to execute the code in Workbench and it works, except that in the INSERT INTO queries for test data they've missed default values for NOT NULL columns.
Hints? Suggestion?
Those random characters at the start of the SQL are the UTF Byte Order Mark. Something you used to edit the file decided to emit that at the start. Quickest way to get rid of it would be getting Notepad++, open the file in that, Select "Encoding->Enocde in UTF-8 without BOM", and resave the file, and try again.