|
-
Sep 20th, 2010, 03:49 PM
#1
Thread Starter
Hyperactive Member
mysql db List
hi all im trying to get a list of my database of my mysql server but im stuck and cannot figure it out
can any one help
i can open my connection but thats were i get stuck
Code:
Dim connStr As String = "Data Source=" & Vlocalhost.Text & ";" & "User Id=" & Vadmin.Text & ";Password=" & Vpass.Text
Dim connection As New MySqlConnection(connStr)
connection.open
programming pc: laptop. running xp pro and vb.net..
media centre xp pc: dual core 6000,4gb memory, 1tb harddrive
mainserver: server 2008, 8gb memory, amd e-350 dual core, 6tb harddrive and local web host
atomvault 1: server 2008, atom 330 with 4 gb memory, 35TB hardrive space for videos and music..
backup pc : xp, 4gb, atom 330, 10tb harddrive(web, pictures, music, databases)
2 x video backup: atom 330, 2gb, 18tb harddrive
everything on remote login..
check out my builds http://AtomVaults.yolasite.com
learning vb.net and php + mysql   - got most of the basics now.
I WISH THERE WAS MORE TIME IN THE DAY  
-
Sep 20th, 2010, 04:02 PM
#2
Re: mysql db List
use this command to view all your databases
* Rate It  If you Like it
__________________________________________________________________________________________
" Programming is like sex: one mistake and you’re providing support for a lifetime."
Get last SQL insert ID 
-
Sep 20th, 2010, 10:18 PM
#3
Thread Starter
Hyperactive Member
Re: mysql db List
ok im stuck
Code:
Dim command As New MySqlCommand("SHOW DATABASES;", connection)
main.group.Items.Add(command.ExecuteNonQuery)
programming pc: laptop. running xp pro and vb.net..
media centre xp pc: dual core 6000,4gb memory, 1tb harddrive
mainserver: server 2008, 8gb memory, amd e-350 dual core, 6tb harddrive and local web host
atomvault 1: server 2008, atom 330 with 4 gb memory, 35TB hardrive space for videos and music..
backup pc : xp, 4gb, atom 330, 10tb harddrive(web, pictures, music, databases)
2 x video backup: atom 330, 2gb, 18tb harddrive
everything on remote login..
check out my builds http://AtomVaults.yolasite.com
learning vb.net and php + mysql   - got most of the basics now.
I WISH THERE WAS MORE TIME IN THE DAY  
-
Sep 21st, 2010, 03:05 PM
#4
Thread Starter
Hyperactive Member
Re: mysql db List
hi
i have come up with somthing like below but will not do what i want a list of databases
Code:
Dim connStr As String = "Databases="";" & "Data Source=" & Vlocalhost.Text & ";" & "User Id=" & Vadmin.Text & ";Password=" & Vpass.Text
Dim connection As New MySqlConnection(connStr)
Dim command As New MySqlCommand("SHOW DATABASES", connection)
connection.Open()
Dim reader = command.ExecuteReader()
While reader.Read()
main.group.Items.Add(reader(1).ToString())
End While
connection.Close()
programming pc: laptop. running xp pro and vb.net..
media centre xp pc: dual core 6000,4gb memory, 1tb harddrive
mainserver: server 2008, 8gb memory, amd e-350 dual core, 6tb harddrive and local web host
atomvault 1: server 2008, atom 330 with 4 gb memory, 35TB hardrive space for videos and music..
backup pc : xp, 4gb, atom 330, 10tb harddrive(web, pictures, music, databases)
2 x video backup: atom 330, 2gb, 18tb harddrive
everything on remote login..
check out my builds http://AtomVaults.yolasite.com
learning vb.net and php + mysql   - got most of the basics now.
I WISH THERE WAS MORE TIME IN THE DAY  
-
Sep 22nd, 2010, 06:55 PM
#5
Thread Starter
Hyperactive Member
Re: mysql db List
can someone please help me with this. im stuck
programming pc: laptop. running xp pro and vb.net..
media centre xp pc: dual core 6000,4gb memory, 1tb harddrive
mainserver: server 2008, 8gb memory, amd e-350 dual core, 6tb harddrive and local web host
atomvault 1: server 2008, atom 330 with 4 gb memory, 35TB hardrive space for videos and music..
backup pc : xp, 4gb, atom 330, 10tb harddrive(web, pictures, music, databases)
2 x video backup: atom 330, 2gb, 18tb harddrive
everything on remote login..
check out my builds http://AtomVaults.yolasite.com
learning vb.net and php + mysql   - got most of the basics now.
I WISH THERE WAS MORE TIME IN THE DAY  
-
Sep 22nd, 2010, 07:14 PM
#6
Thread Starter
Hyperactive Member
Re: mysql db List
hi i did it im now able to get the total list of databases
THANKS MOTIL FOR THE TIPS
Code:
Dim connStr As String = "Database=" & VDbase.Text & ";" & "Data Source=" & Vlocalhost.Text & ";" & "User Id=" & Vadmin.Text & ";Password=" & Vpass.Text
Dim connection As New MySqlConnection(connStr)
Dim command As New MySqlCommand("SHOW DATABASES;", connection)
connection.Open()
Dim reader = command.ExecuteReader()
While reader.Read()
main.group.Items.Add(reader(0).ToString())
End While
connection.Close()
programming pc: laptop. running xp pro and vb.net..
media centre xp pc: dual core 6000,4gb memory, 1tb harddrive
mainserver: server 2008, 8gb memory, amd e-350 dual core, 6tb harddrive and local web host
atomvault 1: server 2008, atom 330 with 4 gb memory, 35TB hardrive space for videos and music..
backup pc : xp, 4gb, atom 330, 10tb harddrive(web, pictures, music, databases)
2 x video backup: atom 330, 2gb, 18tb harddrive
everything on remote login..
check out my builds http://AtomVaults.yolasite.com
learning vb.net and php + mysql   - got most of the basics now.
I WISH THERE WAS MORE TIME IN THE DAY  
-
Sep 22nd, 2010, 07:26 PM
#7
Thread Starter
Hyperactive Member
Re: mysql db List
i did pickup on my reading that if you change "show database;" to "show tables;" you get the tables of the database
Code:
Dim command As New MySqlCommand("SHOW tables;", connection)
programming pc: laptop. running xp pro and vb.net..
media centre xp pc: dual core 6000,4gb memory, 1tb harddrive
mainserver: server 2008, 8gb memory, amd e-350 dual core, 6tb harddrive and local web host
atomvault 1: server 2008, atom 330 with 4 gb memory, 35TB hardrive space for videos and music..
backup pc : xp, 4gb, atom 330, 10tb harddrive(web, pictures, music, databases)
2 x video backup: atom 330, 2gb, 18tb harddrive
everything on remote login..
check out my builds http://AtomVaults.yolasite.com
learning vb.net and php + mysql   - got most of the basics now.
I WISH THERE WAS MORE TIME IN THE DAY  
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|