Page 1 of 1

MySQL commands to start a database

Posted: Wed Dec 08, 2010 1:42 am
by Winterhawk99
Hi Everyone, For those of us that use an MySQL database and have had a hard time getting everything connected, I have learned a few things over the last few weeks that might help. I had a devil of a time connecting everything on the new machine. I'm not a programer by trade so anything that I've only programed once every 4 years or so is much like relearning how to do Triganometry. My ODBC connector was not recognizing any of the databases I was trying to make in the ODBC administrator boards. I finally got it to recognize everything by going to the command prompt; then making the database from there. A backend way of making a database.

If you have troubles like I did this might help out alittle. Other programers are welcome to add to this. Here's what I did.

I opened the command client and wrote these short scripts.

Code: Select all

mysql> CREATE DATABASE databasename; 
mysql> GRANT ALL PRIVILEGES ON databasename.* TO "username"@"hostname" IDENTIFIED BY "password"; 
mysql> FLUSH PRIVILEGES; 
mysql> EXIT
After I did that the Database appeared on the list of data bases to choose from in the admin boards and I found I could connect with open office. So This may help, it might not. It worked for me this time around.