3
votes

There are some related posts to this but I still can't figure this out. I have a working install of XAMPP(latest version) and MySQL Workbench 8.0.17 installed. I just want to be able to use Workbench with the MySQL that ships with the XAMPP install.

In the latest version of XAMPP, it first sets an IP address before I can start apache and mysql. MySQL seems to be running on port 3307.

Here is the Workbench screen to make a new connection. XAMPP is running on localhost - should that be my hostname?

enter image description here

If I try a localhost or 127.0.0.1 hostname with port 3307 (where I think XAMPP's MySQL is) I get this popup alert. If I continue, I still don't see any of my databases listed on the main screen.

enter image description here

4
MySQL is normally on 3306RiggsFolly
Those defaults look like they should work as they areRiggsFolly
your error message looks like your xampp is shipped with an older version of mysql. So the connection is established but mysql is not at least 5.6Lelio Faieta
This always happens. After I post a question I figure out something important. XAMPP ships with MariaDB which MySQL Workbench doesn't support. I am going to attempt to revert XAMPP to MySQL (not MariaDB) - (@RiggsFolly - XAMPP appears to utilize 3307 for the DB)Kinglish
For mariaDB, maybe they did so you can install MySQL and us it on 3306 without conflictsRiggsFolly

4 Answers

20
votes

This is the way I have used to connecting MySQL workbench to Xampp MySQL.

01) Click on the Plus icon.

Click on plus icon

02) Check the Xampp MySQL port number.

Check the Xampp MySQL port number

03)Type the connection name and check the port number with your Xampp MySql port number.

Type the connection name and check the port number with your Xampp MySql port number

04) Click on the "Continue Anyway" button.

 Click on the "Continue Anyway" button

05) Then click on the "OK" button to save the connection.

Then click on the "OK" button to save the connection

06) Now you can see the connection you just created and click on it to connect to the MySQL database.

Click the newly created connection

07) Just try to run some SQL code to if properly connected to Xampp Mysql.

Just try to run some SQL code

0
votes

The way I 'fixed' this issue was to install an older version of xampp (5.4x) which ships with mysql, not mariadb. Before the install, I dumped all my dbs into a file and then imported them again after the install. Through XAMPP/phpMyAdmin I could see the fresh database. I tried to connect with MySQL Workbench and walla!

0
votes

If you are on Ubuntu, run this command on terminal

sudo /opt/lampp/bin/mysql_upgrade

and then follow @prasadgayan 's answer above.

Note: It is a slight chance that your mysql_upgrade be in some other directory. If that's the case, run it from that path.

Please comment, if something similar work for Windows as well.
Namaste🙏

Reference: Tables could not be fetched - Error loading schema content

0
votes

I finally find solution on mac:

Notice that XAMPP server works on virtue machine inside with debian system and MoriaDB, so if you'd like to run Mysql WorkBench on MacOS outside, you must not use 127.0.0.1 or localhost as host name.

Please check your ip address of XAMPP on its panel General tab, mainly like 192.xxx.xxx.x, this is your host name!

And if you disable or uninstall mysql in your system, you can safely use default port 3306, or if you must use both XAMPP and local version, modify one pls.

Then, when it comes to user part, do not use root! Please add a new user in phpMyAdmin with hostname %, or open XAMPP terminal and use mysql instructions.

After filling all those above, Mysql will be able to start (although with warning, you can ignore it).