tinboye Posted April 22, 2016 Share Posted April 22, 2016 Im trying to get my script to work so when the gameserver is created then it will create mysql user/pass and then import sql data into that database. when i run this script then i get an error 4/22/2016 10:36:29 PM 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 ''exile_2'' at line 1 4/22/2016 10:36:29 PM TCAdmin.SDK.Database.DatabaseException: 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 ''exile_2'' at line 1 ---> 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 ''exile_2'' at line 1 --- End of inner exception stack trace --- at Microsoft.Scripting.Interpreter.ThrowInstruction.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.RunInstructions(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1) at IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx) at IronPython.Compiler.RuntimeScriptCode.InvokeTarget(Scope scope) at Microsoft.Scripting.Hosting.ScriptSource.Execute(ScriptScope scope) at TCAdmin.SDK.Scripting.Engines.IronPythonEngine.Execute(Credentials credentials) at TCAdmin.SDK.Scripting.ScriptEngineManager.Execute() at TCAdmin.GameHosting.SDK.Objects.GameScript.ExecuteEventScripts(ScriptEngineManager scriptEngineManager, ServiceEvent eventScript, ObjectList scripts) at TCAdmin.GameHosting.Automation.AutomationProcesses.***1345;() at TCAdmin.GameHosting.Automation.AutomationProcesses.Start() at TCAdmin.TaskScheduler.ModuleApi.StepBase.Start(Object arguments) this is the ironpython script im using http://pastebin.com/Fv4zgAz4 Link to comment Share on other sites More sharing options...
barrycarey Posted April 23, 2016 Share Posted April 23, 2016 The query that is being created is not correct. What is exile_2? Is it a database name or a username? Link to comment Share on other sites More sharing options...
barrycarey Posted April 23, 2016 Share Posted April 23, 2016 Also, instead of putting all of the SQL in the script it would probably be easier to bundle a .sql with your game files or download it from somewhere via your install script. Look at the restore example here to see how to read in an SQL file: http://help.tcadmin.com/Automatically_Create_a_MySQL_Database#Backup_the_database_when_the_service_is_moved_and_restore_it_on_the_new_server 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