Forum : change the username of mysql
Brief description  about Online courses   join in Online courses
View kaushik  n 's Profile

change the username of mysql

i was instaling a software named opensis
i was getting an error regarding the username and password of mysql but by default the username is root and there is no password how should i solve the problem?











Asked by kaushik n | May 10, 2010 |  Reply now
Replies (1)
View teacher siliconindia 's Profile
Hi kaushik,

By default the mysql username will be root.So you can create new username and password.

on your command prompt and at the mysql\bin directory type the following:

c:\mysql\bin>mysql --user=root mysql

this will log you into mysql as the root user, which is the default user, then type the following:

mysql> GRANT ALL PRIVILEGES ON *.* TO new_username@localhost
-> IDENTIFIED BY 'some_pass' WITH GRANT OPTION;

this will add the new user and setup the privileges of that user.
Jul 26, 2010