View Full Version : MySql setup.
Hey, so... I had some problems with my mysql and had to reinstall in on my pc (running it under windows).
I'm using a pack called Xampp containing Apache/MySQL/FileZilla/Mercury. The problem is that I can't make the mysql to run properly. It does run, but when I enter my forum it says there is a database error.
I presume this is because there isn't a path specified for the mysql server to my website... the thing is I tried to change most of the paths from "my.cnf" from E:/xampp/mysql/ to E:/site....but it doesn't work... I know I missed something but don't know exactly what...could anyone help please ?:)
Thanks.
Change the path back to mysql, you don't need to specify a path to a website in mysql, since mysql does not connect to the site, the site connects to it.
Is that all the error message says?
Are you able to create a script that can connect to a database or is it only the forum?
Does the mysql user for the forum have access to the forum's database?
Does the forum you're using support the version of mysql you have installed?
http://warhammerro.no-ip.org/forum/
this is the link with the error.
I'm using vBulletin and does support this version of mysql since I used the exact same version before I had to reinstall xampp.
MySQL user ? What do you mean by that ?
And I don't know how to create the script... I'm not that good in mysql... :(
EDIT: just noticed that when I go to the admin options in mysql there is a yellow light showing instead of green :/ ...though...the site didn't work when it was green either so that's not it :p
EDIT2: Back to green again o.O
mysql is probably not configured correctly.
yeah... that much I figured out :p Any ideas what I should do ?:P
Join FA.WAR instead as our forum works :p
I'd gladly join, sadly I'm not playing WAR any more atm.. got a lot to do for school.
The forum is made for some friends where we can discuss meet-ups and when the next wargaming session will be :p so yeah.. I have to complete it :p
use WAMPServer instead of Xampp
http://www.wampserver.com/en/
Both wampserver and xampp are kinda ok, even though they both suck when it comes down to really managing a server, just like any other web server control panel software.
Anyways, I'd recommend uninstalling the whole package and reinstall it. If you don't want to do that, pm me and I'll try to help you get mysql configured correctly.
ok, reinstalled it...but it still doesn't work :|
When reinstalling it, first, completely remove all files for mysql that were created by Xampp to make sure it doesn't use any configuration files that already exist. After doing that, you might have to recreate the forum db user, so the forum has a user account to connect to the forum database. You should be able to do that within the control panel under mysql. If you used the automated script from vbulletin it might be difficult for you to do on our own.
If nothing you do works, I can walk you through manually configuring mysql, if you want, and say please.
Thanks for the help so far, gonna continue this on PMs so not to bore the forum with my sql problems :P
Uh... why are you running all of this on Windows?!
easiest way to save old mysql configs is just copy the bin/data folder contents the base wamp config should work fine for everything really all you have to do is set a root mysql password but the rest should be fine
k...installed wamp and have the same problem ...
just that now I can get a forbidden error when I try to connect to my site :|
wtf have you done oO wamp should never give you that as its apache not IIS and so ignores windows file perms
??
Easy guide to setting up WAMP: http://www.rasyid.net/2007/07/09/step-by-step-install-wamp-in-windows-xp/
Might save you a bit of time perhaps?
the installation process was easy >.>
Don't know why I had those errors though I just changed the path from /wamp/www/ to /site/ for the website in httpd.conf and the main page worked, but the other pages like /site/docs/ didn't, as they were "forbidden".
My biggest problem still remains that I don't know why doesn't the mysql server work :/ and how to make it work :(
im assuming you've set up a firewall rule to allow connections (port 3306) ?
I don't use a firewall ... and yes I did that in the windows firewall although it's deactivated:/
http://dev.mysql.com/doc/refman/5.0/en/can-not-connect-to-server.html
I looked up error 2003 (the one I have it seems) and although I did what they said there... I couldn't connect :/
Well... try going down a more diagnostic route?
Open up a command prompt (start -> run -> cmd) and type:
telnet localhost 3306
You should get:
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
@
5.0.51a-3ubuntu5.1?W{&Eje>,ï¿CvIJw;^F$|hv
Ignore this ^^ thats my operating system. The point is you should get a connection. If you do not get a connection check in task manager whether or not mysql is actually running.
well... I have in my taskmanager mysqld-nt running.
When I do what you said I get only this:
A
5.0.67-community-ntoJopf.0, :) and some other bable in the same lane (yes I do get a smiley face)
and then it says connection to host lost.
So your mysql server is sitting there, running, and accepting connections. So the problem will most likely be with the webserver not establishing the connection.
Do you have a mysql username and password set up? (In linux the default user is 'root' with a password you specify during installation but I've never done this under windows)
Create a blank PHP file and put into that file the following:
<?
$user = "username";
$pass = "password";
$host = "localhost";
$dbh=mysql_connect ($host,$user,$pass) or die ('I cannot connect to the database because: ' . mysql_error(). '');
?>
... and then save the file, and try to open it with your web browser (http://localhost/filename.php or whatever)
it's a blank page if I change username with root and password with the pass I chose :)
Then that means it's connecting successfully... :)
So there is no problem...
Ok.... then can you please tell me why I can't access:
http://warhammerro.no-ip.org/forum ?
uh oh... >.<
Question... may it be because the partition letter changed from F: to E: for the site hosted ?
Before the new windows installation it was f:/site/
and now it's e:/site/
:S
Well, what am I meant to be seeing?
Uhm... a basic vBulletin forum...
have you checked the apache log files see what errors its throwing up ?
have you checked the name of your db and the forum db username and password setup in mysql against the ones stored in the vbulletin config ?
Well, try this...
delete everything in said folder (vb on your webserver)
reinstall vb
create a database in mysql:
( create database databasename; )
grant all privileges on that database to a username identified by a password:
( grant all privileges on database.* to 'username'@'localhost' identified by 'password'; )
goto the administration/installation page for vb and then fill in the details providing the u/p/dbname you created above
you don't need to do that pixel you can edit the vb config file directly in includes/config.php
if he creates a db manually like that he needs to remember to flush privlidges; too else it won't load the new user into mysql :)
Never used VB before - so I'll shush :P
At least we know that the problem isn't with mysql now...
so I was playing with the mysql and the config file and noticed some errors...
for once the path to the site was incorrect in the config file (it was F:\ instead of E:\)
and ...the db "forum" with the table prefix "forum_" was missing :\
so did you fix them and does it work now?
URL still isn't working ^_^
yeah...
I fixed the user problem, the path problem... now I have to make the db o.O and that I don't really know how to do :(
You will probably have a .sql file or more than one .sql file... Not sure on the syntax in windows but in linux you'd do:
mysql -u USERNAME -p -D DATABASENAME < filename.sql
well, I use phpMyAdmin and I just press a button to create it ... but it's going to empty :/
phpMyAdmin should have an 'import' function to import a .sql file into a database?
yeah it does :)
I'm on the verge of a breakthrough... any minute now :)) lol
*goes back at tinkering*
only use phpmyadmin if your importing a backup.sql from an old db if your starting from scratch with vb then simply run its install script.
if your importing from a different forum type into vb then use the built in vb importers (impex)
ok... so ... I might have stumbled upon the reason why I can't seem to make this work :\
I have php 5.2.6 installed on the machine, the one that came with xampp, but I didn't do any configs for it... can that be the problem ?
I saw that vb has a file "mysql-scheme.php" ...and I bet I have to run that as a script... right ?
Shouldn't be a problem with PHP as you al ready tested that on post 26 (top of this page)...
Create another blank PHP page with the following in it:
<? php_info(); ?>
Save this and access it via your browser and see if it returns the PHP configuration information page
Have you tried reinstalling vbulletin after reinstalling mysql? If not, delete vbulletin completely(which I think someone already mentioned) and run the install script for vbbulletin. If mysql is working, then the install script should work fine. It'll create the database with the mysql user.
Fatal error: Call to undefined function php_info() in E:\site\test.php on line 1
guess that's not good.
I'd rather try not to delete VBulletin.......
it's phpinfo();
Do you see a vbulletin database under phpmyadmin or under mysql in your administrator control panel(didn't read everything so sorry if you already answered it)?
nope, there is none.
afaik I have to run mysql-schema.php for it to be created (located in the /install/ folder of vb.
but don't really know :S
edit: it works with phpinfo();
edit2: but when I try to run the script I get this:
MySQL Schema: $db is not an instance of the vB Database class. This script requires the escape_string() method from the vB Database class.
doh
and yes of course php is working correctly if you can even get to phpmyadmin
(end of a long day and my mind is now entangled in setting up vpn + proxy)
ok, run the install script, it should setup everything for you. I forgot which one it is, look on vbulletin website for the install instruction, or there is one within the vbulletin directory I think.
vbulletin is setup fine, it just needs to create the database and a mysql user for it.
It works... thanks I guess. I lost all the info I had on the site but it works at least!
THANKS A LOT TO ALL :D
you not got a database backup of your site beforehand?
kinda :(
didn't really know how to use db or how the site really works.... I backup up the forum folder -.- not the db folder....
...the shame :p
It works... thanks I guess. I lost all the info I had on the site but it works at least!
Unless you made a backup before you reinstalled mysql, it's gone no matter what.
Ok, np :p not that much was lost anyway :p
thanks again!
not wanting to create a new thread just for this...
how do I create an xml file ?
I have a directory with files (pictures from a forum skin) and I want to make a xml for it :)
EDIT: Nwm ...
Is it a skin template that you downloaded? Just place it in the directory for templates(haven't used vbulletin recently so can't remember where) and then you can select it in the admin panel.
You might have to import it through the admin panel by selecting the location of the directory of the downloaded template. I don't know, I haven't created/messed with vbulletin templates in such a long time, I can't remember.
Never used VB so can't assist with that unfortunately... might be worth asking hinch?
vBulletin® v3.8.4, Copyright ©2000-2010, Jelsoft Enterprises Ltd.