Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 6015

Can't install mysql-server on WSL2

$
0
0

I'm currently trying to connect a php application on WSL2 with a database initialized on my windows using xampp and TablePlus. I get an error that looks like this: 127.0.0.1:54898 [500]: GET / - Uncaught PDOException: SQLSTATE[HY000] [2002] Connection refused in ~/path/index.php:9 Stack trace: #0 ~/path/index.php(9): PDO->__construct() #1 {main} thrown in ~/path/index.php on line 9

When I looked upon StackOverflow, the solution was to change the localhost to 127.0.0.1, but even this couldn't resolve the error. Then, another solution found was to initialize the mysql on WSL2. But when I try to install mysql-server, I get this error:

`$ sudo apt install mysql-serverReading package lists... DoneBuilding dependency tree... DoneReading state information... DoneSome packages could not be installed. This may mean that you haverequested an impossible situation or if you are using the unstabledistribution that some required packages have not yet been createdor been moved out of Incoming.The following information may help to resolve the situation:

The following packages have unmet dependencies:libevent-pthreads-2.1-7 : Depends: libevent-core-2.1-7 (= 2.1.11-stable-1) but 2.1.12-stable-1build3 is to be installedE: Unable to correct problems, you have held broken packages.`

I've already tried to update and upgrade with sudo apt upgrade && update, also tried downgrade with sudo aptitude update && sudo aptitude install build-essential, but even this couldn't resolve it.


Viewing all articles
Browse latest Browse all 6015

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>