Welcome Guest, Not a member yet? Register   Sign In
ion auth install mysql syntax error
#1

[eluser]RJ[/eluser]
I'm getting an mysql syntax error on the ion auth mysql install file on line 2 (see message below), any idea why?

Quote:#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 'IDENTITY(1,1), group_id int NOT NULL, ip_address char(16) NOT NULL, ' at line 2

here's the first create statement:
Code:
CREATE TABLE users (
    id int NOT NULL IDENTITY(1,1),
    group_id int NOT NULL,
    ip_address char(16) NOT NULL,
    username varchar(15) NOT NULL,
    password varchar(40) NOT NULL,
    salt varchar(40),
    email varchar(100) NOT NULL,
    activation_code varchar(40),
    forgotten_password_code varchar(40),
    remember_code varchar(40),
    created_on datetime NOT NULL,
    last_login datetime,
    active int,
  PRIMARY KEY(id),
  CONSTRAINT users_check_id CHECK(id >= 0),
  CONSTRAINT users_check_group_id CHECK(group_id >= 0),
  CONSTRAINT users_check_active CHECK(active >= 0)
);

Thank you
#2

[eluser]InsiteFX[/eluser]
Thats mssql not mysql!

This is the correct MySQL:
Code:
#
# Table structure for table 'users'
#

CREATE TABLE `users` (
  `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `group_id` mediumint(8) unsigned NOT NULL,
  `ip_address` char(16) NOT NULL,
  `username` varchar(15) NOT NULL,
  `password` varchar(40) NOT NULL,
  `salt` varchar(40) DEFAULT NULL,
  `email` varchar(100) NOT NULL,
  `activation_code` varchar(40) DEFAULT NULL,
  `forgotten_password_code` varchar(40) DEFAULT NULL,
  `remember_code` varchar(40) DEFAULT NULL,
  `created_on` int(11) unsigned NOT NULL,
  `last_login` int(11) unsigned DEFAULT NULL,
  `active` tinyint(1) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`)
);


#
# Dumping data for table 'users'
#

INSERT INTO `users` (`id`, `group_id`, `ip_address`, `username`, `password`, `salt`, `email`, `activation_code`, `forgotten_password_code`, `created_on`, `last_login`, `active`) VALUES
    ('1','1','127.0.0.1','administrator','59beecdf7fc966e2f17fd8f65a4a9aeb09d4a3d4','9462e8eee0','[email protected]','',NULL,'1268889823','1268889823','1');

InsiteFX
#3

[eluser]RJ[/eluser]
FML




Theme © iAndrew 2016 - Forum software by © MyBB