Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to create server?

Status
Not open for further replies.

m77

IS-IT--Management
Jun 13, 2002
11
US
I am using MySQL 3.23.43 under WinNT.
 
Normally the server is run as a service. The easiest way to get going on WinNT is to use the '
Code:
winmysqladmin.exe
' in the
Code:
bin
directory where you unpacked the mysql zipfile.

-Rob
 
I have started up winmysqladmin. Now how to get dbName to connect to db from localhost to create tables?
 
Do you see a green or red traffic light in your system tray? I'll assume it's green (post here if it's not there, or it's red).

Open up a command prompt, and
Code:
cd
to your
Code:
mysql\bin
directory. Then type
Code:
mysql
. This should start the mysql console and connect to your MySQL server (which at the moment has no username/password restriction). You can now execute whatever SQL statements you wish, including
Code:
CREATE DATABASE
commands. However, I would recommend that one of the first things you should do is to change the records in the
Code:
mysql
database (which you will find already exists on your server) to restrict access. See and look for the pages on the privilege system for more details.
 
Thanx. That is what I get:

mysql> SELECT DATABSE yo
-> create table t (a BLOB, index(a(10)));
ERROR 1064: You have an error in your SQL syntax near 'create table t (a BLOB, index(a(10)))' at line 2
 
I often got a message "No database selected"
How to select one?
 
You can see what databases are available using
Code:
SHOW DATABASES;
To investigate a database further, the syntax is
Code:
USE databasename;
To show all the tables in the current database, use
Code:
SHOW TABLES;

Once you've got the hang of the console, you can try connecting using other clients, depending on what you're using the database for. If it's for a database-driven website, I recommend PHP. Alternatively, if you want a nice 'front end' to your database you can use Microsoft Access (and MyODBC - downloadable from the mysql site).

Hope it goes well,
-Rob
 
Thank you!

Well, done.

Now i need dbName to connect it from JAVA application.
For example for Oracle DB i use, dbName is "jdbc:eek:racle:thin:mad:castro.telekom.lv:1525:z81".
Is it possible to connect from application on my PC to MySQL DB on my pc without using net?
 
Sorry, I don't know much about Java. However, once you've tested your user/password combination using the mysql console, it seems that you can use JDBC to connect - see This should all work without having to be connected to the internet.

-Rob
 
How u know what is dbName of your just created Database to work with one from PHP, for example?
 
RobEyre, THANK YOU VERY MUCH.

I have solved the problem. Are u creator of this site? Just interesting :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top