Connect to MYSQL Server to "Create database"

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
makeshyft
Posts: 222
Joined: Mon Apr 15, 2013 4:41 am
Contact:

Connect to MYSQL Server to "Create database"

Post by makeshyft » Tue Jan 19, 2016 12:06 am

Hi everyone,

Am I correct in thinking that there is no way to connect to a myseql server without specifying the database to which to connect to?

I want to connect to a server and create database via SQL command.

Am I looking at command line for each desktop platform?

Thanks

Tom
Founder & Developer @ MakeShyft R.D.A - https://www.makeshyft.com
Build Software with AppStarterStack for Livecode - https://www.AppStarterStack.com
Save Time with The Time Saver's Toolbox - https://www.TimeSaversToolbox.com

makeshyft
Posts: 222
Joined: Mon Apr 15, 2013 4:41 am
Contact:

(solved) Connect to MYSQL Server to "Create database"

Post by makeshyft » Tue Jan 19, 2016 7:40 am

local ComputerReturn,ResultVariable

put "mysql -u" & UserName & " -p" & Password & " -e " & "'" & "create database " & DatabaseName & "'" & ";" into ComputerReturn

set defaultfolder to PathOfMySQLBin
put shell (ComputerReturn) into ResultVariable
Founder & Developer @ MakeShyft R.D.A - https://www.makeshyft.com
Build Software with AppStarterStack for Livecode - https://www.AppStarterStack.com
Save Time with The Time Saver's Toolbox - https://www.TimeSaversToolbox.com

Post Reply