Monday, November 17, 2014

Configure MySql Server Workbench root password from XAMPP.

This is for people who have installed XAMPP and MySql Server Workbench together for development, the problem you may get is that when you want to set a password for your MySql database connection the Workbench won't ask you to enter one, even if you have cleared the password "Vault", MySql Server's Workbench will just simply log you in without asking you to set a password.

The solution to this problem is to set the password from XAMPP's Security settings, instead of having to use a bunch commands or configuring files XAMPP gives you the option to set the password from it's web interface, let's get to it.

1) Start XAMPP's Apache server.
2) Click the "Admin" button from XAMPP's Control Panel, or go to http://localhost:80

3) On the left navigation menu click on "Security".

4) A new tab opens, look for a link that says "http://localhost/security/xamppsecurity.php" and click  it.

5) Finally in the section named "MYSQL SECTION: "ROOT" PASSWORD" set the root password. You can leave the other default options.

The first time you enter this section there will be no "Current password" input field.

Now you can start the MySql server from XAMPP's Control Panel, then start the Workbench and click on your connection or create a new one, MySql will ask you for the root password.

To change the password in the future you can simply return to the Apache security options in XAMPP.

Update: XAMPP no longer uses the standard MySql engine, they have switched over to MariaDB.

Because of this MySql Workbench no longer supports XAMP's new default database engine, you may try to use MySql Workbench with MariaDB but some features may be broken, you will also get a repeating message telling you the Workbench is not compatible with that version of MySql.

One possible solution is to use the PHP MyAdmin that comes with XAMPP (instead of the Workbench) but in my experience it can be really slow...

You can also use a GUI/Workbench for MariaDB instead of MySql's Workbench.

Other solution is to downgrade XAMPP to the latest XAMPP that supports the standard MySql engine, that is, XAMPP version 1.8.3.

One last solution would be to install the standard MySql version and use it instead of XAMPPs MariaDB.

No comments: