How do i deploy MySQL Database to another computer?

Ranhiru

Member
Feb 2, 2007
6,438
42
0
Inside FIREFOX
I have developed an application using Visual Basic .NET 2008 which uses a MySQL Database. The connection string i use is something like

Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;

so actually the server is localhost, database name is customers(or watever!), and uid=root and pwd is ***** :P

so everything works fine...now this program is something which i need to run on other computers as well....so do i have to install mySQL server to each and every computer that i need to run this software? cant i get a single database like MS SQL Server ?? .mdf or .sdf??? Plz help me! :) and if possible please tell me or post a website which can help me deploy the database to another computer to use.

This is a project which i need to submit to my university :) so plz tell me what i files i need to burn on to the CD that im submitting and any special instructions that i should include in the CD to run the project :)

Thanx loadz in advance :)
 

amila325

Well-known member
  • Jul 11, 2006
    9,188
    33
    48
    Machan u can do it. 1st you hv to install in to server machine. and when installing there is a option to let other computers in the network to access the databasess...
    so then that is easy :D.... jst replace localhost to your server machine ip :)...
    but if you need to do it dynamic way say without recompiling jst use a configuration xml or something like that to get the sql connection string :)
     

    kosandpol

    Well-known member
  • Jun 10, 2008
    45,329
    1,492
    113
    For MySQL databases you have to install the MySQL server (didnt they teach you about how relational databases work ?? ) on the client PC.

    Include the MySQL server setup in your own program's setup and ensure that the MySQL server is installed first, your database is restored before finishing the setup.
     

    amila325

    Well-known member
  • Jul 11, 2006
    9,188
    33
    48
    kosandpol said:
    For MySQL databases you have to install the MySQL server (didnt they teach you about how relational databases work ?? ) on the client PC.

    Include the MySQL server setup in your own program's setup and ensure that the MySQL server is installed first, your database is restored before finishing the setup.
    i dnt think that including MySQL server setup is necessary cuz u cn jst embed it.. dnt knw exactly hw to do it with .NET but i cn say how to from Java :P
     

    kosandpol

    Well-known member
  • Jun 10, 2008
    45,329
    1,492
    113
    amila325 said:
    i dnt think that including MySQL server setup is necessary cuz u cn jst embed it.. dnt knw exactly hw to do it with .NET but i cn say how to from Java :P
    Are you talking about MySQL or MySQLi ? MySQLi can be embedded but MySQL requires the server to be up and running to access the database.
     

    x-pert

    Member
    Jun 13, 2006
    20,952
    77
    0
    coming back to the point...

    Actually there are several ways to do it machang.

    1. use a global address as the server address and let the application speak with it. e.g. store the database at http://ranhiru.com/db and allow the application to access it there.

    2. create a DB dump. and then install the sql server in the client machine and re-run the dump to create the original DB back.

    3. if there is no data in the database, install the server in the client machine and then use a script to create the required database tables quickly.


    So I think you have to submit:
    1. the application set up file
    2. server setup
    3. a script to create the tables and insert tuples or just the DB dump file.
     

    amila325

    Well-known member
  • Jul 11, 2006
    9,188
    33
    48
    kosandpol said:
    well, I stand corrected. MySQL can be embedded. Thanks for the link.
    not a prob dude :)....
    and another thing if v r embedding it will generate a big overhead in app :P....
    cuz it is jst writing a file ne so wht i think it is gud to hv a separate mysql server setup and hv database separately :P.... but if it is jst a small one it is k :)..
     

    amila325

    Well-known member
  • Jul 11, 2006
    9,188
    33
    48
    x-pert said:
    If he trys to do this now, he might need to do a lot of changes to the application I guess.

    So Ranhiru machang, don't try this if you don't have at least a week before the deadline.
    i think his submissions are on January :D
     

    kosandpol

    Well-known member
  • Jun 10, 2008
    45,329
    1,492
    113
    amila325 said:
    not a prob dude :)....
    and another thing if v r embedding it will generate a big overhead in app :P....
    cuz it is jst writing a file ne so wht i think it is gud to hv a separate mysql server setup and hv database separately :P.... but if it is jst a small one it is k :)..
    For that kind of usage MySQLi is the way to go. Thats why it was developed it in the first place. MySQLi can be deployed similar to access databases.

    By embedding a MySQL database, you loose the multiple concurrent connections ability and multiuser ability (the main 2 reasons to use a RDMS). If these 2 features are not necessary then its best to use MySQLi or Access. In fact using an Access DB would've been the best choice for the thread starter since his program is using .net.
     

    amila325

    Well-known member
  • Jul 11, 2006
    9,188
    33
    48
    kosandpol said:
    For that kind of usage MySQLi is the way to go. Thats why it was developed it in the first place. MySQLi can be deployed similar to access databases.

    By embedding a MySQL database, you loose the multiple concurrent connections ability and multiuser ability (the main 2 reasons to use a RDMS). If these 2 features are not necessary then its best to use MySQLi or Access. In fact using an Access DB would've been the best choice for the thread starter since his program is using .net.
    hmmm r u sure machan... cuz it's lyk access is a commercial application u need to hv a license ne... 2 b honest i dnt knw access very much :P.... but he can do it lyk i said in the first post :D... jst install mysql in any machine and then get the ip and change the configuration file that can b a xls file with a password or something lyk that :).....
     

    kosandpol

    Well-known member
  • Jun 10, 2008
    45,329
    1,492
    113
    amila325 said:
    hmmm r u sure machan... cuz it's lyk access is a commercial application u need to hv a license ne... 2 b honest i dnt knw access very much :P.... but he can do it lyk i said in the first post :D... jst install mysql in any machine and then get the ip and change the configuration file that can b a xls file with a password or something lyk that :).....
    To deploy an Access Database you dont need licenses. You need a license only of you use the application MS Access on your desktop. Also for manipulating access databases, all you need is the MDAC drivers and that comes inbuilt with all .net versions. Infact it comes with the redistributable MDAC libraries as well so deployment is not a problem at all.

    To deploy as you suggest, you have to assume that the client PC has access to MySQL server. What if its a stand alone PC ?
     

    amila325

    Well-known member
  • Jul 11, 2006
    9,188
    33
    48
    kosandpol said:
    For that kind of usage MySQLi is the way to go. Thats why it was developed it in the first place. MySQLi can be deployed similar to access databases.

    By embedding a MySQL database, you loose the multiple concurrent connections ability and multiuser ability (the main 2 reasons to use a RDMS). If these 2 features are not necessary then its best to use MySQLi or Access. In fact using an Access DB would've been the best choice for the thread starter since his program is using .net.

    hmmm dude r u so sure.... cuz as i knw &
    learnt i hv a different view abut RDBMS.. u knw, this normalization, tuples and all :)
    oh lyk @ dis also
    http://www.google.lk/search?hl=en&c...ne:RDBMS&sa=X&oi=glossary_definition&ct=title

    i dnt see abut multiple concurrent connections ability :yes: :yes:
     
    Last edited:

    kosandpol

    Well-known member
  • Jun 10, 2008
    45,329
    1,492
    113
    I dont mean to disrespect anyone here but I'm rather appalled that a programmer using databases has no clue as to how the database works or how its deployed.
    I'm wandering if this because of bad teaching or bad course design or bad learning.
     

    kosandpol

    Well-known member
  • Jun 10, 2008
    45,329
    1,492
    113
    amila325 said:
    hmmm dude r u so sure.... cuz as i knw &
    learnt i hv a different view abut RDBMS.. u knw this normalization tuples and all :)
    oh lyk @ dis also
    http://www.google.lk/search?hl=en&c...ne:RDBMS&sa=X&oi=glossary_definition&ct=title

    i dnt see abut multiple concurrent connections ability :yes: :yes:
    What you quoted is the definition behind a RDBMS. What is the main advantage of have a RDBMS deployed as a server ?
    This is where concurrent and multiple access management comes in to play. Almost all RDBMS servers (Oracle, MySQL, MSSQL, PostgreSQL,DB2, etc ) has this capability as the point in having databases on those system are as you say to normalize and be related as well as the ability have the data accessed by more than 1 application at the same time.