Page 1 of 1

Changing the root password in MySQL

Posted: Thu Sep 01, 2005 1:00 pm
by issinoho
This procedure works under Linux but should be easily modified for VMS.

killall mysqld
mysqld --skip-grant-tables --user=root
mysql


Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 1 to server version: 3.23.41

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

mysql> USE mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> UPDATE user
-> SET password=password("newpassword")
-> WHERE user="root";
Query OK, 2 rows affected (0.04 sec)
Rows matched: 2 Changed: 2 Warnings: 0

mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)

mysql> exit;


killall mysqld
/etc/init.d/mysqld start

-

Posted: Fri Nov 27, 2020 7:02 pm
by ThomasCrift
well what did I say...?

Change everything so it fits your root..

for the sql.. run the query file on your sql admin.

And the server.ini stays where it is