Jump to content

MYSQL DB create dataBase


Recommended Posts

I have found this topic about handling a MySQL DB: http://www.autoitscript.com/forum/index.ph...showtopic=20814

, but i couldn't find how to create a MySql DB... I have searched Google and found some topics, but I am still couldn't understand.

Could someone give me an example of creating a DB with username and password.

Thank you!

I do not like stupid and idiot people that write idiot things...If you are one, do not write.

Link to comment
Share on other sites

  • Developers

Have you looked at the available set of UDF's in the standard installers Helpfile?

"SQLite Management"

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Have you looked at the available set of UDF's in the standard installers Helpfile?

"SQLite Management"

Jos

Yes, I have worked with those SQLITE functions, but I am talking about MySQL...

Thx for reply anyway.

Mihai

I do not like stupid and idiot people that write idiot things...If you are one, do not write.

Link to comment
Share on other sites

Try these UDFs: http://www.autoitscript.com/forum/index.php?showtopic=85617

Then use something like this:

_MySQL_InitLibrary()
$MysqlConn = _MySQL_Init()

$connected = _MySQL_Real_Connect($MysqlConn,"HOST","USER","PASS")

_MySQL_Real_Query($MysqlConn, "CREATE DATABASE *********")

; Close connection
_MySQL_Close($MysqlConn)
; exit MYSQL
_MySQL_EndLibrary()

For more information about CREATE DATABASE look here: http://dev.mysql.com/doc/refman/5.1/en/create-database.html

Edited by ProgAndy

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Link to comment
Share on other sites

Try these UDFs: http://www.autoitscript.com/forum/index.php?showtopic=85617

Then use something like this:

_MySQL_InitLibrary()
$MysqlConn = _MySQL_Init()

$connected = _MySQL_Real_Connect($MysqlConn,"HOST","USER","PASS")

_MySQL_Real_Query($MysqlConn, "CREATE DATABASE *********")

; Close connection
_MySQL_Close($MysqlConn)
; exit MYSQL
_MySQL_EndLibrary()

For more information about CREATE DATABASE look here: http://dev.mysql.com/doc/refman/5.1/en/create-database.html

Thx for reply!

I have one question thought...I whant to create a database on my site, but I have truble conecting to it. I have tryed the host,user and pass from the ftp and from the administration pannel but doesn't conect. What settings should I use?

I do not like stupid and idiot people that write idiot things...If you are one, do not write.

Link to comment
Share on other sites

Thx for reply!

I have one question thought...I whant to create a database on my site, but I have truble conecting to it. I have tryed the host,user and pass from the ftp and from the administration pannel but doesn't conect. What settings should I use?

Some sites will only allow connection from localhost to prevent connections from outside, so first check if they allow you to connect.

Software:Model Train Calculator (Screen)Autoit3 beginner!
Link to comment
Share on other sites

Some sites will only allow connection from localhost to prevent connections from outside, so first check if they allow you to connect.

how could I verify if connecting from outside is allowed?

I do not like stupid and idiot people that write idiot things...If you are one, do not write.

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...