Jump to content

Creating Database


RudeYute

Recommended Posts

Hi,

 

I'm required to set up MySQL on my XP machine in order to use an application I need.

I have tried installing the MySQL from their site, and installed fine, but configuring was a pain... have just installed WAMP to see if that's any easier.

 

Anyway, here's what I did (no errors with these commands, although I think i'm missing semi colons at end).

 

> mysql -u root -p

> CREATE DATABASE aw_hsc

> GRANT INSERT,SELECT,UPDATE on aw_hsc.* to username@127.0.0.1 identified by 'password'

> mysql -D aw_hsc -u root -p < hsc.v104.sql

> mysql -D fwevents -u root -p < hsc.v104.sql

> GRANT SELECT on fwevents.* to username@127.0.0.1 identified by 'password'

> GRANT SELECT, DELETE on fwevents.* to username@127.0.0.1 identified by 'password';

 

So it seems to have worked, but when I try connecting, the applications says it doesn't exist.

 

The commands I have used are from the user guide of the application I'm trying to use it with.

 

Can someone help me please?

 

Thanks

 

Link to comment
Share on other sites

If you want to create a database just run the CREATE DATABASE command followed by your database name.

 

You don't need to run the GRANT command to set permissions on your database/tables. I know it gives added security however for now just set up the database and it's tables. Then go on to set up permissions.

 

Also if you have installed WAMP. You might find it easier using phpMyAdmin to create your database and tables for the application. You can use phpMyAdmin by opening a web browser and going to http://localhost/phpmyadmin or by clicking wamps task bar icon (looks like a rev-meter) and select phpMyAdmin.

Link to comment
Share on other sites

Hi Dan, I did use the CREATE DATABASE command, but the application didn't see the database - database name, IP address, port and username and password were all correct.

 

As for WAMP - That's that I thought, but for some reason couldn't connect to anything on localhost or 127.0.0.1, not phpMyAdmin or MySQL.  Just got "could not connect message".

Link to comment
Share on other sites

You should get a reply like the following:

Query OK, 1 row affected

 

when you run

 

CREATE DATABASE aw_hsc;

 

Also can you post a screen shot of the error you get. I think you don't have wamp started and that's why you are getting that error. To start WAMP right click the wamp taskbar icon and select Start All Services options.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.