Quote:
Originally posted by ika
for changing root password:
login to mysql as root and change database to "mysql".
Then execute following query:
update users set password=password('newpassword') where user = 'root';
after execute this command execute following comand:
flush privileges;
Password for root is now changed.
Change of deafult port can be done by editing of my.cnf file.
|
After changing the port to 61458 in the my.ini which is in my C:\WINNT folder, when I tried to connect to the MySQL using a clinet it says
Host 'localhost' is not allowed to connect to this MySQL
Plus what is the difference between defining a user and password in my.ini file and in the user table of mysql database. I ran your update statement to change the password and it worked fine but I have also seen that you can also define user and password in my.ini file. What is the use of it?
There is some strange problem happened. Before changing port when I changed the password and connected it worked fine. But it was accepting the host as localhost and not my machine name. Following will give you the idea:
Host: localhost
user: root
pass: asdf
The above worked fine. But when I used this then it gave error.
Host: ALIWEB (this is my machine name)
user: root
pass: asdf
But when used the following it worked fine:
Host: ALIWEB
user: root
pass:
Why is that there are two different passwords for localhost and ALIWEB?
Plus there are 2 root users and 2 % users in the user table of mysql database why?