steadyfi Posted March 15, 2015 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 My Work: OpenTeams | DayZ Admin Panel | vAuth Must-Have Library: MTA Lua Async ApocalipZ Owner coming back soon!
JR10 Posted March 15, 2015 Posted March 15, 2015 You can't use UNSIGNED with a VARCHAR, you can use INTEGER instead. Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
steadyfi Posted March 15, 2015 Author 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 My Work: OpenTeams | DayZ Admin Panel | vAuth Must-Have Library: MTA Lua Async ApocalipZ Owner coming back soon!
steadyfi Posted March 15, 2015 Author 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 ? My Work: OpenTeams | DayZ Admin Panel | vAuth Must-Have Library: MTA Lua Async ApocalipZ Owner coming back soon!
JR10 Posted March 16, 2015 Posted March 16, 2015 Are you sure that the host is correct? The host has to match the user's host on the server. Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
steadyfi Posted March 16, 2015 Author 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 My Work: OpenTeams | DayZ Admin Panel | vAuth Must-Have Library: MTA Lua Async ApocalipZ Owner coming back soon!
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