Jump to content

[SOLVED] Cannot set or change user passwords


rsduhamel

Recommended Posts

This seems like a fundamental problem and I hope I'm not beating an already-beaten horse but I can't find anything to help me with a search.

 

I have MySQL installed on a Fedora Core 5 machine. Everything was installed through the original setup or the Add / Remove Software feature. Nothing installed that is not on the Fedora installation disks.

 

I was able to change the root password and the root account has no problems.

 

When I create a user in phpMyAdmin he has no password, even if I say to use a password. Nothing I do, either through phpMyAdmin, the MySQL Administrator or the command line, will give the user a password. When I try this at the command line it goes as follows:

 

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

 

[root@localhost ~]# mysql -u root -p

Enter password:

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 193 to server version: 5.0.27

 

 

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

 

 

mysql> update mysql.user set password = PASSWORD('password') where user = 'fred';

Query OK, 0 rows affected (0.00 sec)

Rows matched: 1  Changed: 0  Warnings: 0

 

mysql> flush privileges;

Query OK, 0 rows affected (0.00 sec)

 

mysql> \q

Bye

[root@localhost ~]# mysql -u fred -p

Enter password:

ERROR 1045 (28000): Access denied for user 'fred'@'localhost' (using password: YES)

[root@localhost ~]# mysql -u fred

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 195 to server version: 5.0.27

 

 

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

 

 

mysql>

 

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

 

Notice that I log in as root, try to change the user's password then quit. Then I try to log in as the user with the new password--access denied. Then I log in as the user, no password--success. Once logged in, in phpMyAdmin the user cannot create database. The result is the same if I add a password with phpMyAdmin.

 

Hope this is enough information. Thanks in advance.

Link to comment
Share on other sites

Wouldn't you know it. After I finally gave up and posted the question I solved it myself. In phpMyAdmin, I recreated the user and set the host to localhost instead of any host (%). I also set the "Database for user" to "Grant all privileges on wildcard name (username_%)". This helped solve my next problem: "no privileges" for "Create New Database". Hope this saves someone else from pulling their hair out.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.