steadyfi Posted March 15, 2015 Share Posted March 15, 2015 Hello I've got a little annoying error in MySQL. I am trying to import the database of Fairplay by Socialz (Git: https://github.com/Socialz/lua-mta-fairplay-roleplay) but when I try to create the contacts table it returns a error. I'm using phpMyAdmin MySQL Code: CREATE TABLE `contacts` ( `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, `name` VARCHAR(100) NOT NULL, `number` VARCHAR(10) UNSIGNED NOT NULL, `ownerNumber` VARCHAR(10) UNSIGNED NOT NULL, PRIMARY KEY (`id`) ) ENGINE=INNODB AUTO_INCREMENT=1 DEFAULT CHARSET=latin1; Error: #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 'unsigned NOT NULL, `ownerNumber` varchar(10) unsigned NOT NULL, PRIMARY KE' at line 4 Thanks Link to comment
JR10 Posted March 15, 2015 Share Posted March 15, 2015 You can't use UNSIGNED with a VARCHAR, you can use INTEGER instead. Link to comment
steadyfi Posted March 15, 2015 Author Share Posted March 15, 2015 (edited) You can't use UNSIGNED with a VARCHAR, you can use INTEGER instead. Thank you JR10 ! Edited March 15, 2015 by Guest Link to comment
steadyfi Posted March 15, 2015 Author Share Posted March 15, 2015 Also, when I start the server it says: ERROR: roleplay-accounts\s_accounts.lua:174: dbConnect failed; Access denied for user 'mta'@'localhost' (using password: YES) local databaseConfig = { ["type"] = "mysql", ["hostname"] = "127.0.0.1", ["database"] = "mtarp", ["username"] = "mta", ["password"] = "no-need-to-see-the-password" } I have created the user with privileges to all databases and the password is correct. What do I do ? Link to comment
JR10 Posted March 16, 2015 Share Posted March 16, 2015 Are you sure that the host is correct? The host has to match the user's host on the server. Link to comment
steadyfi Posted March 16, 2015 Author Share Posted March 16, 2015 Are you sure that the host is correct? The host has to match the user's host on the server. 127.0.0.1 is basicaly localhost and my MySQL server is hosted on my PC along with the server so yeah Summary: MySQL: Hosted on my PC MTA Server: Hosted on my PC Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now