Client Login Area
Main Menu
Results 1 to 3 of 3

Thread: Learn phpMyAdmin in 15 minutes ~ :)

  1. #1
    Verified Community Member
    Join Date
    June 21, 2007
    Posts
    53

    Default Learn phpMyAdmin in 15 minutes ~ :)



    Heay Everyone,

    If you are new to phpMyAdmin, then reading the following tutorial can help to understand all basics of phpMyAdmin.


    PhpMyAdmin is web base software used for creating and maintaining MySQL
    databases.


    This tutorial is designed to get you starting with the basics of
    phpMyAdmin.


    You can access
    your MySQL account using phpMyAdmin using the link provided to you in Databases Section of Helm Control Panel :)


    When you click on the link above, a
    dialog box will prompt you for a username and password. This will be
    the
    username and password given you when we set it up for you.




    Once you log in, a phpMyAdmin screen appears as shown below.



    Creating a table in your database



    The left-hand
    frame in phpMyAdmin is used for navigation.You will see your
    database displayed here (in this case called mydomain). As you create
    tables, they will show below this.



    Click on your
    database the navigation frame and a new window will
    appear on the
    right hand side.



    We will create a table in the database, called "people". Use the Create
    new table
    feature. Type in the name of the
    new table
    into the Name: people, and the number of columns in the table
    (4) into Fields:.
    This tutorial is only designed to show you the basic
    php/MySQL/phpMyAdmin functions.
    You can delete it using the Drop function. You will
    want to allow for growth in your table.



    Click Go and you should see something like this.
    The table title now appears with under the database name.





    Now enter the names and attributes of our table fields. Enter the
    following
    information as above:









    Field
    Type
    Length
    Default


    Extra




    id
    int
    6
    0


    auto_increment




    name
    char
    100




    telephone
    char
    50




    birthday
    char
    50









    The Length value indi

  2. #2
    Verified Community Member
    Join Date
    June 9, 2007
    Posts
    14

    Default Re: Learn phpMyAdmin in 15 minutes ~ :)

    Thanks for the useful info. But then my question will be whether ASP.NET2.0 can work with MySql under medium trust? I'm sure that is the questions of many developrs now

  3. #3
    Verified Community Member
    Join Date
    June 21, 2007
    Posts
    53

    Default Re: Learn phpMyAdmin in 15 minutes ~ :)



    The only main reason why MySQL is used most commonly than MS SQL in web-applications is that, MySQL is freeware.

    ASP.Net and MySQL work better together and they can be better companion.

    Here is an example:



    A Sample ASP.NET Page to Query a MySQL Database



    So with our MySQL database finally squared away and MySQL Connector/Net installed, we can now
    start using MySQL from our ASP.NET web pages. For illustration I'm going to provide a very simple
    script with no bells and whistles. You can find fancy database scripts all over the web. The point
    of this one is simply to show you what you need to do to connect to MySQL. Don't get me wrong... all that
    fancy stuff works just fine using MySQL (and usually with very few changes) but that's just not
    the point of this script.

    MySQL.aspx

    <%@ Page Language="VB" debug="true" %>
    <%@ Import Namespace = "System.Data" %>
    <%@ Import Namespace = "MySql.Data.MySqlClient" %>
    <script language="VB" runat="server">

    Sub Page_Load(sender As Object, e As EventArgs)

    Dim myConnectionAs MySqlConnection
    Dim myDataAdapterAs MySqlDataAdapter
    Dim myDataSetAs DataSet

    Dim strSQLAs String
    Dim iRecordCountAs Integer

    myConnection = New MySqlConnection("server=localhost; user id=15secs; password=password; database=mydatabase; pooling=false;")

    strSQL = "SELECT * FROM mytable;"

    myDataAdapter = New MySqlDataAdapter(strSQL, myConnection)
    myDataSet = New Dataset()
    myDataAdapter.Fill(myDataSet, "mytable")

    MySQLDataGrid.DataSource = myDataSet
    MySQLDataGrid.DataBind()

    End Sub

    </script>

    <html>
    <head>
    <title>Simple MySQL Database Query</title>
    </head>
    <body>

    <form runat="server">

    <asp:DataGrid id="MySQLDataGrid" runat="server" />

    </form>

    </body>
    </html>

    In the above script, I've highlighted the places where the script varies from one you would use to
    perform the same thing using Microsoft SQL Server or Access. As you can see there's really nothing
    new here. Instead of importing System.Data.SQLClient like we would for MS SQL,
    we import MySql.Data.MySqlClient. Oh and if at any point you need a reference for the MySql.Data.MySqlClient namespace,
    you're in luck... it ships with one.

    Here's a screen capture of what the script above produces when run against the sample database and
    table we set up in this article. Like I said, it may not be pretty, but there's no reason it couldn't be.
    I'm just keeping it simple for illustration.






    I hope this has helped ease your introduction to this great little database server.
    Whether you are upgrading from Access or starting from scratch, MySQL is certainly a viable
    option and despite the fact that it's open-source and not shipped from Redmond,
    it really does work great with .NET. And, with the addition of MySQL Administrator,
    management is no longer the source of nightmares t

Posting Permissions

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