Jump to content
UBot Underground

Anyone know how to use the MySQL Database connection?


Recommended Posts

I'd really like to dive into the new Database commands, but I haven't even been able to get it to connect to one, since there is no tute nor documentation on this new functionality.

 

I've made a MySql database through cpanel on my shared webhost, and have all the credentials to put in the "connect to database" feilds, but it never connects.... I suspect I'm not formatting host properly.

 

All examples here on this forum & on the Wiki mention using "localhost" as the host, but that didn't work, I'd assume because I'm hosting the DB at a web host. I've tried variation of my host's login URL, but none of them work either. Anyone know how it's done? Thanks in advance.

Link to post
Share on other sites

If  your database is on hostgator,then this actions are required to connect to your database:

 

1. Go to "Database" in your cPanel and click "Remote MySQL" then add your computer IP on Remote Database Access Hosts ->  Add Access Host

 

If the IP is dynamic and some numbers not change from this IP, you can use a wildcard : "%"  (like 92.123.%.%)

.

2.On UbotStudio, this snippet work for connection to database:

plugin command("DatabaseCommands.dll", "connect to database", "server=X.X.X.X;uid=userdb ; pwd=userpassword; database=yourdatabase; port=3306; pooling=false") {
}

* where X.X.X.X is IP (from hosting account)

 

Also it works the same with main domain instead hosting acc. IP.

  • Like 1
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...