Jump to content
Sign in to follow this  

Basic MySQL

Recommended Posts

I'm trying to connect to a mysql database, I've never used a database in my life, but I did make one in cpanel, where a pal of mine let me use his website for testing.

Its not happening though

#include 'mysql.au3'

$sUsername = "user"
$sPassword = "Pass"
$sDatabase = "test"
$sServer = "188.65.112.***" ; there are digits here in code

$sql = _MySQLConnect($sUsername, $sPassword, $sDatabase, $sServer)
MsgBox(0,"",@error) ;=============================================== 2
If IsObj($sql) Then
    MsgBox(0, "", "Yay")
    MsgBox(0, "", "Boooo");========================================= this

I've probably gotten something basicaly incorrect, or missed something out.

Can anyone help me?


Im unsure where the @error 2 comes from as it seems the function "_MySQLConnect" sets error to 1


I've installed Mysql so I think I have the relevant drivers installed, but not certain how I would know for sure.


Perhaps its a firewall issue, what would I have to allow if it were?


I have added the wildcard "%" to Remote Mysql in cpanel, and from what I have read, this opens port 3306.

Edited by JohnOne

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post

Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...