Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
Can't connect to mysql server
I’m a newbie to databases. What I’ve done is:
- setup PhpMyAdmin Droplet
- logged onto PhpMyAdmin using ‘admin’ user and a certain password 'password’, and I created a database called 'test’
- connected using WinSCP & uploaded php file
- run the php file as follows:
$con = mysqliconnect('localhost’, 'admin’, 'password’, 'test’) or die(“Connection failed: ” . mysqliconnect_errno());
Somehow, now matter what I try, it keeps giving me a connection error.
Am I doing something wrong?
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.×