platchford02 Posted August 9, 2020 Share Posted August 9, 2020 hi there I do not know why im getting this it was working when I was using phpmyadmin 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 'IF NOT EXISTS `arma3`@`localhost` IDENTIFIED BY 'changeme'' at line 1 Link to comment Share on other sites More sharing options...
numpty Posted August 9, 2020 Share Posted August 9, 2020 You are using an unedit mysql file... you need to remove that line and it should work as its trying to connect via user arma 3 only via localhost... so thats the reason Link to comment Share on other sites More sharing options...
numpty Posted August 9, 2020 Share Posted August 9, 2020 15 minutes ago, platchford02 said: hi there I do not know why im getting this it was working when I was using phpmyadmin 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 'IF NOT EXISTS `arma3`@`localhost` IDENTIFIED BY 'changeme'' at line 1 this is how my first few lines look like if this helps change root to a specific user if you want SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Compatible with newer MySQL versions. (After MySQL-5.5) -- This SQL uses utf8mb4 and has CURRENT_TIMESTAMP function. -- /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Database: `altislife` -- Default Schema -- -- -- Drop procedures to ensure no conflicts -- DROP PROCEDURE IF EXISTS `resetLifeVehicles`; DROP PROCEDURE IF EXISTS `deleteDeadVehicles`; DROP PROCEDURE IF EXISTS `deleteOldHouses`; DROP PROCEDURE IF EXISTS `deleteOldGangs`; DROP PROCEDURE IF EXISTS `deleteOldContainers`; DROP PROCEDURE IF EXISTS `deleteOldWanted`; DELIMITER $$ -- -- Procedures -- Edit root to match a user in MySQL -- For external databases: Edit localhost to match rootserver IP -- CREATE DEFINER=`root`@`localhost` PROCEDURE `resetLifeVehicles`() BEGIN UPDATE `vehicles` SET `active`= 0; END$$ CREATE DEFINER=`root`@`localhost` PROCEDURE `deleteDeadVehicles`() BEGIN DELETE FROM `vehicles` WHERE `alive` = 0; END$$ CREATE DEFINER=`root`@`localhost` PROCEDURE `deleteOldHouses`() BEGIN DELETE FROM `houses` WHERE `owned` = 0; END$$ CREATE DEFINER=`root`@`localhost` PROCEDURE `deleteOldGangs`() BEGIN DELETE FROM `gangs` WHERE `active` = 0; END$$ CREATE DEFINER=`root`@`localhost` PROCEDURE `deleteOldContainers`() BEGIN DELETE FROM `containers` WHERE `owned` = 0; Link to comment Share on other sites More sharing options...
platchford02 Posted August 9, 2020 Author Share Posted August 9, 2020 yes but it all the same as it was I just stop using phpmyadmin to usesing workbeach Link to comment Share on other sites More sharing options...
numpty Posted August 9, 2020 Share Posted August 9, 2020 Just now, platchford02 said: yes but it all the same as it was I just stop using phpmyadmin to usesing workbeach i dont understand... you stopped using phpmyadmin and started using workbench and got the error...?? Link to comment Share on other sites More sharing options...
platchford02 Posted August 9, 2020 Author Share Posted August 9, 2020 I was using xampp with phpmyadmin for the DB. and now I using mySQL installer for the DB all of the same names and passwords Link to comment Share on other sites More sharing options...
numpty Posted August 9, 2020 Share Posted August 9, 2020 It should work if you update the file with my change then... and also make sure you remove the create database line in the sql file otherwise will mess it up Link to comment Share on other sites More sharing options...
platchford02 Posted August 9, 2020 Author Share Posted August 9, 2020 ok it work if I do not do it in tcadmin. I thing the Config For Arma 3 Altis Life needs phpmyadmin to work Link to comment Share on other sites More sharing options...
numpty Posted August 9, 2020 Share Posted August 9, 2020 It doesn't if you have the sql creation script coded in as custom script properly it should auto import.. if it was my config they should be in there just look at the create dB script last kindle you mist rename sql to the file name in there and also put in correct directory... you can change directory if you want or file name up to you but it should work as has for me for last few years Sent from my SM-G975F using Tapatalk Link to comment Share on other sites More sharing options...
platchford02 Posted August 9, 2020 Author Share Posted August 9, 2020 ok I am getting some where Operation DROP USER failed for 'altis_db8'@'localhost' Link to comment Share on other sites More sharing options...
numpty Posted August 9, 2020 Share Posted August 9, 2020 Vheck if that user is created Link to comment Share on other sites More sharing options...
platchford02 Posted August 9, 2020 Author Share Posted August 9, 2020 yes it making the user and it putting tables in it and then I get Access denied for user 'arma3'@'localhost' (using password: YES Link to comment Share on other sites More sharing options...
numpty Posted August 9, 2020 Share Posted August 9, 2020 Then inside the extdb cfg it has wrong info Link to comment Share on other sites More sharing options...
platchford02 Posted August 9, 2020 Author Share Posted August 9, 2020 [Main] Version = 1 Randomize Config File = false ;; Randomizes Config File after loading. ;; Recommend to turn on, if you have enabled filepatching on arma. Allow Reset = false ;; Allows 9:RESET, usefull for development work Thread = 0; ;; Option to force number of worker threads for extDB3. ;; Auto = 0, Min = 2, Max = 6 [Log] Flush = true; ;; Flush logfile after each update. ;; Option really only usefull if running DEBUG BUILD [![MySQLUser]] IP = $[Service.IpAddress] Port = 3306 Username = ![MySQLUser] Password = ![MySQLPassword] Database = ![MySQLUser] Link to comment Share on other sites More sharing options...
numpty Posted August 9, 2020 Share Posted August 9, 2020 Ok that the template if sk thats correct... but somewhere its using the username arma 3 somewhere Check all files on created server for anything mentioning arma3 like extdb stuff like that.. and I don't mean the templates I mean the actual created file Link to comment Share on other sites More sharing options...
platchford02 Posted August 9, 2020 Author Share Posted August 9, 2020 its not letting me make a server it coming up when it making the server at like 90% Link to comment Share on other sites More sharing options...
numpty Posted August 9, 2020 Share Posted August 9, 2020 Make sure the top of sql is like mine that I sent that will fix the issue Link to comment Share on other sites More sharing options...
platchford02 Posted August 10, 2020 Author Share Posted August 10, 2020 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Compatible with newer MySQL versions. (After MySQL-5.5) -- This SQL uses utf8mb4 and has CURRENT_TIMESTAMP function. -- /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Drop procedures to ensure no conflicts -- DROP PROCEDURE IF EXISTS `resetLifeVehicles`; DROP PROCEDURE IF EXISTS `deleteDeadVehicles`; DROP PROCEDURE IF EXISTS `deleteOldHouses`; DROP PROCEDURE IF EXISTS `deleteOldGangs`; DROP PROCEDURE IF EXISTS `deleteOldContainers`; DROP PROCEDURE IF EXISTS `deleteOldWanted`; DELIMITER $$ -- -- Procedures -- CURRENT_USER function returns the name of the current user in the SQL Server database. -- CREATE DEFINER=CURRENT_USER PROCEDURE `resetLifeVehicles`() BEGIN UPDATE `vehicles` SET `active`= 0; END$$ CREATE DEFINER=CURRENT_USER PROCEDURE `deleteDeadVehicles`() BEGIN DELETE FROM `vehicles` WHERE `alive` = 0; END$$ CREATE DEFINER=CURRENT_USER PROCEDURE `deleteOldHouses`() BEGIN DELETE FROM `houses` WHERE `owned` = 0; END$$ CREATE DEFINER=CURRENT_USER PROCEDURE `deleteOldGangs`() BEGIN DELETE FROM `gangs` WHERE `active` = 0; END$$ CREATE DEFINER=CURRENT_USER PROCEDURE `deleteOldContainers`() BEGIN DELETE FROM `containers` WHERE `owned` = 0; END$$ CREATE DEFINER=CURRENT_USER PROCEDURE `deleteOldWanted`() BEGIN DELETE FROM `wanted` WHERE `active` = 0; END$$ DELIMITER ; Link to comment Share on other sites More sharing options...
numpty Posted August 10, 2020 Share Posted August 10, 2020 That the full file or just few lines? Link to comment Share on other sites More sharing options...
platchford02 Posted August 10, 2020 Author Share Posted August 10, 2020 this is full SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Compatible with newer MySQL versions. (After MySQL-5.5) -- This SQL uses utf8mb4 and has CURRENT_TIMESTAMP function. -- /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Drop procedures to ensure no conflicts -- DROP PROCEDURE IF EXISTS `resetLifeVehicles`; DROP PROCEDURE IF EXISTS `deleteDeadVehicles`; DROP PROCEDURE IF EXISTS `deleteOldHouses`; DROP PROCEDURE IF EXISTS `deleteOldGangs`; DROP PROCEDURE IF EXISTS `deleteOldContainers`; DROP PROCEDURE IF EXISTS `deleteOldWanted`; DELIMITER $$ -- -- Procedures -- CURRENT_USER function returns the name of the current user in the SQL Server database. -- CREATE DEFINER=CURRENT_USER PROCEDURE `resetLifeVehicles`() BEGIN UPDATE `vehicles` SET `active`= 0; END$$ CREATE DEFINER=CURRENT_USER PROCEDURE `deleteDeadVehicles`() BEGIN DELETE FROM `vehicles` WHERE `alive` = 0; END$$ CREATE DEFINER=CURRENT_USER PROCEDURE `deleteOldHouses`() BEGIN DELETE FROM `houses` WHERE `owned` = 0; END$$ CREATE DEFINER=CURRENT_USER PROCEDURE `deleteOldGangs`() BEGIN DELETE FROM `gangs` WHERE `active` = 0; END$$ CREATE DEFINER=CURRENT_USER PROCEDURE `deleteOldContainers`() BEGIN DELETE FROM `containers` WHERE `owned` = 0; END$$ CREATE DEFINER=CURRENT_USER PROCEDURE `deleteOldWanted`() BEGIN DELETE FROM `wanted` WHERE `active` = 0; END$$ DELIMITER ; -- -------------------------------------------------------- -- -- Table structure for table `players` -- CREATE TABLE IF NOT EXISTS `players` ( `uid` int(6) NOT NULL AUTO_INCREMENT, `name` varchar(32) NOT NULL, `aliases` text NOT NULL, `pid` varchar(17) NOT NULL, `cash` int(100) NOT NULL DEFAULT '0', `bankacc` int(100) NOT NULL DEFAULT '0', `coplevel` enum('0','1','2','3','4','5','6','7') NOT NULL DEFAULT '0', `mediclevel` enum('0','1','2','3','4','5') NOT NULL DEFAULT '0', `civ_licenses` text NOT NULL, `cop_licenses` text NOT NULL, `med_licenses` text NOT NULL, `civ_gear` text NOT NULL, `cop_gear` text NOT NULL, `med_gear` text NOT NULL, `civ_stats` varchar(32) NOT NULL DEFAULT '"[100,100,0]"', `cop_stats` varchar(32) NOT NULL DEFAULT '"[100,100,0]"', `med_stats` varchar(32) NOT NULL DEFAULT '"[100,100,0]"', `arrested` tinyint(1) NOT NULL DEFAULT '0', `adminlevel` enum('0','1','2','3','4','5') NOT NULL DEFAULT '0', `donorlevel` enum('0','1','2','3','4','5') NOT NULL DEFAULT '0', `blacklist` tinyint(1) NOT NULL DEFAULT '0', `civ_alive` tinyint(1) NOT NULL DEFAULT '0', `civ_position` varchar(64) NOT NULL DEFAULT '"[]"', `playtime` varchar(32) NOT NULL DEFAULT '"[0,0,0]"', `insert_time` timestamp DEFAULT CURRENT_TIMESTAMP, `last_seen` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`uid`), UNIQUE KEY `pid` (`pid`), KEY `name` (`name`), KEY `blacklist` (`blacklist`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=12 ; -- -------------------------------------------------------- -- -- Table structure for table `vehicles` -- CREATE TABLE IF NOT EXISTS `vehicles` ( `id` int(6) NOT NULL AUTO_INCREMENT, `side` varchar(16) NOT NULL, `classname` varchar(64) NOT NULL, `type` varchar(16) NOT NULL, `pid` varchar(17) NOT NULL, `alive` tinyint(1) NOT NULL DEFAULT '1', `blacklist` tinyint(1) NOT NULL DEFAULT '0', `active` tinyint(1) NOT NULL DEFAULT '0', `plate` int(20) NOT NULL, `color` int(20) NOT NULL, `inventory` text NOT NULL, `gear` text NOT NULL, `fuel` double NOT NULL DEFAULT '1', `damage` varchar(256) NOT NULL, `insert_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `side` (`side`), KEY `pid` (`pid`), KEY `type` (`type`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=2 ; -- -------------------------------------------------------- -- -- Table structure for table `houses` -- Needed for extDB latest update on git -- CREATE TABLE IF NOT EXISTS `houses` ( `id` int(6) NOT NULL AUTO_INCREMENT, `pid` varchar(17) NOT NULL, `pos` varchar(64) DEFAULT NULL, `owned` tinyint(1) DEFAULT '0', `garage` tinyint(1) NOT NULL DEFAULT '0', `insert_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`,`pid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=4 ; -- -------------------------------------------------------- -- -- Table structure for table `gangs` -- Needed for extDB latest update on git -- CREATE TABLE IF NOT EXISTS `gangs` ( `id` int(6) NOT NULL AUTO_INCREMENT, `owner` varchar(32) DEFAULT NULL, `name` varchar(32) DEFAULT NULL, `members` text, `maxmembers` int(3) DEFAULT '8', `bank` int(100) DEFAULT '0', `active` tinyint(1) DEFAULT '1', `insert_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `name_UNIQUE` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- -- -- Table structure for table `containers` -- Needed for extDB latest update on git -- CREATE TABLE IF NOT EXISTS `containers` ( `id` int(6) NOT NULL AUTO_INCREMENT, `pid` varchar(17) NOT NULL, `classname` varchar(32) NOT NULL, `pos` varchar(64) DEFAULT NULL, `inventory` text NOT NULL, `gear` text NOT NULL, `dir` varchar(128) DEFAULT NULL, `active` tinyint(1) NOT NULL DEFAULT '0', `owned` tinyint(1) DEFAULT '0', `insert_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`,`pid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=4; -- -------------------------------------------------------- -- -- Table structure for table `wanted` -- Needed for extDB latest update on git -- CREATE TABLE IF NOT EXISTS `wanted` ( `wantedID` varchar(64) NOT NULL, `wantedName` varchar(32) NOT NULL, `wantedCrimes` text NOT NULL, `wantedBounty` int(100) NOT NULL, `active` tinyint(1) NOT NULL DEFAULT '0', `insert_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`wantedID`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -------------------------------------------------------- -- -- Creates default user `arma3` with password `changeme` unless it already exists -- Granting permissions to user `arma3`, created below -- Reloads the privileges from the grant tables in the MySQL system database. -- CREATE USER IF NOT EXISTS `arma3`@`localhost` IDENTIFIED BY 'changeme'; GRANT SELECT, UPDATE, INSERT, EXECUTE ON `altislife`.* TO 'arma3'@'localhost'; FLUSH PRIVILEGES; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; Link to comment Share on other sites More sharing options...
numpty Posted August 10, 2020 Share Posted August 10, 2020 Right at very end of file remove this CREATE USER IF NOT EXISTS `arma3`@`localhost` IDENTIFIED BY 'changeme'; GRANT SELECT, UPDATE, INSERT, EXECUTE ON `altislife`.* TO 'arma3'@'localhost'; FLUSH PRIVILEGES; Link to comment Share on other sites More sharing options...
platchford02 Posted August 10, 2020 Author Share Posted August 10, 2020 just keep getting Access denied for user 'testserver'@'localhost' (using password: YES) Link to comment Share on other sites More sharing options...
numpty Posted August 10, 2020 Share Posted August 10, 2020 That then means in the dB creation script the dB password is incorrect so it can't connect to db to creat Link to comment Share on other sites More sharing options...
platchford02 Posted August 10, 2020 Author Share Posted August 10, 2020 but I can get on the DB with that password form my pc and that copying and pasting Link to comment Share on other sites More sharing options...
platchford02 Posted August 10, 2020 Author Share Posted August 10, 2020 (edited) ok got it working but it not delete the User for that DB when I delete the server. so it error when I make a new one Edited August 10, 2020 by platchford02 Link to comment Share on other sites More sharing options...
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