Results 1 to 2 of 2

Thread: getting the databases in the MYSQL

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 2007
    Posts
    153

    getting the databases in the MYSQL

    hi to all,

    i was created one database in the mysql. using the following query

    create database testdatabase;

    when i using the query to retrieve all the databases , it is not return the testdatabase. it return only one database. still more databases r there in the my sql . why, i cannot view the some databases?. the coding i have used is

    clsGlobalFields.mycon = new MySqlConnection("server=" + servername + ";port=" + strport + ";uid=" + strusername + ";pwd=" + strpwd);
    clsGlobalFields.mycon.Open();
    clsGlobalFields.mysqlcmd = new MySqlCommand("show databases", clsGlobalFields.mycon);
    clsGlobalFields.mysqlreader = clsGlobalFields.mysqlcmd.ExecuteReader();
    while (clsGlobalFields.mysqlreader.Read())
    {
    cmbdatabase.Items.Add(clsGlobalFields.mysqlreader[0].ToString());
    }
    clsGlobalFields.mysqlreader.Close();
    clsGlobalFields.mycon.Close();


    if somebody know, plz help me to get all the databases in the mysql.

    plz help me
    thank u.

    With thanks and regards
    MMary

  2. #2
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: getting the databases in the MYSQL

    Does the user you are logging in as have permission to view the other databases?

Posting Permissions

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



Click Here to Expand Forum to Full Width