[ZBX-5003] Fresh installation, can not import schema.sql Created: 2012 May 15  Updated: 2017 May 30  Resolved: 2012 May 17

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Installation (I)
Affects Version/s: 2.0.0rc4
Fix Version/s: 2.0.0rc5

Type: Incident report Priority: Major
Reporter: Marc Herren Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

mysql Ver 14.12 Distrib 5.0.67, for suse-linux-gnu (x86_64) using readline 5.2


Issue Links:
Duplicate
duplicates ZBX-4866 Installing schema.sql Error 1064 (420... Closed
duplicates ZBX-1471 Database upgrade failed because of mi... Closed

 Description   

ejpdxt4040:/var/tmp/zabbix-2.0.0rc4 # mysql -uzabbix -pzabbix zabbixtest < database/mysql/schema.sql
ERROR 1064 (42000) at line 816: 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 6

Modified database/mysql/schema.sql line 821 from

exp_delimiter varchar(1) DEFAULT '' NOT NULL,

to

`exp_delimiter` varchar(1) DEFAULT '' NOT NULL,

and could succesfully import it



 Comments   
Comment by Alexander Vladishev [ 2012 May 16 ]

Fixed in the development branch svn://svn.zabbix.com/branches/dev/ZBX-5003

Comment by dimir [ 2012 May 16 ]

Could you please provide the exact instructions used to create the database and import schema? We would really like to reproduce the issue.

Comment by Marc Herren [ 2012 May 16 ]

mysql> CREATE DATABASE zabbixtest;
mysql> CREATE USER 'zabbix'@'localhost' IDENTIFIED BY 'zabbix';
mysql> GRANT ALL PRIVILEGES ON zabbixtest.* TO 'zabbix'@'localhost';

and then applied the the schema file

mysql -uzabbix -pzabbix zabbixtest < database/mysql/schema.sql

I tried today on another system and there it worked. ?!

I'm not sure if it is related to the mysql version as here I have

mysql Ver 14.14 Distrib 5.1.61, for redhat-linux-gnu (x86_64) using readline 5.1

On Monday I'll be again at the customer in his environmet and I'll do some test.

Comment by dimir [ 2012 May 17 ]

What if you create the database specifying the charset, at customer's environment?

mysql> CREATE DATABASE zabbixtest CHARACTER SET UTF8;

Comment by dimir [ 2012 May 17 ]

(1) I think we should also backtick data and images in case of MySQL.

<Sasha> RESOLVED in r27586

<dimir> Excellent. CLOSED

Comment by Alexander Vladishev [ 2012 May 17 ]

Fixed in version pre-2.0.0rc5 r27596.

Generated at Thu Mar 28 19:27:53 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.