![]() |
VOOZH | about |
Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.
Former Technical Writer at DigitalOcean. Focused on SysAdmin topics including Debian 11, Ubuntu 22.04, Ubuntu 20.04, Databases, SQL and PostgreSQL.
I help Businesses scale with AI x SEO x (authentic) Content that revives traffic and keeps leads flowing | 3,000,000+ Average monthly readers on Medium | Sr Technical Writer(Team Lead) @ DigitalOcean | Ex-Cloud Consultant @ AMEX | Ex-Site Reliability Engineer(DevOps)@Nutanix
Building future-ready infrastructure with Linux, Cloud, and DevOps. Full Stack Developer & System Administrator. Technical Writer @ DigitalOcean | GitHub Contributor | Passionate about Docker, PostgreSQL, and Open Source | Exploring NLP & AI-TensorFlow | Nailed over 50+ deployments across production environments.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hello,
How I can install MySQL 5? This is very important to me for using Magento 1 version.
Thank you.
I have this error at mysql_secure_installation :
Re-enter new password: … Failed! Error: Password hash should be a 41-digit hexadecimal number
For those who wonder why this isn’t working, it is because sudo apt install mysql-server install latest version of mysql, which is mysql 8 or latest. mysql 5.7 installation need to refers to other tutorial
hi
I followed your tutorial on ubuntu 16.4 and it seems to be working all fine, now I have another question, my software instruction asks: the table engine must be “MyISAM”. With new MySQL versionit’s always InnoDB. Set “default-storage-engine” option to “MyISAM” in “/etc/mysql/my.cnf”
can you guide me on how to do that?
Thanks
Hello Mark, Thanks for the share of this tutorial, it helped me a lot, First time I do this without any issues and very clear all your steps on this article. Appreciate it. Thank You.
On Ubuntu 20.04, fresh mysql installation. In step 3 when setting up a new user, Plugin 'authentication_plugin' is not loaded.
Great Article it worked for me
This will not work on a server with 512mb RAM. To fix, add some swap space.
But you can add some swap fairly easily. I used the instructions at this link, but there were some other good simple tutorials if this no longer works: https://salslab.com/a/running-mysql-on-a-vps-with-512mb-ram/
“sudo mysql_secure_installation” on a brand-new Ubuntu 20.04 provided by Digital Ocean gave the following error after attempting to set the root password:
“Failed! Error: SET PASSWORD has no significance for user ‘root’@‘localhost’ as the authentication method used doesn’t store authentication data in the MySQL server. Please consider using ALTER USER instead if you want to change authentication parameters.”
So to workaround this, use CTRL-C to cancel the mysql_secure_installation script and do the following:
sudo mysql
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password by '<rootpassword>';
quit
Then you can run “sudo mysql_secure_installation” again and this time, decline the option to change the root password so you can perform the other steps of the script.
Note that once this is set, you’ll access mysql with the password, like so, instead of just “sudo mysql”
mysql -u root -p
I recently ran into the issue of not being able to log in after Step 2- mysql_secure_installation in WSL2
sudo mysql
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
exit
sudo mysql_secure_installation
# various prompts within this step
mysql -u root -p
mysql -u root -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (13)
What worked was using TCP connection to connect rather than a socket connection
mysql -u root -p --protocol=tcp
OR use sudo
sudo mysql -u root -p
[sudo] password for vivek: <---- the sudo user password
Enter password: <---- mysql password
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.