Changine the user and password of My SQL
Posted by: luisa (213.181.56.---)
Date: May 06, 2006 01:28PM

How can i change user and password for My SQL ? when I change it does't work .

it has no password in default.

some one help me


Options: ReplyQuote
Re: Changine the user and password of My SQL
Posted by: CyberSpatium (---.hsd1.or.comcast.net)
Date: May 06, 2006 02:14PM

you can use the mysql privleges database. edit the root user and add a password. If you have a new password, you will need to update the phpmyadmin config file with your new password.

Options: ReplyQuote
Re: Changine the user and password of My SQL
Posted by: luisa (213.181.56.---)
Date: May 06, 2006 03:18PM

I am somehow beginer in these things , so can you make it more clear to make me undrestand it .I am using wamp on my computer , it has no option for changing user and password .

I changed the user and password in config file , but after that my SQL first page doesn't work .



Post Edited (05-06-06 15:21)

Options: ReplyQuote
Re: Changine the user and password of My SQL
Posted by: barney0o0 (---.cable.mindspring.com)
Date: May 07, 2006 07:54AM

Hi, I am having the same problem as "yes" is having.

I installed wamp, and would like to know how to create a password for root

As far as I can tell, wamp did not install a 'privileges' database in mySQL.

Please help us!

Options: ReplyQuote
Re: Changine the user and password of My SQL
Posted by: barney0o0 (---.cable.mindspring.com)
Date: May 07, 2006 08:02AM

I have found an answer:

[forum.wampserver.com]

I have followed steps 3-7, but not 1-2 or 8-10

Can somebody please explain what steps 1-2 and 8-10 are supposed to achieve?

THANKS!

The post is as follows:

---------------------------------------------------------------------

Author: deliriumtremens (---.bhz.virtua.com.br)
Date: 04-29-06 23:53

1. edit php.ini
2. enter "whatever" in the 'mysql.default_password' field
3. open MySQL console
4. hit enter
5. type SET PASSWORD FOR root@localhost=PASSWORD('whatever');
6. hit enter
7. type EXIT;
8. hit enter
9. edit config.inc.php
10. enter "whatever" in the $cfg['Servers'][$i]['password'] field
11. restart all services

Why not make a configuration wizard?

Options: ReplyQuote
Re: Changine the user and password of My SQL
Posted by: barney0o0 (---.cable.mindspring.com)
Date: May 07, 2006 08:10AM

The problem I am having with steps 1 & 2 is this:

In php.ini, I read the following statement regarding entering a mysql.default_password:

---------------------------------

Default password for mysql_connect() (doesn't apply in safe mode).
Note that this is generally a *bad* idea to store passwords in this file.
*Any* user with PHP access can run 'echo get_cfg_var("mysql.default_password"winking smiley
and reveal this password! And of course, any users with read access to this
file will be able to reveal the password as well.

---------------------------------

Is this really necessary?

Thanks!

Options: ReplyQuote
Re: Changine the user and password of My SQL
Posted by: barney0o0 (---.cable.mindspring.com)
Date: May 07, 2006 08:18AM

OK, now that I have implemented a password for root, I am getting the following types of errors on my site:

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: NO)

Please help, how do I tell PHP to use the correct password for mySQL root?

Options: ReplyQuote
Re: Changine the user and password of My SQL
Posted by: CyberSpatium (---.hsd1.or.comcast.net)
Date: May 09, 2006 04:12AM

> OK, now that I have implemented a password for root, I am getting the following types
> of errors on my site:
>
> Warning: mysql_connect() [function.mysql-connect]: Access denied for user
> 'root'@'localhost' (using password: NO)
>
> Please help, how do I tell PHP to use the correct password for mySQL root?

Now that you have set a password for root, you need to use that in your scripts.

mysql_connect ('localhost', 'root', 'Your_New_Password_Here');

If you are having problems accessing phpmyadmin to, then make sure you edit phpmyadmin config file and add your new password.

Options: ReplyQuote
Re: Changine the user and password of My SQL
Posted by: yfastud (72.236.169.---)
Date: May 16, 2006 08:00PM

Oh man, I keep posting over and over, and yes still have people as about it. Maybe this should be a sticky note for everyone.

Either use command promt as CyberSpatium's suggestion or follows these:

For setup password, need to change it in TWO PLACES:

1. Set password in Privilleges in phpMyAdmin from your Browser/Localhost.
Goto: localhost/phpmyadmin/
click on "Privileges" link
click on "edit Privileges" link for ROOT user
and set-up your password (change password) and click go

2. Set password in config.inc.php in /wamp/phpmyadmin.
Find and put your password in this line:
$cfg['Servers'][$i]['password'] = 'Your_new_password_here'; // MySQL password (only

Also, if like to set the permission to access PHPmyadmin and SQLitemanager (credited to Joshua), so only local network user can access it through Localhost or Alias; otherwise, use htaccess and htpasswrd.

1. open httpd.conf

2. find the lines
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>

3. after the </directory> line above add the following:

<Directory "C:/Internet/wamp/www/phpmyadmin">
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Directory>

<Directory "C:/Internet/wamp/www/sqlitemanager">
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Directory>

4. change location of the directories as your might be different from "C:/Internet/wamp/www/phpmyadmin"

Also in Alias folder (/wamp/Apache2/conf/alias), replace these lines in phpmyadmin.conf and splitemanager.conf:

Order allow,deny
Allow from all

By these lines:

Order deny,allow
Deny from all
Allow from 127.0.0.1

Hope this help,



Post Edited (05-16-06 21:36)

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote


Sorry, only registered users may post in this forum.