Skip to content

Instantly share code, notes, and snippets.

@ahmadhasankhan
Last active June 10, 2022 17:35
Show Gist options
  • Star 75 You must be signed in to star a gist
  • Fork 38 You must be signed in to fork a gist
  • Save ahmadhasankhan/48fc9fc9a19807daef1622751a56884b to your computer and use it in GitHub Desktop.
Save ahmadhasankhan/48fc9fc9a19807daef1622751a56884b to your computer and use it in GitHub Desktop.
Install MySQL 5.5.xx on Ubuntu
@chppppp
Copy link

chppppp commented Jul 31, 2020

I am trying to perform this with mysql 5.5.47 on Debian 8 and i get this error. any suggestions? thanks!

$ sudo scripts/mysql_install_db.sh --user=mysql

FATAL ERROR: Could not find @bindir@/my_print_defaults

If you compiled from source, you need to run 'make install' to
copy the software into the correct location ready for operation.

If you are using a binary release, you must either be at the top
level of the extracted archive, or pass the --basedir option
pointing to that location.

@ahmadhasankhan
Copy link
Author

I am trying to perform this with mysql 5.5.47 on Debian 8 and i get this error. any suggestions? thanks!

$ sudo scripts/mysql_install_db.sh --user=mysql

FATAL ERROR: Could not find @bindir@/my_print_defaults

If you compiled from source, you need to run 'make install' to
copy the software into the correct location ready for operation.

If you are using a binary release, you must either be at the top
level of the extracted archive, or pass the --basedir option
pointing to that location.

Search the packages for my_print_defaults using

find / -name my_print_defaults

Check if my_print_defaults is missing on your system (which my_print_defaults), first find out which db is installed with:

dpkg -l |grep -E 'maria|mysql'|grep ii|grep server

@andreguipeil
Copy link

Thank out man! It's works perfectly!

@felipebutcher
Copy link

28 comments and no error. I think you are an angel fallen from sky.

@prashantnirgun
Copy link

prashantnirgun commented Aug 30, 2020

I have ubuntu 20 64 Bit I am getting error
mysql: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory

can anyone help me please

I am using
uname -a
Linux lappy-b50-80 5.4.0-42-generic #46-Ubuntu SMP Fri Jul 10 00:24:02 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

@3h5a9
Copy link

3h5a9 commented Sep 28, 2020

hello
thank you for your nice tutorial.
and it up and running.
but why it is showing the following error when i an giving the commang mysql --version

here is the error
mysql: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory

@leoneDuarte
Copy link

Ola esse Funcionou para min

Se der esse erro:
mysql: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory

Esse comando resolve
apt-get install libncurses5

@madindo
Copy link

madindo commented Nov 5, 2020

got this working on ubuntu 20.04... you're my hero

@avi7611
Copy link

avi7611 commented Nov 10, 2020

which mysql-client version i need to install with this ?

@JTorres87
Copy link

If anyone runs in to the error
mysql: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
Simply install libncurses5
sudo add-apt-repository universe
sudo apt-get install libncurses5

You sir are a life saver and have made our lives easier. Thank You

@jascadev
Copy link

Thank you very much for these instructions!

@mostafijurr
Copy link

While I am trying to log in using root user, but it shows these errors.
mysql: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory

@acosonic
Copy link

acosonic commented Jul 1, 2021

While I am trying to log in using root user, but it shows these errors.
mysql: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory

@mostafijurr have you tried answer of @JTorres87 ? Take a look at second comment above yours.

@mostafijurr
Copy link

@acosonic I have tried with this. but it is not working. its shows errors.
image

@acosonic
Copy link

acosonic commented Jul 2, 2021

@acosonic I have tried with this. but it is not working. its shows errors.
image

This would now be a different problem... What happens if you sudo su, then mysql -u root ... ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment