我不是一个优秀的程序员,但碰巧通过PHP-My-Admin的SQL命令创建了一个MySql表。 MySQL命令如下:
SQL查询:
CREATE TABLE IF NOT EXISTS `login`.`users` (
`user_id` INT( 11 ) NOT NULL AUTO_INCREMENT COMMENT 'auto incrementing user_id of each user, unique index',
`user_name` VARCHAR( 64 ) COLLATE utf8_unicode_ci NOT NULL COMMENT 'user''s name, unique',
`user_password_hash` VARCHAR( 255 ) COLLATE utf8_unicode_ci NOT NULL COMMENT 'user''s password in salted and hashed format',
`user_email` VARCHAR( 64 ) COLLATE utf8_unicode_ci NOT NULL COMMENT 'user''s email, unique',
`user_active` TINYINT( 1 ) NOT NULL DEFAULT '0' COMMENT 'user''s activation status',
`user_activation_hash` VARCHAR( 40 ) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'user''s email verification hash string',
`user_password_reset_hash` CHAR( 40 ) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'user''s password reset code',
`user_password_reset_timestamp` BIGINT( 20 ) DEFAULT NULL COMMENT 'timestamp of the password reset request',
`user_rememberme_token` VARCHAR( 64 ) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'user''s remember-me cookie token',
`user_failed_logins` TINYINT( 1 ) NOT NULL DEFAULT '0' COMMENT 'user''s failed login attemps',
`user_last_failed_login` INT( 10 ) DEFAULT NULL COMMENT 'unix timestamp of last failed login attempt',
`user_registration_datetime` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`user_registration_ip` VARCHAR( 39 ) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0.0.0.0',
PRIMARY KEY ( `user_id` ) ,
UNIQUE KEY `user_name` ( `user_name` ) ,
UNIQUE KEY `user_email` ( `user_email` )
) ENGINE = MYISAM AUTO_INCREMENT =1 DEFAULT CHARSET = utf8 COLLATE = utf8_unicode_ci COMMENT = 'user data'
但MySQL回复了我,如下所示:
MySQL说:文档 #1142 - CREATE命令被拒绝给用户' a5175979_admin' @' localhost'对于表'用户'
请告诉我,如何更改任何权限以允许我的PHP-My-Admin传递上述SQL命令来创建一个名为" users" ?。
答案 0 :(得分:1)
在PhpMyAdmin