acquiring a database/ connecting to it in mysql

Have the feeling that everybody is staring at you in the other forums? Then look here, in this forum nobody does care what you say ;-)

Moderator: Project members

500 Command not understood
Posts: 1
Joined: 2015-07-28 01:47
First name: Justin
Last name: L

acquiring a database/ connecting to it in mysql

#1 Post by Justerbuster » 2015-07-28 02:19

Hi everyone, I'm trying to use an old simple school PHP script to connect to a server and database for further php programming, but I'm not quite sure how to find the given ones from filezilla or obtain one at all for that matter. I'm doing fine with the FTP system and viewing my pages online but I'm completely stuck on the server side as I do not know how to obtain a database, or locate the server if I'm even given one. I'm also simply guessing that my username and host is the with username being 1794206_justin and being the host.

I've been trying to figure this out for a long time, and tried connecting to a server downloaded from a different website, but I'm still having trouble approaching it from that angle as well. Since I remember reading that filezilla came with free servers, i'd like to be able to do that, but I would mainly want to just simply get started and be able to connect period. Just in case its relevant, my simple connect line I'm using is:

$link = mysqli_connect("$host", "$user", "$pass", "$db") or die(mysqli_error($link));

when I tried the username and host up there ^ along with the mysql server and password from elsewhere I got

Can't connect to MySQL server on '' (111) in /srv/disk11/1794206/www/

I tried using localhost along with the username up there ^ but ended up getting:

Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /srv/disk11/1794206/www/

I tried googling these errors but they are just taking me into more lost territory, I think the best place to ask is here. So can anyone please help me acquire a database and connect to the right login info? Very much appreciation in advance.