Change MySQL password and port on windows

aliweb

Perch
Hi

I have just installed MySQL 3.23 on Windows 2000 Server.
I am using WinMySQLadmin 1.4 to connect it to the MySQL server.
Can anyone tell me how to change the root or administrator password and default port in MySQL?
Check the attached file for a screen shot.
 

Attachments

  • screenshot.jpg
    screenshot.jpg
    70.5 KB · Views: 4,501
aliweb said:
Can anyone tell me how to change the root or administrator password and default port in MySQL?

That screenshot is only of the engine info interface, you'll need to use a seperate tool to change the user priviliges.

To change the port, select the "my.ini Setup", click the "Pick up and Edit" button. On that screen you will see a commented out line that says #port=3306

Change it to whatever you like and remove the # from the front. Then restart the engine and you should be set for that.

To change the root password, you will need to load up a command window, go to x:\mysql\bin (where x is your drive where MySQL is installed) and run the program mysql. This gives you a Command Line interface to the database.

Once you open it, you can run the following
use mysql
(tells the program to use the mysql database which contains all of the information)
select host, user, password from user \g
(the \g tells mysql to run the query.)
update user set password = 'whatever' where user = 'root' \g
(that will change your password for the root users)

Good luck!
Hatton
 
hatton said:
That screenshot is only of the engine info interface, you'll need to use a seperate tool to change the user priviliges.

To change the port, select the "my.ini Setup", click the "Pick up and Edit" button. On that screen you will see a commented out line that says #port=3306

Change it to whatever you like and remove the # from the front. Then restart the engine and you should be set for that.
..................
Ok I did the same and changed the port. Then I restarted MySQL and it worked fine. But when I went to command prompt to change the password and wrote MySQL (install location is C:\MySQL\bin) then it says

ERROR 2003: Can't connect to MySQL server on 'localhost' (10061)

Plus I am using one of the GUI tools to create tables database etc. called MySQL Control Center 0.8.8, it also does not connect to MySQL after changing the port, even though I have defined the new port in this program.

Tell me what is the correct procedure to uninstall MySQL. Because I wanted to clean install it again but it picks up the old configuration everytime I reinstall. Shall I just
(1) Delete the dir (because it does not show up in Add/Remove Programs)
(2) Delete registry entries
(3) Delete the my.ini file

That's it or do I need to delete some other files also?

And also tell me what is the best GUI tool to create/manage tables and database and to configure the MySQL server? Right now as you know I am using WinMySQLAdmin for administration and MySQL Control Center for managing tables/database.
Can you suggest me just one single software that will do all these?
 
Good luck on all the other jobs...


But I like MYSQL Front 3.0 (it's free!) for administration. Honestly, I just use phpmyadmin (it's free!) for management. It's quick, easy, and work s on just about anything.

If anybody would suggest better free tools, i'm listening.
 
aliweb said:
ERROR 2003: Can't connect to MySQL server on 'localhost' (10061)

Plus I am using one of the GUI tools to create tables database etc. called MySQL Control Center 0.8.8, it also does not connect to MySQL after changing the port, even though I have defined the new port in this program.

When you changed the port in the my.ini file that probably threw things off for the command line tool. That program assumes the default port for the server. As for the other program, I haven't played with it at all so I don't know what may or may not be working with it.

aliweb said:
Tell me what is the correct procedure to uninstall MySQL. Because I wanted to clean install it again but it picks up the old configuration everytime I reinstall. Shall I just
(1) Delete the dir (because it does not show up in Add/Remove Programs)
(2) Delete registry entries
(3) Delete the my.ini file

That's it or do I need to delete some other files also?
I don't think you need to uninstall MySQL. If you want to, make sure to do what you menioned above and then do a search for my.ini on you hard drive. IIRC you'll find a second copy and that's what is being read.

You should be able to reverse the steps I sent before to change back to the default port.

Good Luck!
 
Back
Top