Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

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!
I followed the instructions on Step 3 and just ended up locking myself of mysql. Something there is not right or should be made more clear as to what is going on.
I confirm that instructions on Step 3 results in locking up ourselves out of mysql. Indeed, something there is not right.
Hello. On the 3rd step when I try execute command:
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
I faced error:
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password' at line 1
Thanks for the great tutorial(s)!
I have a question regarding mysql_secure_installation:
I installed mysql-server 5.7 on Ubuntu 18.04 and ran the commands manually, as described here:
UPDATE mysql.user SET authentication_string='secretpassword' WHERE user='root';
DELETE FROM mysql.user WHERE user='';
DELETE FROM mysql.user WHERE user='root' AND Host NOT IN ('localhost',
'127.0.0.1', '::1');
DROP DATABASE IF EXISTS test;
DELETE FROM mysql.db WHERE Db='test' OR Db='test\\_%';
FLUSH PRIVILEGES;
Apart from changing the root password, each of the commands showed no effect at all:
Query OK, 0 rows affected (0.00 sec)
I have two questions:
mysql_secure_installation if it does not
have any effect?auth_socket authentification?I was unable to login to mysql after installation no matter what I did until I found this, but I lost the link to the original page, just copying from my notes. I’m running ubuntu server 18.04 on ESXi. I installed mysql using sudo apt-get install mysql-server. These steps make your password root. Just substitute your desired password for ‘root’ after the word BY at the end of the line that starts with ALTER USER.
sudo nano /etc/mysql/my.cnf Add to bottom of file: [mysqld] skip-grant-tables
save and exit
sudo service mysql restart mysql -u root -p (press enter to leave blank password)
mysql> flush privileges;
ALTER USER ‘root’@‘localhost’ IDENTIFIED WITH mysql_native_password BY ‘root’; exit sudo service mysql restart sudo nano /etc/mysql/my.cnf and change from skip-grant-tables to #skip-grant-tables save and exit sudo service mysql restart
Now you will be able to login with the new password mysql -u root -p mysql>flush privileges;
Hi there, apache2 is being disabled after installation of MySQL on ubuntu 14.4 , any thing am doing wrong?
Mark
This was a great guide. Thank you.
I have one question though and I’ve googled trying to find the answer but so far have found nothing.
In Step 3 …
Is there an alternative means of accomplishing the following 2 from a command line using say mysqladmin?
ALTER USER ‘root’@‘localhost’ IDENTIFIED WITH mysql_native_password BY ‘password’;
FLUSH PRIVILEGES;
I have an application that requires the above as part of the applications installation but I am trying to just put the application’s entire install into a Bash script with “minimal” user interaction.
Using your Step 3 works - but requires the manual entry/execution of:
$ mysql msyql> ALTER USER ‘root’@‘localhost’ IDENTIFIED WITH mysql_native_password BY ‘password’; mysql> FLUSH PRIVILEGES; mysql> quit
I thought perhaps in a script I could just do:
mysqladmin -u root password NEWPASSWORD
then
mysqladmin flush-privileges
but the access to the application fails where it succeeds if I do it your way using the manual entry/execution of commands.
My assumption is that
mysqladmin -u root password NEWPASSWORD changes the password but does not change auth-socket to mysql_native-password like your method.
So are you aware of who to make the equivalent of your method? can mysqladmin do that?
thanks in advance for any info Brian
On Ubuntu 18.10 on Digital Ocean this guide don’t work… I really don’t know why I . just change the droplet and everything works as expected.
This comment has been deleted
Got it working without any problems, thank you. How would I go about setting up remote connections so I can connect from my mac using sequel pro?