Newbie connect issue

Silas2
Silas2 used Ask the Experts™
on
I don't know where to go next. Ubuntu/MySQL 5.1. I need to connect/login from remote dynamic ip pc's.
I edit my.cnf, bind-address= myip, a comment in this file says skip-networking not used by default anymore.
I pull up a mysql> prompt, and run a restart.
I run 'update user set host='*' where user='myname';
but always connection denied
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Look at this MySQL user manual for adding USER to have remote access

http://dev.mysql.com/doc/refman/5.1/en/adding-users.html

From this page,

mysql> CREATE USER 'monty'@'localhost' IDENTIFIED BY 'some_pass';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'monty'@'localhost'
    ->     WITH GRANT OPTION;
mysql> CREATE USER 'monty'@'%' IDENTIFIED BY 'some_pass';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'monty'@'%'
    ->     WITH GRANT OPTION;


Two of the accounts have a user name of monty and a password of some_pass. Both accounts are superuser accounts with full privileges to do anything. The 'monty'@'localhost' account can be used only when connecting from the local host. The 'monty'@'%' account uses the '%' wildcard for the host part, so it can be used to connect from any host.

Author

Commented:
This is getting worse. When I try to connect with the prompt, I always get Access Denied 28000, on the MySQL site, I follow these instructions:
http://dev.mysql.com/doc/refman/5.1/en/resetting-permissions.html
I stop the Mysql service, (check that with grep) restart with --skip-grant-tables, then the instructions say you should always get in, but still Access Denied 28000????

Author

Commented:
Mmmm...this is really tough, still can't connect. I followed everything in that post. I even tried a purge and a reinstall, but I notice that the my.cnf remains the same so I'm not sure if the purge is really getting rid of the old install.
I just keep getting 28000 Access denied, i switch between locahost and the pcs's static IP, I notice the mysqld.sock is empty, I don't know what is supposed to be in this file.
Is there a purge which removes all traces of the previous install?
Commented:
after you create the user, do you

MySQL > Flush Privileges;  


?? this is very important for the user's login to take effect
The access denied would always because of your mysql user doesn't have enough privileges to execute the query.

You may test the "Update" query with your Root user, if it's executed fine.

Here are the steps, first show grants to your mysql user,
http://dev.mysql.com/doc/refman/5.0/en/show-grants.html


Secondly, if you need to cancel some of the privileges, or change the privileges,
http://dev.mysql.com/doc/refman/4.1/en/revoke.html




Author

Commented:
Sorry, been away.
This problem is really holding my up.
I uninstal, (although I notice this doesn't remove my.cnf and if I delete it, it doesn't come back with a fresh install(??) ) I run another apt-get mysql, still no mysql> prompt, so I can't run any of these flush commands.

Author

Commented:
Always the same complaint Er 1045 ( 28000) Access Denied.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial