LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   mysql (https://www.linuxquestions.org/questions/linux-software-2/mysql-810625/)

puneeth bhat 05-28-2010 02:23 AM

mysql
 
is there any way to remove the root password in mysql,if can what is the command to remove it.Thank u in advance.

EricTRA 05-28-2010 02:28 AM

Hello,

First of all, why would you remove it? Your databases will be open to any user that's able to connect to your server by using root as login without providing a password. That's a pretty big security risk unless you have your server secured in other ways and you're the only user that has access to it.

One possible way:
Code:

mysql -u root -p              [login using your password]
mysql> use mysql;
mysql> update user set password=PASSWORD("") where user='root';
mysql> flush privileges;
mysql> quit

Kind regards,

Eric

pixellany 05-31-2010 09:01 AM

moved to Software

cola 05-31-2010 09:06 AM

Quote:

Originally Posted by puneeth bhat (Post 3983840)
is there any way to remove the root password in mysql,if can what is the command to remove it.Thank u in advance.

Why do you want to remove mysql root password?
http://www.cyberciti.biz/faq/mysql-c...root-password/


All times are GMT -5. The time now is 07:07 AM.