When I run this query:
DROP TABLE IF EXISTS `users`;
Then:
CREATE TABLE `users` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`role_id` int(11) NOT NULL DEFAULT '4',
`email` varchar(120) NOT NULL,
`username` varchar(30) NOT NULL DEFAULT '',
`password_hash` char(60) NOT NULL,
`reset_hash` varchar(40) DEFAULT NULL,
`last_login` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`last_ip` varchar(40) NOT NULL DEFAULT '',
`created_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`deleted` tinyint(1) NOT NULL DEFAULT '0',
`reset_by` int(10) DEFAULT NULL,
`banned` tinyint(1) NOT NULL DEFAULT '0',
`ban_message` varchar(255) DEFAULT NULL,
`display_name` varchar(255) DEFAULT '',
`display_name_changed` date DEFAULT NULL,
`timezone` char(4) NOT NULL DEFAULT 'UM6',
`language` varchar(20) NOT NULL DEFAULT 'english',
`active` tinyint(1) NOT NULL DEFAULT '0',
`activate_hash` varchar(40) NOT NULL DEFAULT '',
`password_iterations` int(4) NOT NULL,
`force_password_reset` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `email` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
I get error:
Error Code: 1005
Can't create table 'admin_sc.users' (errno: 150)
Checked /var/lib/mysql/admin_sc directory for permission - can create table with other name, but can't create table users
Any can help ? No any foreign keys in my query.