HannahI 0 Report post Posted February 28, 2010 I have just set up mysql and phpMyAdmin. I tried to log in to phpMyAdmin with the correct login of root with no password. PhpMyAdmin didn't care, it just said "Please fill in the password field". Then I tried a couple of sql commands with PHP to change the root password, but none of them worked. Can someone please give me a PHP script to query the database to change the root password? Share this post Link to post Share on other sites
HannahI 0 Report post Posted February 28, 2010 It it on my own mac. I was reading the readme file and it said that the default root password is left blank. Share this post Link to post Share on other sites
yordan 10 Report post Posted February 28, 2010 Where do you have this problem? is it on your own PC ? Or on Xisto account?Do you already have data inside your database? Or can you drop the database and restart the install?I guess that the root user does not exist inside the mysql database, or it has a password. Share this post Link to post Share on other sites
8ennett 0 Report post Posted February 28, 2010 The sql query to change your password is "SET PASSWORD FOR root@localhost=PASSWORD('newpasshere');" but you will need to be able to connect PHP to mysql in order to run the query. Share this post Link to post Share on other sites
magiccode91405241511 0 Report post Posted March 1, 2010 Most version of mysql should includes a console client called mysql ( on windows called mysql.exe ) that is inside the bin folder of the mysql installation folder.Just lanuch it with your root account and host name that you will be connect to, e.g. mysql -h [hostname] -u root because it is on your own mac. So this command will be,mysql -h localhost -u root if laster you need to specific password directly. Just add the -p at end of the command line,mysql -h localhost -u root -p[your-password-for-user]Note that there is no space between the -p and the password. Share this post Link to post Share on other sites