PDA

View Full Version : What is up with the user name and pass in my config.php file?


EVO VIII Chris
08-27-2003, 11:40 PM
Ok to make this short and sweet I have VBulleting working great on my website at www.vorspann.net however I am just curious because a few things are wierd in my config.php file...

It asked for my username and password when installing and I tried entering my username which was Chris Jumonville and my password which was ********** but it wouldnt install. I went with the default settings which were exactly as follows...

// username and password to log onto db server
$dbusername="root";
$dbpassword="";

Umm ok that is basically saying that I dont have a name or password?

Well I installed it and it worked just like that without any problems. I know that those ARE NOT my MySQL password and username for a fact. It will also ONLY work with my server name as "localhost". My only guess for this would be that since I run my own server which is a DNS server, web server and everything and I dont use any hosting services that it uses localhost as the server name since it is my local computer and that it uses the root for name and nothing for the password because this is all hosted on my own computer which I am installing vBulletin on. I imagine the only time the user name and password would be relavant and a server name as well would be if you were using a hosting service? Is this right or is something wierd just going on? All things said however vBulletin works 100% great.

Can anyone explain this to me?

Thanks
Chris

SmEdD
08-27-2003, 11:51 PM
Ok I'm trying to figure this out. You are asking why you need a user name and password when it's your own server?

EVO VIII Chris
08-27-2003, 11:55 PM
Yes I am new to PHP, mysql and vBulletin so that is infact what I am asking.

SmEdD
08-28-2003, 01:30 AM
If you didn't have a user name and pass I could connect to your DB. localhost just means that the DB is on the same computer.

So I definatly suggest puuting a user name and pass due to securitey reasons.

EVO VIII Chris
08-28-2003, 01:39 AM
I do have a user name and password for my MySQL DB but what I am saying is that vBulletin config.php file under the admin directory says that the user name is "root" and the password is "" which is nothing. However my user name for MySQL is Chris Jumonville and the password is **********. So how is vBulletin accessing my DB and working just fine when it doesnt have a user name and password? Get what Im saying? Everything works here I am just trying to understand how this works.

Chris

SmEdD
08-28-2003, 08:25 PM
Hmmm has to be something on your end. I'm not to sure what it could be . . .

NTLDR
08-28-2003, 09:05 PM
If that is definatly what you have in config.php then it means the root MySQL account has no password on your server, hence the reason it works. I strongly suggest making sure the root account has a complex password and that you use an ordinary account for vB.

EVO VIII Chris
08-28-2003, 11:51 PM
But how can it say that when this is what my MySQL my.ini file says....

#Uncomment or Add only the keys that you know how works.
#Read the MySQL Manual for instructions

[mysqld]
basedir=C:/mysql
#bind-address=67.164.107.65
datadir=C:/mysql/data
#language=C:/mysql/share/your language directory
#slow query log#=
#tmpdir#=
#port=3306
#set-variable=key_buffer=16M
[WinMySQLadmin]
Server=C:/mysql/bin/mysqld-nt.exe
user=Chris Jumonville
password=**********

I blocked the password out for security reasons when posting this obviously.

Chris

filburt1
08-29-2003, 12:20 AM
You typically create users via a MySQL client, IIRC, as well as creating permissions. Naturally you need to connect as root to do that the first time. Try playing with mysqladmin. When I set up MySQL on Windows, I didn't have to touch any of its config files for it to work, so there is likely a simpler solution.

EVO VIII Chris
08-29-2003, 02:31 AM
Maybe Im dumb but what is IIRC? Also my MySQL database works just fine its just wierd that I have created user name as chris Jumonville and a password in the my.ini file USING mySQLAdmin and yet my vBulletin database will not connect at all when I use Chris Jumonville as the user name and ******** as the password. It works when I user root as the name and "" as the pass. Its just really weird.

Chris

assassingod
08-29-2003, 06:09 AM
IIRC = If I Recall(or Remember) Correctly

Issvar
08-31-2003, 10:32 AM
Mysqladmin is not mysql, the passwords in one have nothing to do with the other.

Read the documentation for mysql (and for your dns server, webserver, etc).

Run mysql from the commandline to be able to configure it.

In the future read the documentation before you run something, it's likely anyone can read and write files on your harddisk now.

Erwin
08-31-2003, 10:57 AM
Set a root password immediately - if your mysql database is chown by root as well, then obviously root can connect too.