HI..
I'm new to MySQL and i want to know if it is possible to have the MySQL database on the same computer as the vb program? When connecting to the database, do u need to know the computer name/ip address? I want to make a connection to the MySQL database called NFHS which would sit in the same path as the VB application. Note: There is no server, no ip address etc (just on the current computer only). How would i connect to a database such as this using ADO?
I´ve never worked with MySQL, only with SQL, but maybe it works the same way.... When you install SQL on a local machine (not on a server) the "Server Name" is the same name that you have on the Identification tab in the Network Neighborhood properties.
If you don´t have the Network Neighborhood Icon on the desktop you can check out your computer name on the windows registry.
Go to the Run command and type regedit then
open the folders this way :
HKEY_LOCAL_MACHINE
----System
--------CurrentControlSet
------------Control
----------------ComputerName
--------------------ComputerName (here is the value)
Don´t change it !!!!!!! I try to and it doesn´t worked !!!
You have to have a MySQL server running somewhere in order to access the database. You can run it on the local machine, but you need to have TCP/IP installed -- just use "localhost" or "127.0.0.1" as the server address.
Anyway, here's some random code if you're interested:
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You". -- Linus Torvalds
You can also use these to get other useful information:
Code:
SHOW TABLES; /* return a recordset with a list of tables in the current DB */
SHOW DATABASES; /* return a recordset with a list of databases on the server */
USE dbname; /* begin using a different database */
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You". -- Linus Torvalds