BlackBloods Posted July 16, 2014 Share Posted July 16, 2014 Hi guys, i need help, i want to add mysql custom script on game server. i am new to tcadmin. i got a script #!/bin/bash dbname=${ThisService_UserName}_${ThisService_ServiceId} user=${ThisUser_UserName} password=${ThisUser_Password} mysql -h localhost -u root -pYourPassword -e "CREATE USER '$user'@'%%'" mysql -h localhost -u root -pYourPassword -e "SET PASSWORD FOR '$user'@'%%' = PASSWORD('$password')" mysql -h localhost -u root -pYourPassword -e "GRANT USAGE ON * . * TO '$user'@'%%' IDENTIFIED BY '$password' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0" mysql -h localhost -u root -pYourPassword -e "CREATE DATABASE IF NOT EXISTS $dbname" mysql -h localhost -u root -pYourPassword -e "GRANT ALL PRIVILEGES ON $dbname . * TO '$user'@'%%'" when i add this in custom script with custom icon event, when i open it, it show me a blank page so i contacted support ticket, as they said You install mysql on your server and you create a custom script in the game's settings for the after created event that executes those commands. what script they meant ? you create a custom script in the game's settings for the after created event can someone give me that script ? thnz for reading sorry for my bad english Link to comment Share on other sites More sharing options...
Dennis Posted July 16, 2014 Share Posted July 16, 2014 (edited) The script is what you have in code tags. Check this: http://clientforums.tcadmin.com/showthread.php?t=11530 Edited July 16, 2014 by DennisMidjord Link to comment Share on other sites More sharing options...
BlackBloods Posted July 16, 2014 Author Share Posted July 16, 2014 (edited) I got this script from that link, I added this code on custom script But it show blank page, when i ask to support ticket, they said 'There is no MySQL variable contain' How i can create a bash script for game ? Bash script = custom script ? Edited July 16, 2014 by BlackBloods 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