News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

How to verify if my sql Privileges are set correctly in WAMP

Started by Bruce the Shark, December 06, 2014, 04:17:34 AM

Previous topic - Next topic

Bruce the Shark

Hello cruel world
Ok here we go, lets hope i get this right, I set up a spare pc at home with WAMP running on it and have installed SMF files in it directory as following the instruction here on this forum.
I never really found what i was looking for but never mind i did manage to see a basic rundown of a guide that took me sort of through the installation.
http://www.simplemachines.org/community/index.php?topic=498866.0
Anyhow all has gone well however during the initial setup it has asked me for a sql password that has fail to load.
But for my end after completion,  all appears good.
Just wondering how do i test to see if everything is ok, the only thing i could see was the forum maintenance mode  to run some basic task to see if all is well.
I haven't created and boards or post yet, so i am not even sure if it will save my files into the data base
My concerns here or question is how do i know if i have set up my sql privileges correctly or the ownership of my file.
Any ideas
Thanks

Night09

If you go into phpmyadmin you can look under the users tab at what privileges are set for the installation.

Initially it uses root username with no password then prompts you to create one until you do.

When you create one SQL wont connect and throw an error so just go into my.ini and set the password there and restart services then all should be ok.

Bruce the Shark

#2
While setting up my test domain and pointing it over to my ip addresss and forwarding my router  it seems i have messed up my script.
I am getting the following error
This page is not displaying
I have opened port 8081 and i'm getting a signal but my program isnt loading.
Somethings gone hay wire with my local hosts  in "C:/Windows/System32/drivers/etc
I have set the following

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
#   127.0.0.1       localhost
#   ::1             localhost

127.0.0.1    localhost
127.0.0.1    localhost
127.0.0.1    localhost
127.0.01     caprxxxxxx.local       #Myforumname



also the following setting have been changed in the WAMP directory
conf/extra/httpd-vhosts.conf":

and added this
<Directory C:/Users/Caprxxxxxx/Documents/Projects>
Order Deny,Allow   
Allow from all
</Directory>

<VirtualHost *:8081>   
DocumentRoot "C:\Users\Capxxxxx\Documents\Projects\Myforumname"
ServerName mysite.local
</VirtualHost>


Night09

Remove 2 lines of localhost: 127.0.0.1 as it serves no purpose and put the missing . in your site line.

As a note WAMP uses port 80 as default unless its already in use. Left click wamp icon got Apache > Service > Test port 80 to check.

You dont need to enable vhosts unless you plan on running multiple sites under one install. If you do you need to configure each site to resolve or it will always revert to the default site.

Virtualhost would be somthing like:

<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot "c:/wamp/www/sitename"
    ServerName sitename
    ServerAlias sitename
    ErrorLog "logs/dummy-host.sitename-error.log"
    CustomLog "logs/dummy-host.sitename-access.log" common
</VirtualHost>

You can choose to add the extension to the document root but make sure the site folder is consistent and includes it too if you follow the above example. You dont need the logs if you dont want them but its up to you.

Bruce the Shark

I have set all this as mentioned above, my host pc is displaying the forum correctly but when i put this online and access this from another computer and type in my domain name ( external web address ) i am missing images.
It appears as if it's not loading the default theme, something is still not configured correctly.

Night09

Try running repair_settings from the SMF site here to make sure the paths match up. It sounds like the themes path may be wrong.

http://download.simplemachines.org/index.php?thanks;filename=repair_settings.php

Place in main forum folder then browse to it and set your paths.


Illori

are you really trying to setup wamp to be a public server? are you just asking for your pc to be hacked? if you dont know how to setup a secure webserver you really should not be doing this.

Bruce the Shark

Quote from: Illori on December 07, 2014, 06:21:31 AM
are you really trying to setup wamp to be a public server? are you just asking for your pc to be hacked? if you dont know how to setup a secure webserver you really should not be doing this.

What!....This is your answer to my question.....Illori "if you dont know how to setup a secure webserver you really should not be doing this."

Is this the answer your giving to me? Are your serious. I don't like what you implying here, this is not helping me out.

Look i don't claim I know all of this because I don't. if I knew it. I would be asking. 
But what I would like is a little common courtesy. If you know it, then answer it correctly. If you don't then don't be so sarcastic. Otherwise this is just trolling.

Your just gaining post counts here. That's all. You're not making this any better for me.

I come here to learn something new every day, about forum building. Every day I learn something only helps me out should I be in serious trouble down the line. I don't need you to rain on my parade and go around making yourself so high and above.

I come to this forum because I don't know the answers. I never claimed I knew it. I do however try and be as polite as possible to other members.

I do however appreciate if you can be polite to me. I haven't attacked you. You have done this to me. I just need a simple question answered, if you cant answer it correctly, then I would appreciate if you keeping your comments to yourself.

How rude you are.

Illori

I am not being rude I am being honest. There is a big difference. Also this is not the correct place come to for sever configuration issues like you have. Also wamp is not made to be a public facing web server.

Antes

But the problem is, this forum is about Simple Machines Forum software. We are not here to teach people how to setup proper server.

Arantor

Not only that but there is a fundamental issue here. Running a public-facing webserver does require specialised skills. Few people here really have the skils, and it is not something that can just be learned or covered in a few posts or a few guides.

The point being made is that running a public facing website off your home PC is actually a very bad idea, no matter how much you might think otherwise and a certain amount of bluntness is really about trying to convince you how bad an idea it is, since we've learned time and time again that being nicer usually ends up being a waste of time for everyone.

Bruce the Shark

#11
Yes i understand this.
I do admit i got a bit carried away and of the topic.
I do understand a home server requires very special skills in setting up.
I never once mentioned that i wanted to run a home server all i wanted to do is setup up my forum on a local pc to allow full privileges so i could load my mods to see if i would get any errors.
I sort of then got stuck so i asked a few question which was not related to SMF but rather for wamp.
I did ask this in another forum, http://forum.wampserver.com/read.php?2,129324st ,curiosity got the better of me as i was trying to work out why my hosting permissions if they are set correctly and trying to compare these both sites.
Oh and also i didnt realize until now that my post was moved. Is there a way to find your post once it has been moved so i can find it, or do i need to do a search. I would have thought there would be a message sent to the user who post the topic that informs them of it being relocated.

Arantor

QuoteI never once mentioned that i wanted to run a home server all i wanted to do is setup up my forum on a local pc to allow full privileges so i could load my mods to see if i would get any errors.

Looking at the posts it looked *very* much like that was what you were trying to achieve, which would be a bad idea.

Running a forum locally is a great idea - I do that myself using WampServer. If you're using the default settings out of the box, you can just use the root account (username root, no password) for SMF and that'll have all the privileges it needs ready to go, but this is *firmly* not secure. But if it's your home PC just for testing purposes, this is of course not a significant problem.

QuoteI would have thought there would be a message sent to the user who post the topic that informs them of it being relocated.

No notification, however there are multiple methods of getting back to it. The usual one is 'Show new replies to my posts' which will show you any new replies in topics you've posted in (naturally including your own), though there is always your profile which also shows you all your posts/topics.

Antes

use "root" as user on wamp it'll have all permissions to execute any action(s) you want.

Bruce the Shark

Quote from: Night09 on December 06, 2014, 10:55:58 AM
If you go into phpmyadmin you can look under the users tab at what privileges are set for the installation.

Initially it uses root username with no password then prompts you to create one until you do.

When you create one SQL wont connect and throw an error so just go into my.ini and set the password there and restart services then all should be ok.

Just wanted to post this for Night09 as he asked me at the beginning of this post what my setting where.
i appreciate your help and thought i would show him this.

Also for Antes who has asked me what is my root directory is.
Sorry dude but i dont quiet understand what your meaning is . All i know is its setup in the local c: drive
All i got is an empty pc with avg running in the back ground and the necessary all up to date windows drivers/files oh i also got notepad plus plus on my desktop thats about it.
With 60 gigs of empty space 3 gb of ram

Night09

As discussed above this can be dodgy if you get things wrong. All of those root entries should have a password. This leads me to believe that SMF database hasnt got a password either which on a live site is bad.

Make sure you keep WAMP in offline mode and work via localhost to resolve the password issue. I wouldnt suggest making it a live site in all fairness.

Antes

when you are installing a software, it asks you to enter following details right?

username
password
database name

in this place use "root" as username. Software will have all power it needs to do stuff.

Night09

WAMP as default sets up as root with no password meaning SMF can be installed without a database password which is a risk.

Arantor


Night09


Arantor

Um.... No.

I have WampServer running. It is set to online (because if it is not set to online, it is not working at all), and it is not publicly accessible.

This is so because of the router blocking all incoming connections but also because the default configuration should only be listening to requests from 127.0.0.1:80. External requests do not have that IP address.

Night09

You just access sites via localhost when offline. What im saying is even if he sets up offline using localhost if the servers turned online and made public its a risk to have no passwords.


Bruce the Shark

Nighty09 is correct i do have this set to off line and it is safe so no one can access the data base but i decided to uninstalled this program again and just to see if i could re enter the password from the beginning but now it appears the user name and password are being rejected and i am getting an error that reads 

( Critical Error:-
The installer was unable to access the "smf" database. With some host, you have to create the database administration panel before SMF can use it. Some also add prefix - like your username - to your database name )

Somehow something has gone terribly wrong.

I have placed all the SMF files back into the root directory wamp/www.
and tried following the on screen instruction but this error is now appearing, what a mess.

From my logical way of thinking ( which i dont have much logic any way ) i think it is asking me to set up my passwords for the data base before proceeding. hmmm? am i right?

Sorry i cant add no more comments to this as i am hopelessly lost. ( but i am having heaps of fun with this program )

Night09

Even reinstalled WAMP wont ask for any passwords so they will not be there as default. You cannot give SMF a database password at this point because it doesnt exist. The phpmyadmin is where you need to set the passwords after WAMP install and before SMF install.

If all is set then phpmyadmin wont let you access it again until you update my.ini in the sql settings (password is blank unless changed) then you will regain access. Once your happy that part is resolved then install SMF as normal and put your new password in then.

Im not really sure where your up to on this though so have tried to give a reasonable answer to the setup procedure.

Bruce the Shark

#24
Not sure if i will word this correctly here  but before i re installing this program i went into the phpmyadmin and set up First the username and then proceeded to install this again.
I did these as followed
server name =localhost :3306
Username = root
Password ----- left blank
data base i left empty as well " i think unless there was something in it already"
so this proceeded to setup better than before.
However in another forum i was told it was not a good idea to place the files in the wamp/www directory but this is the only place i was able to re install the program and get it to work.
Not really sure what he meant by that,  however to sum this up, it is up and working locally on my pc but when it come to accessing it externally from an outside connection i can not.
I think this has something to do with my service provider blocking port 80....( they dont really allow you to run an home server not on that port anyway )
Or and i quote " unless i have placed the content in the wrong folder/ directroy  and possible this is why the program isnt showing "
I think i might try setting up and using another port or go back to using port 8080.

青山 素子

Quote from: Bruce the Shark on December 09, 2014, 01:46:16 PM
Not really sure what he meant by that,  however to sum this up, it is up and working locally on my pc but when it come to accessing it externally from an outside connection i can not.
I think this has something to do with my service provider blocking port 80....( they dont really allow you to run an home server not on that port anyway )
Or and i quote " unless i have placed the content in the wrong folder/ directroy  and possible this is why the program isnt showing "
I think i might try setting up and using another port or go back to using port 8080.

It is a very very bad idea to make an installation like that public. You're asking for your computer to be attacked. I encourage you to please not do this, as it's dangerous and if you don't know what you're doing you'll have problems. Judging by your questions, you don't know how to safely manage a server.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


Deaks

Bruce I have marked this as solved as you havent came back to it in a month,the advice given should be adequate to answer your querry, if you need further help please update us.  Please remember this is only in regards to the original issue. :P
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

Advertisement: