User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 402,904 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,095 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MySQL advertiser: Programming Forums
Views: 3332 | Replies: 24 | Solved
Reply
Join Date: Aug 2007
Posts: 25
Reputation: hemgoyal_1990 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
hemgoyal_1990 hemgoyal_1990 is offline Offline
Light Poster

Help I am New In MySQL. Problem With MySQL Database Plz Help.

  #1  
Sep 29th, 2007
Hi All,
I am New in MySQL. I Want to Create a Database in MySQL. I am Using MySQL5.0 & Write This Sentex for Creating Database :- CREATE DATABASE db_name;
But When I Use This Sentex Create Database With Single db.opt File. & I run this Database on Server Message Desplaye "Database Not Found"
How Can I Do Create Database in MySQL to Run on My FTP Server. Plz Anyone Help Me.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Sep 2007
Location: North Bay Ontario
Posts: 174
Reputation: trudge is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 20
trudge trudge is offline Offline
Junior Poster

Re: I am New In MySQL. Problem With MySQL Database Plz Help.

  #2  
Oct 10th, 2007
Your question is somewhat lacking in some crucial information that is needed to help you.

For example, what OS are you running this on?

Are you sure the MySQL server is running? How do you know?

Have you created a user besides 'root', and logged in as that user?

Can you connect to the MySQL from the command line?

Have you read the documentation at www.mysql.com?
Amer Neely - Web Mechanic
"Others make web sites. We make web sites work!"
Reply With Quote  
Join Date: Aug 2007
Posts: 25
Reputation: hemgoyal_1990 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
hemgoyal_1990 hemgoyal_1990 is offline Offline
Light Poster

Re: I am New In MySQL. Problem With MySQL Database Plz Help.

  #3  
Oct 13th, 2007
For example, what OS are you running this on?
WIN XP SP2.

Are you sure the MySQL server is running? How do you know?
I Don't Know. How I Can Check This.

Have you created a user besides 'root', and logged in as that user?
I Have already Create user 'root'. And i Dont Know How Can I Logged.

Can you connect to the MySQL from the command line?
I Dont Know How Can I Connect to MySQL from Command Line.

Have you read the documentation at www.mysql.com?[/quote]
Yes. I am Read Document But dont Understand anything.
Last edited by hemgoyal_1990 : Oct 13th, 2007 at 4:05 am.
Reply With Quote  
Join Date: Sep 2007
Location: North Bay Ontario
Posts: 174
Reputation: trudge is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 20
trudge trudge is offline Offline
Junior Poster

Re: I am New In MySQL. Problem With MySQL Database Plz Help.

  #4  
Oct 13th, 2007
Originally Posted by hemgoyal_1990 View Post
For example, what OS are you running this on?
WIN XP SP2.

Are you sure the MySQL server is running? How do you know?
I Don't Know. How I Can Check This.

Have you created a user besides 'root', and logged in as that user?
I Have already Create user 'root'. And i Dont Know How Can I Logged.

Can you connect to the MySQL from the command line?
I Dont Know How Can I Connect to MySQL from Command Line.

Have you read the documentation at www.mysql.com?

Yes. I am Read Document But dont Understand anything.[/quote]

First you must understand there are 2 'parts' to MySQL - the server and the client.

The server is the part that does all the database work, and the client is how to send SQL commands to the server to get executed. MySQL ships with both.

When you installed MySQL you were given a choice to install the server as either a 'service' or a stand-alone application. Which did you choose?

As a service, the MySQL server runs in the background and is started each time the computer starts. As a stand-alone, it runs when you execute a command to start the server, and stops when you execute the command to stop the server. If it is installed as a 'service' you can check this from the Control Panel under 'Administrative Toos -> Services'. If you see 'MySQL' in the list, and the status is 'Started' then you have installed it as a service. Please post the results of this finding.

How did you create a user 'root'? How do you know there is a user called 'root'?

First you have to determine whether the server is running before doing anything else.
Amer Neely - Web Mechanic
"Others make web sites. We make web sites work!"
Reply With Quote  
Join Date: Aug 2007
Posts: 25
Reputation: hemgoyal_1990 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
hemgoyal_1990 hemgoyal_1990 is offline Offline
Light Poster

Re: I am New In MySQL. Problem With MySQL Database Plz Help.

  #5  
Oct 14th, 2007
Yes I am Found MySQL in Service under Adminstartion Tool & I Found it this Place. It's States are 'Started'. Plz Suggest me What Can I Do Next.
Last edited by hemgoyal_1990 : Oct 14th, 2007 at 3:26 am.
Reply With Quote  
Join Date: Sep 2007
Location: North Bay Ontario
Posts: 174
Reputation: trudge is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 20
trudge trudge is offline Offline
Junior Poster

Re: I am New In MySQL. Problem With MySQL Database Plz Help.

  #6  
Oct 14th, 2007
Originally Posted by hemgoyal_1990 View Post
Yes I am Found MySQL in Service under Adminstartion Tool & I Found it this Place. It's States are 'Started'. Plz Suggest me What Can I Do Next.


OK. Now you should create a user - it's not a good idea to use 'root' except when absolutely necessary.

When you are in a DOS shell window, you should be able to run the client and log in as 'root' with no password, unless you added a password during installation.

Change to the /bin directory of MySQL.

Enter: mysql --user root -h localhost

You should see a new prompt like this:
mysql>
This is the client prompt. You can now enter SQL commands, such as
mysql> show databases;

If this works then quit by entering 'exit'.

I don't know what version of MySQL you installed, but the mysql.com web site has documentation for creating a user. Then you must GRANT that user whatever rights you want them to have (create, select, delete, etc.).

Once you have a user (with password) created, then try this:

If MySQL is in your PATH you should be able to do something like this:
mysql --user=xxxxx --password=yyyyy -h localhost
and then you should see a new prompt like this:
mysql>

Again enter 'show databases;'

If this works, you have successfully created a user besides 'root', which is a good thing.
Enter 'exit' to quit the shell.

Now you can either use the existing client or install a different one like phpMyAdmin, or HeidiSQL. I suggest using the existing shell until you are very comfortable with the different SQL commands and what their results are.

To create databases use the mysqladmin command. But first you should get a user properly configured.
Amer Neely - Web Mechanic
"Others make web sites. We make web sites work!"
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb MySQL Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the MySQL Forum

All times are GMT -4. The time now is 3:27 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC