Jump to content
Sign in to follow this  
darzanmihai

MYSQL DB create dataBase

Recommended Posts

darzanmihai

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.

Share this post


Link to post
Share on other sites
Jos

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

"SQLite Management"

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
darzanmihai

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.

Share this post


Link to post
Share on other sites
darzanmihai

someone?


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

Share this post


Link to post
Share on other sites
darzanmihai

nobody?


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

Share this post


Link to post
Share on other sites
ProgAndy

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

Share this post


Link to post
Share on other sites
darzanmihai

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.

Share this post


Link to post
Share on other sites
Hest

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!

Share this post


Link to post
Share on other sites
darzanmihai

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.

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  

×

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.