Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2004
    Posts
    1

    Smile Unanswered: Beginner with MySQL

    Im a newbie to MySQL. Im wondering how getting MySQL online works?

    Basically, with "MS Access" you create your database, and your ASP page and then upload both to a server and away you go.

    Im running IIS on Windows XP Pro. And have a connection to a MySQL database and am running SQL queries on it and everything is cool.

    But when you create a MySQL database, where does it get saved to? What folder. Because I cant seem to find it.

    I think its saved to this folder "C:\mysql\data\dbtest" with the extention of ".MYD"

    But what would I need to upload to a server. Do I need to upload more than just the database and the ASP page? Because in the ASP code you dont specify "databasename.MYD"

    Im connecting to my database through

    "
    Code:
    objConn.ConnectionString = "DRIVER={MySQL}; database=dbTest; server=Mark; uid=root;
    "

    Sorry for the longwinded explanation, but im trying to set the scene as best as possible.

    Any info on how it all works to get MySQL running online would be great

    Many Thanks

    Mark

  2. #2
    Join Date
    Sep 2003
    Location
    So. Cal. USA
    Posts
    142
    Howdy. I'm new, too. On my installation on Mac OS X / Unix, the path to the databases is

    /usr/local/mysql/data/dbname

    no extensions are necessary and the data directory is owned by the mysql user; unix and windows are different, but you do not need to create a db locally and then upload it. You can create the db w/MySQL commands from the mysql command line, but I prefer to use an open source utility called phpMyAdmin that lets you access/manage your mysql db through a web interface directly on the server.

    We also have a server and it has a different storage path and permissions settings.

    In a MySQL/PHP web solution, you write PHP scripts to send SQL commands to the server. You do not have to know the storage path to the db in this case since mysql knows if it has the db or not; you just have to establish a mysql connection to the server, send SQL commands/queries, and save the results in PHP strings and arrays. Usually, you can even refer to the server as "localhost" when your web pages are on the same server.
    --ST

  3. #3
    Join Date
    Jul 2004
    Location
    Dundee, Scotland
    Posts
    107
    re "Im a newbie to MySQL. Im wondering how getting MySQL online works?"
    -> you typically install the MySQL database server on your PC. the webhosting company that offers accesss to a MySQL database has a MySQL database server installed on their hosting server.


    re "Basically, with "MS Access" you create your database, and your ASP page and then upload both to a server and away you go."
    -> with MySQL you do not copy ".MYD" files like you might copy a ".mdb" file when using MS Access. with MySQL you typically export the table table definition & data into a text file then import it into the hosted MySQL database. As the previous reply states, many people use phpMyAdmin to do this due to its easy of use.


    re "But when you create a MySQL database, where does it get saved to? What folder. Because I cant seem to find it. I think its saved to this folder "C:\mysql\data\dbtest" with the extention of ".MYD" "
    --> here are the actual details:
    File Purpose
    `tbl_name.frm' Table definition (form) file
    `tbl_name.MYD' Datafile
    `tbl_name.MYI' Index file


    re "But what would I need to upload to a server. Do I need to upload more than just the database and the ASP page? Because in the ASP code you dont specify "databasename.MYD" "
    -> that's right you are not specifying the databasename.MYD in your example code, you are using dns / odbc or whatever. on the webhosting server you would access the MySQL database via localhost.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •