• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved MySQL 5.6 No directory, logging in with HOME=/

Dukemaster

Regular Pleskian
Hi,
a few days ago I made my server new and successfully made an upgrade to MySQL 5.6 [former 5.5]
Today I had one MySQL update to mysql-apt-config_0.8.4-1_all.deb [former 0.8.3.1]
Also worked fine.
But I got the well-known message:
Code:
root@domain:~# service mysql restart
 * Stopping MySQL Community Server 5.6.36
...
 * MySQL Community Server 5.6.36 is stopped
 * Re-starting MySQL Community Server 5.6.36
No directory, logging in with HOME=/
..
 * MySQL Community Server 5.6.36 is started
root@domain:~# reboot

On askUbuntu I found exactly the same issue only difference is update to MySQL 5.7, on Ubuntu 14.04, like my OS.
One member suggested here the change to usual /var/lib/mysql:
Code:
Having same issue to get rid of this error i did the following

    Stop MYSQL service:

    sudo service mysql stop

    Change home directory of mysql from nonexistent to original directory where it is supposed to be:

    sudo usermod -d /var/lib/mysql/ mysql

Now start mysql server again with:

sudo service mysql start

The error message has disappeared. Still why this happen is unknown.
Do you agree with this tutorial? Is it complete or did the user perhaps left some commands/informations?
Or shall I better do nothing at all?

Lots of greets and thanks for the great help in Plesk-Tutorials and few days ago by @UFHH01.
 
Last edited:
The issue might be happened due to the improper MySQL upgrade. Kindly remove the unwanted packages and configure the MySQL 5.6 version properly to fix the issue.
You can check all versions of installed mysql packages on the system with

# dpkg -l | grep mysql

Make sure that you have no installed two different versions simultaneously.
 
Thanks @IgorG for this support.
I get the following output
Code:
~# dpkg -l | grep mysql
ii  libdbd-mysql-perl                    4.025-1ubuntu0.1                           amd64        Perl5 database interface to the MySQL database
ii  libmysqlclient18:amd64               5.6.36-1ubuntu14.04                        amd64        MySQL shared client libraries
ii  mysql-apt-config                     0.8.4-1                                    all          Auto configuration for MySQL APT Repo.
ii  mysql-client                         5.6.36-1ubuntu14.04                        amd64        MySQL Client meta package depending on latest version
ii  mysql-common                         5.6.36-1ubuntu14.04                        amd64        MySQL Common
ii  mysql-community-client               5.6.36-1ubuntu14.04                        amd64        MySQL Client
ii  mysql-community-server               5.6.36-1ubuntu14.04                        amd64        MySQL Server
ii  mysql-server                         5.6.36-1ubuntu14.04                        amd64        MySQL Server meta package depending on latest version
rc  mysql-server-5.5                     5.5.54-0ubuntu0.14.04.1                    amd64        MySQL database server binaries and system database setup
ii  php5-mysql                           5.5.9+dfsg-1ubuntu4.21                     amd64        MySQL module for php5
ii  plesk-mysql-server                   17.0.17-ubuntu14.04.build1700161028.14     amd64        Plesk Onyx v17.0.17 MySQL server dependency package
ii  plesk-php56-mysql                    5.6.30-ubuntu14.04.17031314                amd64        A module for PHP applications that use MySQL databases
ii  plesk-php70-mysql                    7.0.17-ubuntu14.04.17031621                amd64        A module for PHP applications that use MySQL databases
ii  plesk-php71-mysql                    7.1.3-ubuntu14.04.17031711                 amd64        A module for PHP applications that use MySQL databases

I see only the two entries of default image mysql-server-5.5 and perl which seem to fit not to the rest. Due to my websites personally I would only need version php 7.13. Perl I installed after setting the server in updates, I also won't really need it.
Could deinstall them, but I expect that this is not what you mean. Would be happy if you could help me a little further. My server is dedicated by 1and1.
It's important to mention this again, because of the special environment together with PLesk.

Greets
 
I see two versions here

ii mysql-server 5.6.36-1ubuntu14.04 amd64 MySQL Server meta package depending on latest version
rc mysql-server-5.5 5.5.54-0ubuntu0.14.04.1 amd64 MySQL database server binaries and system database setup

A status of 'rc' signifies that the package has been removed, but that the configuration files remain. Try to purge it at least.
 
Please could tell me how, a tutorial from your support. Did too much unnecessary things last week. Glad to have a good running system. Don't want to destroy something by not knowing what I do.
 
Hi Dukemaster,

to remove a package on Ubuntu/Debian - based systems, you have several choices ( using apt-get / aptitude / dpkg ). My recommendation is always to use "aptitude", because this powerfull tool is able to point you to different solutions, in case that dependencies exist.

aptitude purge PACKAGE-NAME

Apart from the command option "remove", "purge" will not only remove the package itself, but as well all depending configuration files, which the package installed during its installation process.

Pls. don't forget to backup your folders "/etc/mysql" and "/var/lib/mysql" before you remove MySQL - related packages, so that you are able to restore them quickly in case of any possible issue/error/problem:

Examples:
Code:
mkdir -p /root/backups/temp/etc/mysql
rsync -a /etc/mysql/ /root/backups/temp/etc/mysql

mkdir -p /root/backups/temp/var/lib/mysql
rsync -a /var/lib/mysql/ /root/backups/temp/var/lib/mysql

Consider to REMOVE the folder and it's content "/root/backups/temp", after you didn't experience issues/errors/problems - no one wants to waste space on your server. ;)
 
Thanks @UFHH01 and @IgorG for this great help.
Everything worked like you adviced:
But...
But another problem arised, only by luck I found in Plesk Panel that the button is grey at MySQL localhost with error by mouseover last connection to MySQL Server was not successful.
But as you see from shell, server is running.
What's going on behind the scenes?
And the following red message is also in database server section top already before I did purge. And I have to say two days ago was a update of mysql-apt-config_0.8.3-1_all.deb to mysql-apt-config_0.8.4-1_all.deb
What makes me wonder is that the old one is still in /root/ as a neighbour of /parallels/ directory (also now /backups/temp/etc/...from the purge case).
Fehler: Column count of mysql.user is wrong. Expected 43, found 42. Created with MySQL 50554, now running 50636. Please use mysql_upgrade to fix this error.
In MySQL support I read according to MySQL 5.7 a similar problem, but between 5.7.11 and 12 around keyring.
All sites running, plesk repair all -n tells me everything all right. But I suppose that there is something in the background.
Could you please help find out if everything is alright?
Perhaps if it's needed we can change the HOME logging but now it's the last important thing in teh world I guess, or it is the reason for it.

Code:
root@xxx:~#  aptitude purge mysql-server-5.5
The following packages will be REMOVED:
  mysql-server-5.5{p}
0 packages upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.
Do you want to continue? [Y/n/?] Y
(Reading database ... 142228 files and directories currently installed.)
Removing mysql-server-5.5 (5.5.54-0ubuntu0.14.04.1) ...
Purging configuration files for mysql-server-5.5 (5.5.54-0ubuntu0.14.04.1) ...
...
 * MySQL Community Server 5.6.36 is stopped

root@xxx:~# service mysqld start
mysqld: unrecognized service
root@xxx:~# service mysql start
No directory, logging in with HOME=/
..
 * MySQL Community Server 5.6.36 is started
root@xxx:~# ^C
root@xxx:~# ^C
root@xxx:~# dpkg -l | grep mysql
ii  libdbd-mysql-perl                    4.025-1ubuntu0.1                           amd64        Perl5 database interface to the MySQL database
ii  libmysqlclient18:amd64               5.6.36-1ubuntu14.04                        amd64        MySQL shared client libraries
ii  mysql-apt-config                     0.8.4-1                                    all          Auto configuration for MySQL APT Repo.
ii  mysql-client                         5.6.36-1ubuntu14.04                        amd64        MySQL Client meta package depending on latest version
ii  mysql-common                         5.6.36-1ubuntu14.04                        amd64        MySQL Common
ii  mysql-community-client               5.6.36-1ubuntu14.04                        amd64        MySQL Client
ii  mysql-community-server               5.6.36-1ubuntu14.04                        amd64        MySQL Server
ii  mysql-server                         5.6.36-1ubuntu14.04                        amd64        MySQL Server meta package depending on latest version
ii  php5-mysql                           5.5.9+dfsg-1ubuntu4.21                     amd64        MySQL module for php5
ii  plesk-mysql-server                   17.0.17-ubuntu14.04.build1700161028.14     amd64        Plesk Onyx v17.0.17 MySQL server dependency package
ii  plesk-php56-mysql                    5.6.30-ubuntu14.04.17031314                amd64        A module for PHP applications that use MySQL databases
ii  plesk-php70-mysql                    7.0.17-ubuntu14.04.17031621                amd64        A module for PHP applications that use MySQL databases
ii  plesk-php71-mysql                    7.1.3-ubuntu14.04.17031711                 amd64        A module for PHP applications that use MySQL databases


Greets
 
Last edited:
Try to complete MySQL upgrade with

# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql_upgrade -u admin --host localhost --port 3306
 
YES YES YES ... THANKS for amazing support.
Green button. "Recent try to connect server was successful"

Code:
~# service mysql restart
 * Stopping MySQL Community Server 5.6.36
...
 * MySQL Community Server 5.6.36 is stopped
 * Re-starting MySQL Community Server 5.6.36
No directory, logging in with HOME=/
..
 * MySQL Community Server 5.6.36 is started

There would be only the Home=/ directory thing.
But I'm happy to solve this...

worked now 22 hours on my communities and this little problem..try to sleep for a few hours...
 
Last edited:
Hi @IgorG and @UFHH01,
after solving the packages issue I wanted to ask if now server is ready for the change of mysql directory from nonexistent to original?
Or do I have to check or something else or better do nothing?

First posting of this thread
Having same issue to get rid of this error i did the following

Stop MYSQL service:

# sudo service mysql stop

Change home directory of mysql from nonexistent to original directory where it is supposed to be:

# sudo usermod -d /var/lib/mysql/ mysql

Now start mysql server again with:

# sudo service mysql start

The error message has disappeared. Still why this happen is unknown.

Greets
 
Hi Dukemaster,

depending to your used installation template ( and the third-part component "mysql" ), there is no standart "HOME" - directory. Nothing to worry about, apart from annoying NOTICES. ;)

YES, you found the correct way to get rid of such NOTICES. :)
 
Just did this commands with the expected result in stopping this really annoying notice.
For the great support everybody is doing here, especially you, I never forget to say a great "Thanks to everyone".
I always behave in the same way in helping others, not making knowledge only for an elite. Knowledge and science should be for everyone on planet earth.
I do this in other communities where I'm able to help, unfortunately here in Plesk Community I'm not able to do this.

Whish you all a thoughtful easter feast which in the matter of fact is a symbol for hope and love
sorry for too much words
 
Last edited:
Hi All, will this work on Plesk Onyx running on Cent)S 6.9 (Final) :
# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql_upgrade -u admin --host localhost --port 3306
 
I also used CentOS from 2013 to 2015. But according to MySQL directories I don't know.
As long as the directories are the same like in @IgorG 's code it should work the same like on Ubuntu.
If I'm not wrong @IgorG is specialized on CentOS ...think he has minimum one running...;)
Greets
 
Back
Top