File Not Executeing

Ask questions about dedicated servers here and we and other users will do our best to answer them. Please also refer to the self-help section for tutorials and answers to the most commonly asked questions.
Post Reply
Obligated
New to forums
New to forums
Posts: 12
https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
Joined: Wed Mar 18, 2015 3:39 pm

File Not Executeing

Post by Obligated »

I have set up a MySQL database for ArmA3 (Altis Life) and I am using navicat to connect to it. I am trying execute the arma3life-4.0.sql to my rangerz_arma3life database but I get this.

Queries: 21
Processed:
Errors: 21
Time: 00:00.43

Code: Select all

[Err] 1044 - Access denied for user 'rangerz'@'%' to database 'arma3life'
[Err] SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!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 utf8 */;

--
-- Database: `rangerz_arma3life`
-- Default Schema
--
CREATE DATABASE IF NOT EXISTS `arma3life` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
USE `arma3life`;

--
-- Procedures
-- Edit arma3 and root to match a user in MySQL
--
CREATE DEFINER=`rangerz`@`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;


-- --------------------------------------------------------

--
-- Table structure for table `players`
--

CREATE TABLE IF NOT EXISTS `players` (
  `uid` int(12) NOT NULL AUTO_INCREMENT,
  `name` varchar(32) NOT NULL,
  `playerid` varchar(50) 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',
  `cop_licenses` text,
  `civ_licenses` text,
  `med_licenses` text,
  `cop_gear` text NOT NULL,
  `med_gear` text NOT NULL,
  `mediclevel` enum('0','1','2','3','4','5') NOT NULL DEFAULT '0',
  `arrested` tinyint(1) NOT NULL DEFAULT '0',
  `aliases` text NOT NULL,
  `adminlevel` enum('0','1','2','3') NOT NULL DEFAULT '0',
  `donatorlvl` enum('0','1','2','3','4','5') NOT NULL DEFAULT '0',
  `civ_gear` text NOT NULL,
  `blacklist` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`uid`),
  UNIQUE KEY `playerid` (`playerid`),
  KEY `name` (`name`),
  KEY `blacklist` (`blacklist`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=12 ;

-- --------------------------------------------------------

--
-- Table structure for table `vehicles`
--

CREATE TABLE IF NOT EXISTS `vehicles` (
  `id` int(12) NOT NULL AUTO_INCREMENT,
  `side` varchar(15) NOT NULL,
  `classname` varchar(32) NOT NULL,
  `type` varchar(12) NOT NULL,
  `pid` varchar(32) NOT NULL,
  `alive` tinyint(1) NOT NULL DEFAULT '1',
  `active` tinyint(1) NOT NULL DEFAULT '0',
  `plate` int(20) NOT NULL,
  `color` int(20) NOT NULL,
  `inventory` varchar(500) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `side` (`side`),
  KEY `pid` (`pid`),
  KEY `type` (`type`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;

-- --------------------------------------------------------

--
-- Table structure for table `houses`
-- Needed for extDB latest update on git
--

CREATE TABLE IF NOT EXISTS `houses` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `pid` varchar(32) NOT NULL,
  `pos` varchar(64) DEFAULT NULL,
  `inventory` text,
  `containers` text,
  `owned` tinyint(4) DEFAULT '0',
  PRIMARY KEY (`id`,`pid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;

-- --------------------------------------------------------

--
-- Table structure for table `gangs`
-- Needed for extDB latest update on git
--

CREATE TABLE IF NOT EXISTS `gangs` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `owner` varchar(32) DEFAULT NULL,
  `name` varchar(32) DEFAULT NULL,
  `members` text,
  `maxmembers` int(2) DEFAULT '8',
  `bank` int(100) DEFAULT '0',
  `active` tinyint(4) DEFAULT '1',
  PRIMARY KEY (`id`),
  UNIQUE KEY `name_UNIQUE` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `wanted`
-- Needed for extDB latest update on git
--

CREATE TABLE `wanted` (
  `wantedID` varchar(50) NOT NULL,
  `wantedName` varchar(52) NOT NULL,
  `wantedCrimes` text NOT NULL,
  `wantedBounty` int(100) NOT NULL,
  `active` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`wantedID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin
[Msg] Finished - Unsuccessfully
--------------------------------------------------

If anyone knows what to do please share.
User avatar
Edge100x
Founder
Founder
Posts: 13120
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: File Not Executeing

Post by Edge100x »

Are you executing this as root? It appears that your user does not have the correct permissions.
Obligated
New to forums
New to forums
Posts: 12
Joined: Wed Mar 18, 2015 3:39 pm

Re: File Not Executeing

Post by Obligated »

I am not useing root to execute it. I am useing the rangerz@hbgjailbreak.site.nfoservers.com, but the funny thing is that is has all the permissions under Server Privileges (Under just "Privileges" I click grant but nothing happens.
User avatar
Edge100x
Founder
Founder
Posts: 13120
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: File Not Executeing

Post by Edge100x »

If this is on our shared webhosting, you won't be able to import that. There are few things stopping you, but the only one you can't work around is that we aren't set up to allow customer-defined MySQL routines. You'd need to use an unmanaged VDS for this right now.
Obligated
New to forums
New to forums
Posts: 12
Joined: Wed Mar 18, 2015 3:39 pm

Re: File Not Executeing

Post by Obligated »

Edge100x wrote:If this is on our shared webhosting, you won't be able to import that. There are few things stopping you, but the only one you can't work around is that we aren't set up to allow customer-defined MySQL routines. You'd need to use an unmanaged VDS for this right now.
Right now at the moment I am useing an unmananged VDS and this is my setup
http://gyazo.com/b758a1484e777659b8beaa783d7fa02a

Im trying to execute the arma3life-4.0.sql I think the first reason was because the database info in the file did not match, then I matched it up now I think it is the privileges (witch I gave them all to the 2 users)

After I execute http://gyazo.com/430b0a6353f4a1600bfef048e26b4161
Caliban55
This is my homepage
This is my homepage
Posts: 439
Joined: Sat Sep 04, 2010 10:20 am
Location: Cologne, Gemany
Contact:

Re: File Not Executeing

Post by Caliban55 »

Is there a special reason why you are trying to connect with a remote user to a local database (rangerz@hbgjailbreak.site.nfoservers.com)?

On the unmanaged VDS you can (as long as your VDS resources are not limited):
Install the MySQL server
Install the Arma 3 server with Altis Life
Create a MySQL database/schema for Altis Life
Create a user with access permission to that database, from a localhost environment (on the same machine, rangerz@localhost)
Configure the Arma 3 server to connect to the database.

You can use MySQL Workbench to connect to the MySQL server from the VDS directly, or from your home client, or you can use NaviCat, command line, SSH, whatever you prefer.

http://dev.mysql.com/downloads/workbench/
Obligated
New to forums
New to forums
Posts: 12
Joined: Wed Mar 18, 2015 3:39 pm

Re: File Not Executeing

Post by Obligated »

I have a connection called altislifeserver, within that connection is my database (rangerz_arma3life)
If you forward to 11:00 in this video https://www.youtube.com/watch?v=A2IeTVaVo7E You can see what im trying to do. But when I did as he says it will not work for me.

This is what I have in my arma3life-4.0.sql

Code: Select all

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!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 utf8 */;

--
-- Database: `rangerz_arma3life`
-- Default Schema
--
CREATE DATABASE IF NOT EXISTS `rangerz_arma3life` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
USE `rangerz_arma3life`;

DELIMITER $$
--
-- Procedures
-- Edit arma3 and root to match a user in MySQL
--
CREATE DEFINER=`rangerz`@`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$$

DELIMITER ;

-- --------------------------------------------------------

--
-- Table structure for table `players`
--

CREATE TABLE IF NOT EXISTS `players` (
  `uid` int(12) NOT NULL AUTO_INCREMENT,
  `name` varchar(32) NOT NULL,
  `playerid` varchar(50) 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',
  `cop_licenses` text,
  `civ_licenses` text,
  `med_licenses` text,
  `cop_gear` text NOT NULL,
  `med_gear` text NOT NULL,
  `mediclevel` enum('0','1','2','3','4','5') NOT NULL DEFAULT '0',
  `arrested` tinyint(1) NOT NULL DEFAULT '0',
  `aliases` text NOT NULL,
  `adminlevel` enum('0','1','2','3') NOT NULL DEFAULT '0',
  `donatorlvl` enum('0','1','2','3','4','5') NOT NULL DEFAULT '0',
  `civ_gear` text NOT NULL,
  `blacklist` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`uid`),
  UNIQUE KEY `playerid` (`playerid`),
  KEY `name` (`name`),
  KEY `blacklist` (`blacklist`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=12 ;

-- --------------------------------------------------------

--
-- Table structure for table `vehicles`
--

CREATE TABLE IF NOT EXISTS `vehicles` (
  `id` int(12) NOT NULL AUTO_INCREMENT,
  `side` varchar(15) NOT NULL,
  `classname` varchar(32) NOT NULL,
  `type` varchar(12) NOT NULL,
  `pid` varchar(32) NOT NULL,
  `alive` tinyint(1) NOT NULL DEFAULT '1',
  `active` tinyint(1) NOT NULL DEFAULT '0',
  `plate` int(20) NOT NULL,
  `color` int(20) NOT NULL,
  `inventory` varchar(500) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `side` (`side`),
  KEY `pid` (`pid`),
  KEY `type` (`type`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;

-- --------------------------------------------------------

--
-- Table structure for table `houses`
-- Needed for extDB latest update on git
--

CREATE TABLE IF NOT EXISTS `houses` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `pid` varchar(32) NOT NULL,
  `pos` varchar(64) DEFAULT NULL,
  `inventory` text,
  `containers` text,
  `owned` tinyint(4) DEFAULT '0',
  PRIMARY KEY (`id`,`pid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;

-- --------------------------------------------------------

--
-- Table structure for table `gangs`
-- Needed for extDB latest update on git
--

CREATE TABLE IF NOT EXISTS `gangs` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `owner` varchar(32) DEFAULT NULL,
  `name` varchar(32) DEFAULT NULL,
  `members` text,
  `maxmembers` int(2) DEFAULT '8',
  `bank` int(100) DEFAULT '0',
  `active` tinyint(4) DEFAULT '1',
  PRIMARY KEY (`id`),
  UNIQUE KEY `name_UNIQUE` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `wanted`
-- Needed for extDB latest update on git
--

CREATE TABLE `wanted` (
  `wantedID` varchar(50) NOT NULL,
  `wantedName` varchar(52) NOT NULL,
  `wantedCrimes` text NOT NULL,
  `wantedBounty` int(100) NOT NULL,
  `active` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`wantedID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

/*!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 */;

When I execute the arma3life-4.o.sql file to rangerz_arma3life (the database for the server) I get this error.

Code: Select all

[Err] 1044 - Access denied for user 'rangerz'@'%' to database 'arma3life'
[Err] --
-- Database: `rangerz_arma3life`
-- Default Schema
--
CREATE DATABASE IF NOT EXISTS `arma3life` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
[Err] 1044 - Access denied for user 'rangerz'@'%' to database 'arma3life'
[Err] USE `arma3life`;
[Err] 1227 - Access denied; you need (at least one of) the SUPER privilege(s) for this operation
[Err] --
-- Procedures
-- Edit arma3 and root to match a user in MySQL
--
CREATE DEFINER=`rangerz`@`localhost` PROCEDURE `resetLifeVehicles`()
BEGIN
	UPDATE `vehicles` SET `active`= 0;
END;
[Err] 1227 - Access denied; you need (at least one of) the SUPER privilege(s) for this operation
[Err] CREATE DEFINER=`root`@`localhost` PROCEDURE `deleteDeadVehicles`()
BEGIN
	DELETE FROM `vehicles` WHERE `alive` = 0;
END;
[Err] 1227 - Access denied; you need (at least one of) the SUPER privilege(s) for this operation
[Err] CREATE DEFINER=`root`@`localhost` PROCEDURE `deleteOldHouses`()
BEGIN
  DELETE FROM `houses` WHERE `owned` = 0;
END;
[Err] 1227 - Access denied; you need (at least one of) the SUPER privilege(s) for this operation
[Err] CREATE DEFINER=`root`@`localhost` PROCEDURE `deleteOldGangs`()
BEGIN
  DELETE FROM `gangs` WHERE `active` = 0;
END;
[Err] 1050 - Table 'wanted' already exists
[Err] -- --------------------------------------------------------

--
-- Table structure for table `wanted`
-- Needed for extDB latest update on git
--

CREATE TABLE `wanted` (
  `wantedID` varchar(50) NOT NULL,
  `wantedName` varchar(52) NOT NULL,
  `wantedCrimes` text NOT NULL,
  `wantedBounty` int(100) NOT NULL,
  `active` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`wantedID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
[Msg] Finished - Unsuccessfully
--------------------------------------------------
When I click on the the connection for the server (altislifeserver) then click user. It will give me this

Code: Select all

1142 - SELECT commaned denied to user 'rangerz'@'v-XXX-XXX-XX-XXX.unman-vds.internap-la.nfoservers.com'fot table 'user'
But when I click localhost_3306, then click user it will show my two users "rangerz@hbgjailbreak.site.nfoservers.com" and "root@localhost"
User avatar
TacTicToe
This is my homepage
This is my homepage
Posts: 848
Joined: Fri Feb 18, 2011 1:08 pm
Location: USA
Contact:

Re: File Not Executeing

Post by TacTicToe »

Maybe I am just missing something here, but why not install phpmyadmin and then upload the SQL and create everything that way? Then use phpmyadmin to create the username and password with full access to that database and you should be good to go.
Caliban55
This is my homepage
This is my homepage
Posts: 439
Joined: Sat Sep 04, 2010 10:20 am
Location: Cologne, Gemany
Contact:

Re: File Not Executeing

Post by Caliban55 »

I think you are making this unnecessary complicated, Obligated.

Why don't you log into your VDS via Remote Desktop, connect from there to your MySQL server with root level access (log in as the root user, which connects from localhost) and then import the SQL file. You can do this with NaviCat, or MySQL Workbench, or from the command line, whatever you are most comfortable with.

Alternatively, you can log in from your home computer if you allowed root (or the ranger user) access from your home IP/computer (with Workbench/NaviCat).

Also, I think your database rights for the ranger database user are not correct to when it comes to permissions for that database/remote connection.
Post Reply