Jump to content

Mysql custom script


Recommended Posts

Hi guys,

i need help, i want to add mysql custom script on game server. i am new to tcadmin. i got a script

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

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 by BlackBloods
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Terms of Use