Question
LAMP/SSH - Cant login to MySQL
Hi
I’ve been trying to connect to MySQL but I am unable.
This is how I go about the setup:
0 - I retrieve the MySQL root password in: /root/.digitalocean_password
1 - I set up 2x A records 3x NS records
2 - I out comment the bin-address or change it to 0.0.0.0 in the MySQL config
3 - I log in to MySQL: mysql -u root -p
In step 3 is it normal that any password works?, and not only the one provided by the digital ocean one click service? as the MySQL root password?
4 - Within the MySQL terminal i:
4.1 - CREATE USER ‘myname’@'myip’ IDENTIFIED BY 'password’;
4.2 - GRANT ALL PRIVILEGES ON * . * TO 'myname’@'myip’;
4.3 - FLUSH PRIVILEGES;
4.4 - quit
In step 4, myip is my own IP, right? like '75.252.532.561’?
5 - Open up HeidiSQL and set the settings like:
5.0 Network MariaDB OR MySQL (TCP/IP)
5.1 Hostname / IP = My servers IP
5.2 User = myname
5.3 Password = password
5.4 Port = 3306
I tried restarting MySQL, I tried many different things, but the above I think is the correct way to set it up?.
However, I am unable to login.. there is not set a firewall and I don’t get it.
I’ve read several articles, questions, answers, solutions, etc etc..
I get this error code 10060 with the message Can’t connect to MySQL server on 'myserverip’ (10060)
Can someone please help me out here?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×