MySQL in Ubuntu Linux – I cannot connect to the server

AppArmor is a Linux kernel security module that allows the system administrator to restrict programs’ capabilities with per-program profiles. Have you tried to disable it and see if the connection works?
Check here on how to do that: help.ubuntu.com/community/AppArmor#Disable_AppArmor_framework

Another idea you can check with ss -tnl if you can see localhost:3306 on listening mode, if ss is not available use netstat -tnl

$ man ss
ss - another utility to investigate sockets
-t, --tcp
    Display TCP sockets.

-n, --numeric
    Do not try to resolve service names. Show exact bandwidth values, instead of human-readable.

l, --listening
    Display only listening sockets (these are omitted by default).


# Usually something like that means you have the service listening on 
# localhost port 3306 in that case the port you configured your mysql to be running
State   Recv-Q   Send-Q     Local Address:Port      Peer Address:Port  Process  
LISTEN  0        4096           127.0.0.1:3306          0.0.0.0:*           

uefi – Getting errors while trying to install ubuntu

When i put my dvd rom and press the choice to install Ubuntu,then a black screen appears that says:
Couldn’t get size: 0x800000000000e
MODSIGN: Couldn’t get UEFI db list
Couldn’t get size: 0x800000000000e

All the answers that I found on the internet were talking about disabling Secure boot but my motherboard doesn’t support UEFI so I don’t have this option.Please help!

drush – What is the commands to install core on a fresh install of Ubuntu 20.04?

Here is what I did on a fresh install of ubuntu 20.04.

First we’ll need to install lamp:

apt install lamp-server^

Then install php 7.4 gd

apt install php7.4-gd

Setup mysql securely:

sudo mysql_secure_installation

Enable apache rewrite and restart:

a2enmod rewrite; service apache2 restart

Install composer:

curl -sS https://getcomposer.org/installer -o composer-setup.php

Install drush launcher so u can use drush which needs to be installed individually per site (https://github.com/drush-ops/drush-launcher):

wget -O drush.phar https://github.com/drush-ops/drush-launcher/releases/latest/download/drush.phar

Next, create a mysql user so you can create databases for your drupal install: https://www.digitalocean.com/community/tutorials/how-to-create-a-new-user-and-grant-permissions-in-mysql


Now install drupal:

composer create-project drupal/recommended-project drupal

OR for drupal 8.9

composer create-project drupal/recommended-project:8.9 drupal

Then cd into that directory and install drush:

composer require drush/drush

Install drupal:

drush site:install

Enter all your info and it will auto install. Remember to link this directory to your apache folder /var/www/html or however you want to do it.

drush – What is the commands to install Drupal 9 on a fresh install of Ubuntu 20.04?

Here is what I did on a fresh install of ubuntu 20.04.

First we’ll need to install lamp:

apt install lamp-server^

Then install php 7.4 gd

apt install php7.4-gd

Setup mysql securely:

sudo mysql_secure_installation

Enable apache rewrite and restart:

a2enmod rewrite; service apache2 restart

Install composer:

curl -sS https://getcomposer.org/installer -o composer-setup.php

Install drush launcher so u can use drush which needs to be installed individually per site (https://github.com/drush-ops/drush-launcher):

wget -O drush.phar https://github.com/drush-ops/drush-launcher/releases/latest/download/drush.phar

Next, create a mysql user so you can create databases for your drupal install: https://www.digitalocean.com/community/tutorials/how-to-create-a-new-user-and-grant-permissions-in-mysql


Now install drupal:

composer create-project drupal/recommended-project drupal

OR for drupal 8.9

composer create-project drupal/recommended-project:8.9 drupal

Then cd into that directory and install drush:

composer require drush/drush

Install drupal:

drush site:install

Enter all your info and it will auto install. Remember to link this directory to your apache folder /var/www/html or however you want to do it.

My fresh Ubuntu 20.04 installation logs out periodically with a crash report regarding /usr/lib/xorg/Xorg

I installed Ubuntu 20.04 using a USB a few days ago, and I got a popup saying

Sorry, Ubunt 20.04 has experienced an internal error

I ignored it and now the system periodically logs me out. I noticed if I go to my wifi and click on settings, it would log me out which I believe is just crashign and logging me out.

When I log back into the system I get a option to send my crash report to Ubuntu.

It looks like:

Executable Path: /usr/lib/xorg/Xorg
Package:
 xserver-xorg-core 2:1.20.8-2ubuntu2.4
ProblemType: 
 Crash
Title: Xorg assert failure ../../private.h
ApportVersion: 2.20.11-Oubuntu27.9
Archecture: amd64

Bootlog: Error Permissi0no denied /var/log/boot.log'

What steps should I take to try and fix this issue?

No sound in either Ubuntu or Mint with cabled headphones

Pretty new to Linux, and trying my best to overcome the obstacles from a power-user in Windows to give Linux distros a fair go.

Solved most myself in the end, but I have one remaining issue.

Audio works fine on every app, file, or browser – but when i try cabled headphones there’s just no sound. My system recognizes that I put them in, both alsamixer and pulseaudio they appear.

Currently I’m on latest Mint.

I have an Asus laptop with a Realtek ALC 295 sound card.

I have tried different configs in both pulseaudio and alsamixer, and also tried to enable the headphone’s mic that someone figured out could be an issue.

Bluetooth headphones work good.

Any tips? Is this a common issue?

Thanks in advance
Linuxnoob

Install Windows alongside Ubuntu on Lenovo via recovery partition

I am using a Thinkpad T530 which was shipped with Windows 7 Home. I installed Ubuntu on it and removed the windows partition. The recovery partition still exists though.

Now I would like to reinstall Windows (on the unallocated space) and encountered some problems:

I cannot download a Windows Disk Image: "the product key you entered appears to be for software pre-installed by the device manager."
The recovery button for the T530 doesn't work.

Any idea how I can use the recovery partition to reinstall windows? Preferably without erasing the Ubuntu distribution, but I can also reinstall Ubuntu if that’s the only option.