SitePoint Sponsor |
|
User Tag List
Results 1 to 14 of 14
-
Oct 14, 2002, 23:54 #1
- Join Date
- Feb 2002
- Location
- NZ
- Posts
- 620
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Change password in WinMySQLadmin ??
I tried to get an answer to this in the DB forum but NO reply.
Change password in WinMySQLadmin ??
Anyone tell me how to change/find the password in WinMySQLadmin and/or change the password in MySQL.
I installed php/apache/mysql on my system and it seems that something happened when I changed over to a cable connection and now my db is password protected.
BTW,this is only a db on my own system that I'm using for test purposes and I dont want to do a whole new install.
Thanks
-
Oct 15, 2002, 01:44 #2
try this:
open the winmysqladmin window, clicked the my.ini setup, below there u can change your username and password, and then save the modification. i think tat should work..
-
Oct 15, 2002, 01:51 #3
- Join Date
- Feb 2002
- Location
- NZ
- Posts
- 620
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Your probably correct but when I hit "Pick-up and Edit my.ini values" NOTHING happens.
Most frustrating....but I really appreciate the reply.
-
Oct 15, 2002, 03:44 #4
- Join Date
- Jul 2001
- Location
- Berkshire, UK
- Posts
- 7,442
- Mentioned
- 1 Post(s)
- Tagged
- 0 Thread(s)
Hi Motivated, can you access the dB at all? if so you should be able to use grant/revoke and create another user of change the password of an existing user. Check out this link
Regular user
-
Oct 15, 2002, 03:50 #5
- Join Date
- Feb 2002
- Location
- NZ
- Posts
- 620
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks Sarah,I'll check it out.
I'm trying to create a new DB from a script,I really dont have a clue what has happened.All I know is that everything was fine prior to getting cable.
I was just reading up on grant/revoke but I have soooo much trouble understanding this MySQL dribble.
Thanks again
-
Oct 15, 2002, 04:18 #6
- Join Date
- Oct 2002
- Posts
- 27
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
From MySQL3.23.51 onwards, please look for the following files (depending on your dbase-type config).
** my-huge. / my-small. / my-large. / my-medium.cnf **.
There's a good chance that one among the above files is acting as the default. It would've been renamed to "my.cnf" or "my.ini". Look for that file in the "MySQL-installed-partition-root" like C:\ / "MySQL-installation-folder" like C:\MySQL or in C:\Windows. Your password and username would be in that file. You can manually edit that file with a ASCII-text editor.
hth
PS:
* the above works for all Windows OS. Don't know of *nix variants
* You said something about getting cable, so assuming it's no coincidence...check what's under "LocalHost" and "Local IP Address" fields of the ENVIRONMENT tab of WinMySQLAdmin. If there's something out of sorts there, post that in the forum. The database heavies here will solve your problem in a jiffyLast edited by then; Oct 15, 2002 at 04:48.
O Nobly Born, be thou grave and courteous in thy speech; quick to succour and slow to flame.
-
Oct 15, 2002, 07:48 #7
- Join Date
- Feb 2002
- Location
- NZ
- Posts
- 620
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I dont even have a clue what an ASCII-text editor is ??
What is involved in using it or anything else.
So here is a FULL REPORT of what is happening :
THIS IS IN WinMySQLadmin:
Local Host Name: DIT (I dont remember putting this in)
Local User NAME: dit (I dont remember putting this in)
OS Platform : Win98
Local IP Address: jasmine(Dont remember ever putting that in and jasmine is the name for cable connection (plus an IP number (192.***.*.*) which I believe is my computer but its NOT localhost(127.0.0.1))
Heres the script I'm trying to run:
<?php
if(!$_POST['test'])
{
?>
<html>
<head>
<title>TEST</title>
</head>
<form action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="post">
<B><font size="4">This is my test</font></B>
<P> <P>
<input type="submit" name="test" value="test">
</form>
</html>
<?php
}
elseif($_POST['test'])
{
$host="localhost";
$user="user";
$password="passwd";
$dbname="newdatabase";
$link=mysql_connect($host,$user,$password);
}
if(mysql_create_db($dbname,$link))
{
echo("The database was successfully created<br>");
}
else
{
echo("The database $dbname could not be created <br>");
}
mysql_close($link);
?>
Heres what I get when I call the script :
Notice: Undefined index: test in C:\Program Files\Apache Group\Apache\htdocs\test_db.php on line 4
Notice: Undefined variable: dbname in C:\Program Files\Apache Group\Apache\htdocs\test_db.php on line 33
Notice: Undefined variable: link in C:\Program Files\Apache Group\Apache\htdocs\test_db.php on line 33
Warning: mysql_create_db(): supplied argument is not a valid MySQL-Link resource in C:\Program Files\Apache Group\Apache\htdocs\test_db.php on line 33
Notice: Undefined variable: dbname in C:\Program Files\Apache Group\Apache\htdocs\test_db.php on line 40
The database could not be created
Notice: Undefined variable: link in C:\Program Files\Apache Group\Apache\htdocs\test_db.php on line 43
Warning: mysql_close(): supplied argument is not a valid MySQL-Link resource in C:\Program Files\Apache Group\Apache\htdocs\test_db.php on line 43
And heres what I get AFTER running the script:
Warning: Access denied for user: 'user@localhost' (Using password: YES) in C:\Program Files\Apache Group\Apache\htdocs\test_db.php on line 30
Warning: MySQL Connection Failed: Access denied for user: 'user@localhost' (Using password: YES) in C:\Program Files\Apache Group\Apache\htdocs\test_db.php on line 30
Warning: mysql_create_db(): supplied argument is not a valid MySQL-Link resource in C:\Program Files\Apache Group\Apache\htdocs\test_db.php on line 33
The database newdatabase could not be created
Warning: mysql_close(): supplied argument is not a valid MySQL-Link resource in C:\Program Files\Apache Group\Apache\htdocs\test_db.php on line 43
HELLLLLLLLLLLLLP !!!
pleaseLast edited by Motivated; Oct 15, 2002 at 07:52.
-
Oct 15, 2002, 08:10 #8
- Join Date
- Mar 2001
- Location
- Mexico
- Posts
- 1,287
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally posted by Motivated
I dont even have a clue what an ASCII-text editor is ??
THIS IS IN WinMySQLadmin:
Local Host Name: DIT (I dont remember putting this in)
Local User NAME: dit (I dont remember putting this in)
OS Platform : Win98
Local IP Address: jasmine(Dont remember ever putting that in and jasmine is the name for cable connection (plus an IP number (192.***.*.*) which I believe is my computer but its NOT localhost(127.0.0.1))
I'm asumming you are using mysql and php just to work locally, ie, nobody can connect to your web server, otherwise you have to create or recreate a mysql user using the GRANT command.
Paul
-
Oct 15, 2002, 08:54 #9
- Join Date
- Feb 2002
- Location
- NZ
- Posts
- 620
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I opened my.ini and it has exactly the same thing as WinMySQLadmin :
......................................
[WinMySQLAdmin]
Server=C:/MYSQL/bin/mysqld-opt.exe
......................................
Thats its TOTAL contents.
Now I'm beginning to believe its something to do with my network settings or it could be perhaps my firewall,but I'm sure it was working fine before the network was installed with the firewall up.
Thanks ALL for your help.
-
Oct 15, 2002, 11:10 #10
I have removed your other thread and put this one here. Please do not cross-post
SeanHarry Potter
-- You lived inside my world so softly
-- Protected only by the kindness of your nature
-
Oct 15, 2002, 13:15 #11
- Join Date
- Oct 2002
- Posts
- 27
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Warning: Access denied for user: 'user@localhost' (Using password: YES) in C:\Program Files\Apache Group\Apache\htdocs\test_db.php on line 30
Further, you can make life a lot easier for yourself by getting MyCC from http://www.mysql.com/downloads/gui-mycc.html . It's a simple, yet powerful GUI for MySQL database. Use it to check the privileges for the USER or edit/GRANT USER's privileges.
I would suggest that you create a super user with all privilges and NEVER USE the super user in your scripts. Instead create a regular user with limited privileges like CREATE, UPDATE and SELECT. That way the ordinary user in the scripts can't do any accidental damage to the database. Operate the super user only from the command prompt / GUI so that you are focused solely on specific admin stuff.
Btw, I too am on Win'98 and here's what my "my.ini" file located in WINDOWS directory looks like...
********************
[WinMySQLAdmin]
Server=C:/MYSQL/bin/mysqld-max.exe
user=xxxxxxx
password=xxxxx
[mysqld]
basedir=C:/MYSQL
#bind-address=192.***.*.**
datadir=C:/MYSQL/data
#language=C:/MYSQL/share/your language directory
#slow query log#=
#tmpdir#=
#port=3306
#set-variable=key_buffer=16M
********************
You can Edit/Create the user and password values in the "my.ini" file with Notepad. IP addresses starting with 192 mean the you are in a private/shared domain. But, I don't think that's the cause of the problem.
Notice: Undefined index: test in C:\Program Files\Apache Group\Apache\htdocs\test_db.php on line 4
Notice: Undefined variable: dbname in C:\Program Files\Apache Group\Apache\htdocs\test_db.php on line 33
Notice: Undefined variable: link in C:\Program Files\Apache Group\Apache\htdocs\test_db.php on line 33. Please look up the PHP manual for examples and user comments, that could be of some help to you.
hth & best of luck
theNLast edited by then; Oct 15, 2002 at 13:19.
O Nobly Born, be thou grave and courteous in thy speech; quick to succour and slow to flame.
-
Oct 15, 2002, 19:36 #12
- Join Date
- Feb 2002
- Location
- NZ
- Posts
- 620
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Now this is really strange because I have never set any priv's in mysql and to be honest I wouldn't know how at this stage.
I haven't used mysql yet for building anything.
OK,so I'm off to get MyCC and hope that can put some light on the situation.
Hey...thanks for all your time and help,I appreciate it.
-
Oct 15, 2002, 19:53 #13
- Join Date
- Feb 2002
- Location
- NZ
- Posts
- 620
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Is it possible that because my computer has been networked that my script is trying to access one of the other puters in this room instead of mine.
I dont know anything about this network stuff and have had to rely on one of the others in here to set it up.
-
Oct 16, 2002, 01:05 #14
- Join Date
- Oct 2002
- Posts
- 27
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
really strange because I have never set any priv's in mysql
All I can say is this-
* un-install MySQL and clean up the registry & delete all "my.cnf" and "my.ini" files. Install MySQL again.
OR
* use MyCC to delete the user DIT and create another user with limited SELECT, UPDATE, CREATE privileges and use this news user in your scripts.
I think a fresh install is a better option at this juncture. Since you are on Win'98, the whole procedure would take about 3minutes.
hth
theNO Nobly Born, be thou grave and courteous in thy speech; quick to succour and slow to flame.
Bookmarks