By busracam5
When I entered domainname/phpmyadmin I can Connect MYSQL without any error.
But, I cannot connect MYSQL when I’m usıng connect.php file. connect.php files include: <?php $servername = “domaınname”; $username = “root”; $password = "**";
// Create connection $conn = mysqli_connect($servername, $username, $password);
// Check connection if (!$conn) { die("Connection failed: " . mysqli_connect_error()); } echo “Connected successfully”;*
and I’m writing this to firefox : domainname/connect.php I get thıs error Connection failed: Can’t connect to MySQL server on ‘domainName’ (111)
thank you
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!
are you using apache? You might need to install some mods if you have not already:
sudo apt-get install libapache2-mod-auth-mysql php-mysql
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
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.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.