Hi there! I downloaded a PHP chat system, and it requires mySQL. I'm hosting a website on my computer as a server with IIS. My site is running already, now I want to know how to install and configure mySQL so it's inside my host. I'm using the port 4412 for the website. When the SQL is ready, I only have to put the php chat files on the root, and when I open the index.php, it will create mySQL TABLES automatically. Hope someone can help ^_^
Just download the free version and fill in the settings in the installation. Shouldn't be that hard to do. You may need to create a user according to your chat software (weird to use a database for chat software, but eh).
Is a PHP chat. I don't know if it will works hehe, but it worth the try. I tried to install it in a free hosting that i have, but they don't allow SCRIPTS, so I decide making this IIS website in my computer as a server. I installed mySQL already, but i don't know how to match it up with my site, so a install the database and link the .php files to it. My site is in the port 4412, and mySQl in 3306...Thanks for replying, hope u can help me further.
So what part are you having problems with? Do your scripts not link up to the database properly, isn't port 80 forwarded to port 4412? Btw, I'm more of a J2EE guy than php, so I know very little about that.
I'm more of HTML, graphic design, music and actionscripting, im new in mySQL and PHP. The site is working at port 4412, no problem with that, but i don't know how to set the mySQL database properly so I can link it to my website root folder, and upload the .php files inside. I suppose I have to do the same that with my site, make a rule in the firewall and in the modem to open the port 3306, but how I put the database in my site? Or does it has to stay in the mySQL installation folder in order to work?
but i don't know how to set the mySQL database properly so I can link it to my website root folder, and upload the .php files inside
Well that just doesn't make sense. Quick course on server software.
A server is a computer which you make requests to, which it executes and may send a response back (but not necessarily). A server, doesn't know a thing about a request or a response, the installed software does. The server just provides infrastructure and hands over requests
For example on your home desktop computer, a piece of software can reside anywhere, as long as your computer knows when to call upon it to do something with a file. Say you open a pdf file, if your computer has Acrobat installed, it'll know to open that program and hand the 'request' over to that software. If you don't have Acrobat installed, it wouldn't know what to do with it and notify you to select a piece of software that it can use.
So it doesn't really matter where you install php, mysql etc. As long as they're properly configured to run as a service/daemon at a certain port, than it knows that if a request comes in at a certain port, that the request should be handled by that piece of software. Or routed to some other port, but that's a whole other subject.
I advise you to look for some software to administer mySql databases. This way you can login as root to your database and see what's going on. That would be a good check to see if mySQL is installed properly and running. I personally have good experiences with SQLyog, but I don't think there's a free version. The workbench that comes with mySQL may have some admin tool if I recal correctly, but it's been a while.
Next step, is to let your php script find your database. First it must have acces to it, so it must have credentials to a user in your database (for security, don't make it root, to limit damage if it may get hacked). It must make requests to the right address, so check if it's using localhost and port 3306 to make requests to.
Btw, you may want to look into WAMP (I guess you're a windows user) or else LAMP (Linux) or MAMP (Mac), as this installs an Apache server, with MySQL and PHP. It uses PHPadmin for database management, which I seriously advise you NOT to use, as it is very easy to lock you out of your own database. I'm not proud to say this happened to me on more than one occasion.
I reed something about myPHPAdmin....i'm thinking in installing it to see if it helps me to configure mySQL correctly. Ok i create the database, and my php files are suppose to install the tables automaticlly, but if I open the index.php in my browsers, instead of showing the chat, as it did in my other hosting, it shows ALL the code instead...i understand what you said, but we are talking about TWO ports: my website port 4412, and mySQP port 3306. Everything that is in my website root folder is called by port 4412, and if the mySQL database is at port 3306, how we call it?
No no no, im talking when I'm configuring mySQL, it opens/shows a windows to specify that details, but now i realize it has nothing to do with it, because that windows is for creating TABLES, and i dont need to creates tables now, because my PHP chat configuration.php will create them automatically
but if I open the index.php in my browsers, instead of showing the chat, as it did in my other hosting, it shows ALL the code instead...i understand what you said, but we are talking about TWO ports: my website port 4412, and mySQP port 3306. Everything that is in my website root folder is called by port 4412, and if the mySQL database is at port 3306, how we call it?
Ah, so php isn't used to make sense of the script so the browser just shows the contents of the file. A browser uses port 80 as default so you'll have to manually use port 4412 or configure your server to forward calls to port 80 to port 4412. Before you start down the road of firewall configuration you may want to just manually call on port 4412. I don't know how knowledgeable you are on this subject but just in case:
Yeah i figured it out, in my configuration.php file , where it says host i put localhost:3306, also i test http://localhost:3306 and it showed stuff about mySQL, telling me everything's fine. But now i think i will use this other chat that doesn't need mySQL, and if i need mySQL later, now I know where to start. Thanks!