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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A total newbie to MySQL - How to create a database

Status
Not open for further replies.

DarwinIT

Programmer
Apr 25, 2008
142
US
I have downloaded Navicat and MYSQL Workbench - in addition to the MYSQL server - to my windows box.

A client sent me a 120 meg script file with the create database/create tables/ insert into tables - the whole ball of yarn. But I can't figure out how to run the script to create the database (which I'll think connect to Access with an ODBC driver.

Does MYSQL allow multiple databases or is this just one big database with whatever objects you want so you only have virtual databases through relationships (if you want more than one set of logical data)?

Do I possibly have to configure something to avoid colliding with my IIS local host port?

Thanks for any help you can provide here!!!
 
That is a lot of questions.

First, I do not know Navicat. It may be able to run a giant script or it may not. With the install of MySQL comes a command-line client. That would be my first try:

Code:
mysql -u [i]username[/i] -p < [i]scriptname[/i]

If you enter this in a DOS box, you are asked for your password and the script is run. This may take a while, and does not produce output until the last statement is processed.
If all is well, this is all there is to it. If things go wrong, you 'll have a lot of searching to do with such a large script.

MySQL allows for more than one database and even for more than one server instance on the machine.

If your IIS localhost port happens to be 3306 (very unlikely!), you will have a conflict, which can be solved by configuring another port in my.cnf. I trust that everything will work without port remapping at your machine.


+++ Despite being wrong in every important aspect, that is a very good analogy +++
Hex (in Darwin's Watch)
 

how do I set a user and password. I've got a visual tool - but it needs this logon information as well. Is there a default user which gets installed that I'm supposed to use?
Thanks so much for your feedback!!!
Don
 
The "default" user is called "root". You have given the password during the installation. If not, it is probably empty. That also means it is time to change it if it is empty.

+++ Despite being wrong in every important aspect, that is a very good analogy +++
Hex (in Darwin's Watch)
 
I must have set a user. It says access denied if I don't set a password. It says the same for every password I've tried on it. port setting is 3306
Host: localhost
user Name: root
Looks like I need to reset the password. I found some documentation on that but it looked like a pain in the rear.
It might be easier to uninstall and reinstall mysql?
 
If it's a new install, it should not have a password for root. Lemme see if I can remember Windows, from a command shell...

c:\program files\mysql\bin\mysql -uroot

If it fails, there is a password set (unless the MySQL server is not running). Try...

c:\program files\mysql\bin\mysql -uroot -p

Try a password you think it may be. If you get in, MySQL is fine. By default, the root user may only access MySQL from localhost.

Mark
 
It prompts me for a password. And doesn't like anything I give it.
 
Not even nothing and just pressing enter? Then search the MySQL documentation for how to reset the root password.

+++ Despite being wrong in every important aspect, that is a very good analogy +++
Hex (in Darwin's Watch)
 
Ok. That took care of the problem. Thanks guys.

For anyone reading this in the future:

If you have an invalid init-file specifed, you will not get an error but will just go back to the DOS prompt. If you successfully start MYSQL from the command line - you will not get your prompt back and must kill the job in the TaskManager under processes = MYSQL-NT

Thanks again for the help!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top