Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Guide: MySQL
#1
First thing you must do is download MySQL 5.0 Community Server. It is free and pretty simple to install.

MySQL 5.0 Community Server
http://dev.mysql.com/downloads/mysql/5.0.html#downloads

Also to easily view and change your database I suggesting getting SQLyog Community Edition.

SQLyog Community Edition
http://www.webyog.com/en/downloads.php
(Make sure to get the free Community Edition.)

Also you need a connecter that your server will use to connect to the mysql server.

MySQL Connector/ODBC 3.51
http://dev.mysql.com/downloads/connector/odbc/3.51.html

Now Install MySQL 5.0 and then run the Server Instance Configuration Wizard.

Click Next until you see Detailed Configuration or Standard Configuration.

Choose Detailed Configuration and hit Next.

Most people should now select Developer Machine. As it says that is for people who will be running this on computers with other programs running. If you have a computer just for this then select Dedicated MySQL Server Machine. Click Next.

Next select Multifunctional Database and select Next.

Click "..." if you wish to select your Installation path or leave it alone if you want the default one. After you choose one select Next.

For the next one you should be fine selecting Decision Support (DSS)/OLAP. Which is for around 20 connections... that should be fine for most. Down the road if you need to change it up you can always do so easily. Click Next.

Select your port number next. I would leave it as 3306 unless you want to use another one for some reason. Select Next.

Select Standard Character Set and select Next.

Make sure its checked to Install as a Windows Service. This starts it up automatically when you start up your computer and is the easiest way to do so. Click Next.

Next you choose the Password for logging into your server. You will need this to login with SQLYog and for your server to connect to it so be sure to remember it. After you do so select Next.

after this select Next or Finish I forget to install it. It should run through with no problems and your MySQL is all set.

Next is sqlyog.


Install it. Now run it. Select the New tab.

For MySQL Host Adress enter localhost unless you have mysql on another pc and want to view the data from there. Then you would enter the IP adress of the computer with mysql on it.

Enter root for the username. Then enter the password you just chose.

For port enter 3306 unless you chose something else setting it up.

That should be fine then select Connect. If it asks to save it I would do so ... so that you dont have to enter all the information each time.

Now lets setup the database and tables and all that for Mirage Source.

Above the Query window click the button that is a green arrow with 2 files. It is called Execute Batch File.

Click "..." to browse. Go to your MS 3.0.7 folder and find mirage_online.sql. Choose that. Now click Execute.

Voila you have your database set up. Dont see it on the left side yet? Click F9 and that should refresh it. If you still dont see Mirage_Online on the side just simply close the program and reopen it. The database should be installed and you can now easily view your servers data.

Ok why not get the server to connect to the sql server we just set up now?

Go to your server source and open it. Go to modDatabase and at the top find...

Code:
Public Const strCONN = "DRIVER={MySQL ODBC 3.51 Driver};SERVER=127.0.0.1;DATABASE=mirage_online;UID=root;PWD=****;OPTION=" & 1 + 2 + 8 + 32 + 2048 + 16384

keep in mind your password wont be ****. Change the password to whatever you selected and that should be all you have to. Of course unless you have the mysql on another pc or changed database name or anything like that. If so simply change those there.

If you havent already make sure to install MySQL ODBC 3.51 Driver. Its simple to do so. Now you can go start up your server. If it loads up with no problems Voila you are done. If not then you messed up somewhere along the way.

If you have trouble feel free to ask questions and I will help you the best I can.

GOOD LUCK!
Reply
#2
Hmmm Errors..

Code:
Query:
USE mirage_online

Error occured at:2006-12-26 06:56:53
Line no.:7
Error Code: 1049 - Unknown database 'mirage_online'

Query:
USE mirage_online

Error occured at:2006-12-26 06:57:26
Line no.:7
Error Code: 1049 - Unknown database 'mirage_online'

Query:
USE mirage_online

Error occured at:2006-12-26 06:59:23
Line no.:7
Error Code: 1049 - Unknown database 'mirage_online'

Query:
USE mirage_online

Error occured at:2007-01-04 14:01:20
Line no.:7
Error Code: 1049 - Unknown database 'mirage_online'

Should I just create the database and run the query?

[ e d i t ] Got it working but.. can't connect to database error via serverside.
Reply
#3
hmm so this is trying to setup the database? Im not sure if Verrigans is different but I used his. I beleive his has everything basic setup so you can run it "out of the box".

I can upload it if you want.

EDIT:

What error? Also get at me on AIM if you want that would be easier.
Reply
#4
It would be good with a easier version.
Reply
#5
That would be nice :] But would I use this "tut" with his user-friendly src?

[Image: Error.png]
Reply
#6
Yeah his just changes it so that it creates one class and so on so you can run it right away. Thats more less it.

Also that looks like your mysql server is not running. Make sure that it is.
Reply
#7
And how you suppose I do so?
Reply
#8
Running the Server

MySQL consists of a server which runs in the background, plus clients and utilities that access it via network connections.

It is worth knowing how to use command line utilities as clients, at least for debugging or as a backup. In particular, if you are not sure whether the server is running, you can tell by trying to execute the command line client C:\mysql\bin\mysql, and the server can always be stopped by C:\mysql\bin\mysqladmin -u root shutdown.

The way you start up the server depends on the platform, and what tools you choose to use. It is worth knowing the 'raw' way, which is to run the C:\mysql\bin\mysqld command. To get it to start automatically when the computer is switched on, put the mysqld command into the start/programs/startup menu. To configure, edit the file C:\windows\my.ini by hand (it is better to put options in that file, rather than adding them as command line arguments to the mysqld command).

An alternative is to use C:\mysql\bin\winmysqladmin, which is useful, but confusing. The first time you use it, it asks you for a username and password which it puts in C:\windows\my.ini. After that, or whenever you start it up by hand, it is likely to pop up a window briefly, but then disappear as if it has crashed. This is because it is running in the background, accessible via a little traffic lights icon in the system tray (bottom right of your screen, probably). Winmysqladmin installs itself in the start/programs/startup menu, to start the server at switch-on. To interact with it, right click on the icon and choose "show me", and you can use it to (e.g.) edit the my.ini file. When you have finished with it, use "hide me" to avoid shutting it down.

Another alternative, on Windows NT, 2000, XP but not 95, 98, ME, is to run C:\mysql\bin\mysqld --install which will run the server and also install it as a service (the equivalent of putting in start/programs/startup).


I use winmysqladmin myself.
Reply
#9
Nvm T.T Too confusing. I'll stick with 3.03
Reply
#10
Pando Wrote:Nvm T.T Too confusing. I'll stick with 3.03

lol ok its not hard when you get used to it. Did you get it working before you stopped though?
Reply
#11
Nope, not at all.
Reply
#12
Can this be set up on a webspace. just like the normals 10gb space 40gb bandwith monthly with a mysql database? or can it only be set up on a computer pc.
Reply
#13
lividus Wrote:Can this be set up on a webspace. just like the normals 10gb space 40gb bandwith monthly with a mysql database? or can it only be set up on a computer pc.

My guess is, is that it depends on the server your web data is on. If your web data is hosted on a remote server (not on your computer), you have to determine whether the server allows you to do either of the following:

Allows you to run the Mirage Source server on it

or

Allows you to connect to the MySQL database remotely (so that the Mirage Source server can connect to it)

If you have an average web host the two options above are unlikely. The easiest solution is to run both the web server and the mirage source server on your machine. Then put a link on your website to your local server to show stats or whatever information you are trying to provide.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)